* Also, some minor things:
- Remove duplicate sWorldLog define.
- Add sRealmList macro for RealmList::Instance().
- Use sLog macro in scripting log functions.
* 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>
* 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>
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
* Apply expected healing bonus to spell 53601.
* Allow stacking spell 62600 and 22842 effects at caster.
* Update charges for absorb shield with charges and preopertly expire it at last charge.
This fix spell 62600 effect remove at next damage.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Move precast spell and add one more to Aura boosts for proper remove at cancel.
* Check in ispositivespell as positive to allow cancel in client.
(cherry picked from commit 6566ec2bbd3654921446b6522e9800ef835ffffe)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
all warnings from Wunused
and some from Wall
cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code
for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint
also note for coding:
if you do something like
if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)
Signed-off-by: balrok <der-coole-carl@gmx.net>
* Rename IsSingleFromSpellSpecificPerCaster to IsSingleFromSpellSpecificPerTargetPerCaster for clear meaning.
* Rename IsSingleFromSpellSpecificRanksPerTarget to IsSingleFromSpellSpecificSpellRanksPerTarget for clear meaning.
* Add new IsSingleFromSpellSpecificPerTarget for case single spell specific aura allowed to be at target from any caster and use it.
Move some spell psecific checks (mostly sellf casted) from IsSingleFromSpellSpecificPerCaster to new function.
* Make spell 40216 and 42016 casted/remove at aura 40214 apply/remove.
And drop related spell_area possible existed data.
* In general restore apply area limitations to spell casting in GM mode.
* Not all positive spell have SPELL_ATTR_EX_NO_INITIAL_AGGRO (for react at assistance).
Avoid aggro at positive spell without this flag for non frindly target.
* Some cleanups and better checks in IsPositiveEffect.
old problem was that, for example
a single spell couldn't be cast
at aura OR quest (so 2 entries in this table)
.. will be now possible
Signed-off-by: balrok <der-coole-carl@gmx.net>
* Check new continent requirement by SPELL_ATTR_EX4_CAST_ONLY_IN_OUTLAND in
SpellMgr::GetSpellAllowedInLocationError.
* Also in this function let ignore any area requirement in GM-mode (except client side checks ofc if use spellbook/item)
* For fly form/mount auras check only speciaal reqirement like special fly skill and ignore it for dead state.
* Drop explicit fly auras drop at zone update, now this part GetSpellAllowedInLocationError functionality.
* Allow in `spell_area` have data deepndent from ghost auras
This all allow implement apply spells 55173/55164 to player ghost wiht DB support in `spell_area`
This provided more clear place where dependent auras can be applied/removed,
if expected manual apply _with_ aura remove at parent aura expire.
This can be used for more cases.
In current state it implement additional effects for
29836 and ranks, 61846 and ranks, 31869, 53379 and ranks, 20254 and ranks,
20138 an ranks, 48263, and 48265.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>