Commit graph

577 commits

Author SHA1 Message Date
VladimirMangos
2a01c79609 [9323] Fixes in code work with original caster guid.
* Add 2 function for 2 used way for original caster
  - GetAffectiveCaster(), is posible NULL unit as source spell affects
    (explcit caster, GO owner, caster of aura that trigering affect)..
  - GetCastingObject(), possible NULL world object as in game spell effects
    source, cast center, etc, need because original caster can store GO
    guid that apply effect around. In other cases m_caster
* Use functions and avoid use explicitly m_originalCaster
* Use GetAffectiveCaster() for fix explicit GO cast at near unit, like now fixed campfire bonus.
2010-02-08 00:53:03 +03:00
tomrus88
db547a008a Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
2010-02-07 15:03:36 +03:00
VladimirMangos
8ff7010750 [9285] Fixed unexpected double time for apply damage for spell 1464 and ranks.
* Implement way ignore some redundent data for triggered spells base at cast cost exist.
  Reason: some triggered spells inherited data from main spells
  just for porper client show spell attributes, we not need this data.
* Use check for ignore inherited cast time.
2010-02-02 20:17:04 +03:00
tomrus88
b85417df73 Movement packets cleanup. 2010-02-01 17:03:04 +03:00
tomrus88
41d8f1a5d4 Movement packets fix. 2010-02-01 00:43:18 +03:00
Valroft
ad7729479c [9280] Fixed work scrolls of enchantment.
SOme for its have spells with unexpected reagent requirements.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-01 00:19:17 +03:00
VladimirMangos
904995c024 [9274] Implement SPELL_EFFECT_SUMMON_ALL_TOTEMS
This implement work spells 66842, 66843, 66844.

Patch originall writed by Arthorius, with additional fixes from darkstalker
and hack removes from me.
2010-01-31 18:40:59 +03:00
laise
a1a0c6edbe [9269] Second attempt to add missing break for SPELL_EFFECT_SUMMON
(earlier accepted patch by daveh never pushed to master)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-30 14:42:17 +01:00
XTZGZoReX
0ff9250de2 [9245] Remove CellLock class and all cell-level thread locking.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
2010-01-23 21:36:15 +01:00
Laise
39b7636094 [9244] Implement talent Rime
And apply SPELLMOD_COST to rune spell cast as part this.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-23 20:19:13 +03:00
VladimirMangos
bf9cccfd5b [9243] Some spell rune code fixes
* Also replace check/take functions for runes by single 2 mode function
* Implement proper check for dead runes case
* Implement proper rune selection for Aura::HandleAuraConvertRune
2010-01-23 20:08:09 +03:00
lutik
cee525f9c8 [9230] Add maxtarget limits for spells 66013, 68509, 67700 and 68510
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-21 19:12:50 +01:00
VladimirMangos
6a2e8064f1 [9208] Big cleanup in UNIT_STAT_* use
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
  Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
  UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
  And UNIT_STAT_CONFUSED_MOVE for check real move in this state
2010-01-18 11:59:10 +03:00
Rockette
f02d897828 [9174] Target limit for spell 25991.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-14 13:06:43 +03:00
VladimirMangos
3b64d57b02 [9154] Implement spell 20375 targets amount depndence from triggering source spell. 2010-01-12 06:00:25 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
Nihilus
337c2c584b [9114] Limit maxTargets for spell 28542 and 55665
Also add missing comment for target exclusion

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-06 20:12:32 +01:00
Forusim
9bc219a312 [9112] Limit maxTargets for spell 42005
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-05 02:38:57 +01:00
VladimirMangos
7496a6b91b [9102] Use FillRaidOrPartyHealthPriorityTargets for 34861 and ranks. 2010-01-02 19:20:06 +03:00
NoFantasy
1ec90288fb [9101] Correct target mode 48, and rename to something more meaningful
Also adjust target 49/50 angles to be really left/right.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-02 14:50:39 +01:00
wilibald09
b9fd5f4311 [9100] Set MaxTargets limit for spell 31347
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-01 21:41:53 +01:00
VladimirMangos
c09ee423ba [9098] More correct targets selection for target pairs with TARGET_SELF2
* Many spell effects that have A target mode SELF2 expected applied to enemy
  target selected by targetmode B so we need skip SELF2 target mode.
* remove SEFL2 from explicit positive target modes.
2010-01-01 21:18:43 +03:00
NetSky
2087aa2876 [9091] Add max targets limit for spell 34861 and ranks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also implement glyph 42396 work for referenced spells.
2009-12-31 19:18:38 +03:00
NetSky
9a6c248dec [9089] Check explicit target correctness by all effect target modes.
All effect target modes start from client provided target data
so all its must be used for checking explicit target modes.
For example exist spells that have as first effect SELF non-explicit target mode.
but in same time negative to explicit target.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also add caching IsHostileTo/IsFriendlyTo for avoid recall this not fast functions.
2009-12-31 15:32:00 +03:00
NoFantasy
468295392d [9086] Limit maxTargets for spell 33711 and 38794
Also remove not strict required difficulty check for some spells and add lost comment from [9085]

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 20:14:48 +01:00
NoFantasy
663f8df849 [9083] Rename maps naming used in spell targeting code for easier readability
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 13:13:33 +01:00
NoFantasy
70c8eb5906 [9082] Correct some spells unMaxTarget (ref [9080]) to depend on map difficulty
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 11:06:24 +01:00
NoFantasy
7bcf8f44aa [9080] Add custom/preset unMaxTargets for a few spells where info is not present
Thanks to kamillys and KAPATEJIb for original code and research!

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 02:00:25 +01:00
NoFantasy
46b6723af1 [9079] Less strict check related to TARGET_SCRIPT_COORDINATES
Fixes and enables ~20 more summon related spells. Some minor cleanup in related code

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 00:42:24 +01:00
VladimirMangos
e583f543a2 [9066] Small cleanups in spell code.
Mostly avoid unclear "lost" break case
2009-12-25 21:05:11 +03:00
VladimirMangos
a1bba62e88 [9056] Not exclude real caster from TARGET_ALL_ENEMY_IN_AREA_INSTANT.
Not found cases when this need for affected case (without 27/28 effects)
2009-12-24 15:54:14 +03:00
VladimirMangos
d36281f315 [9047] Support triggered spells that have cast time.
Like spell will placed in unit event list for cast at next tick or later dependent from cast timer.
Before all triggered spell ignore cast time and casted explcitly from related cast caller code.
This must fix some spell work like 17086 in damage apply time part and also in preventing possible
stack overflow because this spell triggering by chain 19 spell casts from each other.

This also exclude from triggered arg of CastSpell function meaning that this cast will instant alsways.
So triggred arg now meaning only that this seppl casted nit from player side and then not send
in some cases cast info to client if not vosula effect expected.
2009-12-23 12:38:06 +03:00
pasdVn
f1850c9ebe [9046] Correctly send channeling start/update packets to clients
(cherry-picked from commit 1bc38f7)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-22 21:03:28 +03:00
VladimirMangos
15de428242 [9037] Cleanups in spellmode apply code.
* Add constructores for spellmode creating instead explcit fields init
* Use uint32 for family mask 2 instead unneded uint64

Also drop one from manual applies for uno-existed now spell.
2009-12-20 19:47:14 +03:00
VladimirMangos
9e18fc5745 [9035] Attempt make more fast and less hackish spell target checks
* Enable server side recheck clear negative to friend or positive to enemy casts that already checks at client side
* Use more fast way check in similar cases for non-players, and fall back to old way in unclear (for while at least)

Please report if some spell stop propertly casted at friends/enemies.
2009-12-20 03:29:36 +03:00
VladimirMangos
6b78ed534d [9020] Re-implement 1680 (and triggred spell for 46924) in less hack way. 2009-12-18 06:20:35 +03:00
Sarjuuk
393ab4a7ca [9018] Implement aditional form specific bonus for 16857.
SQL data prepered by MrLama.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-18 03:03:29 +03:00
balrok
0502de55af [9013] shapeshift spells
some shapeshift forms will give the player spells
so we need to tell the server that the player has those new
spells else he can't cast them since the server is thinking the player is
cheating

ps forms with spells:
FORM_GHOUL
FORM_THARONJA_SKELETON
FORM_TEST_OF_STRENGTH
FORM_BLB_PLAYER
FORM_TEST
FORM_ZOMBIE

--
so this mostly won't affect any ingame experience.. but good to have this
feature anyway.. :)

also changed errormessage if player has no reagents for spell..
thx to nofantasy
2009-12-17 14:02:59 +01:00
freghar
a13fa7f873 [9006] Trailing whitespace cleaning
Sorry for a (bit) delayed commit.

Signed-off-by: freghar <compmancz@gmail.com>
2009-12-16 15:38:08 +01:00
VladimirMangos
457807eb80 [8996] Implement 2 items effect from itemsets 803/-33
Original patch provided by Splinter.
2009-12-16 00:51:32 +03:00
VladimirMangos
be79375b56 [8994] Re-implement remove auras from channeled target
* Old way have problem with auras that have last tick avent at one from caster/target:
  depndent from auras update order in caster/target pair ti can wrongly not triggered.
* Fxied possible problem with remove same spell non-caster auras at target/caster at spell cast cancel
* Also fix memory lost in old deleted auras cleanup.
2009-12-15 18:50:45 +03:00
VladimirMangos
1d608c482f [8978] Fix wrongly apply weapon damage mods to broken weapon. 2009-12-12 21:12:43 +03:00
qsa
aad9e12a70 [8958] Inlcude 15407 and ranks damage in talent 15286 affect.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-09 21:26:21 +03:00
Maxxie
0ec0f34be7 [8956] Implement aura SPELL_AURA_ALLOW_ONLY_ABILITY.
(cherry picked from commit f4d1e05)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-09 16:01:08 +03:00
qsa
ffca4301d0 [8944] Use DBC data for summon effect functionality.
Also some more local fixes:
* Alow multiply same type guardians req. for some spells.
* Apply spell duration mods to summons

Many summon spells must start work.

Great work qsa! :)

Thanks The_Game_Master for updaing patch to recent sources.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-07 23:40:10 +03:00
VladimirMangos
b0a6993031 [8936] Implement spell 48743 2009-12-07 14:12:47 +03:00
VladimirMangos
94147f2b5a [8910] Implement spell 62124 damage part. 2009-12-03 02:03:49 +03:00
VladimirMangos
d63e4798b2 [8904] In spell effect debug string outpu also spell id and effect index. 2009-12-02 19:32:17 +03:00
Astellar
aa759d8161 [8854] Implement heal back part of spell 48181.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

I choice maybe less clear way store future heal amount, but with avoid use additional fields for auras.
2009-11-21 11:20:30 +03:00
balrok
413a44d114 [8806] remove wrong erroroutput for teleportspells
they are just handled in a different way - so this errorcheck
isn't valid for those spells
2009-11-11 15:29:32 +01:00