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.
* 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.
* 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.
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
* 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.
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>
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.
Passive spell cooldowns only for client show.
It sets by non passive spells with same category
triggered from passive spell auras or in code explictly.
* Ignore cooldown at cast passive spells
* Not set coldowns at passive spell cast itself.
* Removed my too script check on data load.
* Allow looking up fo DB target also if spell has required focus set.
* Makes DB targets optional not required.
Signed-off-by: ApoC <apoc@nymfe.net>
with this flag you can specify a creature to be only
visible for dead players - this removes all hacks from
spiritguides/spirithealers from code and allows some other
special creatures
i decided to not implement an extra deathstate cause
actualy those creatures are almost equal to living ones
* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
* Always use machanic masks in form (1 << (mech-1)), fix all cases.
* Imppement SPELL_AURA_MECHANIC_IMMUNITY_MASK (mostly boss/elite spells).
Note: db stored mechannic masks already stored in proper format so not affected.
* calculation depends on the damageClass now
->SPELL_DAMAGE_CLASS_RANGED & SPELL_DAMAGE_CLASS_MELEE use MeleeDamageBonus()
->SPELL_DAMAGE_CLASS_MAGIC & SPELL_DAMAGE_CLASS_RANGED use SpellDamageBonus()
* changes/improvements in MeleeDamageBonus:
-> improved criterions to apply bonuses
-> implemented scaling of FLAT damage Bonus for non weapon damage based spells
-> support of DOT's
-> added pet's bonus damage for non weapon based spells
* general cleanup in CalculateSpellDamage() and MeleeDamageBonus()
* implemented global helper functions GetWeaponAttackType() and GetAuraTicks() in SpellMgr
Signed-off-by: ApoC <apoc@nymfe.net>
i added a function IsDeathOnlySpell() which returns true
if this spell can ONLY be casted while dead, so i haven't
implemented all spells which could be cast while dead..
moved arena/battleground check from spell::checkcast
to SpellMgr::GetSpellAllowedInLocationError
also i adjusted some spell_fail-codes related to battleground
cause a spell_fail_wrong_area always requires the areaid, else it
would output "not in area %s"
then we don't need to check for map->isarena() when player is already in an
arena
----
in Spell.h
i moved "isTargetableForAttack()" to the top - cause it was anyway used
in every case of that switch
and isTargetableForAttack for attack also checks for isAlive
and isInFlight
so this could get simplified