- Traps should select ATTACKABLE not UNFRIENDLY targets (it shouldn't attack unfriendly targets on sanctuary zones for example)
- Made more readable the nasty oneliner in Unit::_IsValidAttackTarget
Closes#6464Closes#18271
(cherry picked from commit ef227d7e64)
* Fixed caged pet item chat message
* BattlePetMgr optimizations: removed copying data all over the place
* Fixed gaining two pets when learned from item for the first time
* Fixed dismiss button
- Handling checked in sniffs: Spell 63710 Void Barrier vs 49143 Frost Strike
* Send spell miss immune only if spell consists of damage effects
- Checked with 348 Immolate:
* No packets sent if damage immune, aura is applied normally
Also... who the fuck uses 0 to compare against pointers
(cherry picked from commit ca1c4525c7)
Core/Unit: fix build
Ctrl-S failure
(cherry picked from commit f3bdd705c0)
- Spell attributes research
- Container optimization
- Do not skip damage immunity checks on SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY present
- Added additonal arguments support to SendCastResult / CheckCast, spells can now send proper error messages
- Loads spell immune masks/states/effects at startup.
- This cached info is used whenever a spell cast requires immunities to be known beforehand (to see if an aura could be applied for example)
Closes#16658Closes#16901Closes#18114
(cherry picked from commit 50a3ce5703)
Core/Spell: fix warning
(cherry picked from commit 3588ff894b)
Core/Unit: misc codestyle
use typedef for constant reference
(cherry picked from commit 7943150dcb)
Core/Spell: Fixed immunities for some spells (they were broken before rewrite too)
- Warlord's Presence, Uncontrollable Frenzy, Free Friend
- Overload, Lightning Tendrils
- Fervor, Berserk
- Determination
(cherry picked from commit fc6844173f)
Core/Spell: fix typos
(cherry picked from commit f060efbdb4)
Core/Unit: improved handling of some spell attributes
- SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE
- SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE
- SPELL_ATTR3_IGNORE_HIT_RESULT
(cherry picked from commit 352c84943c)
Core/Spell: fix typo
Closes#18248
(cherry picked from commit 1ad9c7d3fd)
Core/Spell: perform charmer check against player controlling unit. Fixes spellcasts while charmed
(cherry picked from commit 425f6c3c34)
Core/Unit: don't use damage immunity to calculate hit result for the whole spell. Should be used only for damage
(cherry picked from commit 9f5df023b7)
Core/Spell: fix a potential null dereference crash
(cherry picked from commit 64304d8b2b)
* Core/Auras: don't save auras casted by items
- This type of auras (like Water Bucket, Precious Ribbon, etc) will be recasted on login anyways.
This reverts commit 16cfd59f5b
(partial cherry picked from commit e84dfff4ce)
Core/Auras: fix elixir aura saving
(cherry picked from commit 697147a596)
Previous code did not protect against m_damage underflow, rather only allow up to duplicate damage.
It now should work as intended.
Closes#18154
(cherry picked from commit 7ced76bab2)
Core/Unit: fix warning reported by VS2015
C4146: unary minus operator applied to unsigned type, result still unsigned
(cherry picked from commit 7b1a0c3698)
Core/Unit: consistency fix
(cherry picked from commit 042023877a)