aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Unit
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-05-02 19:29:51 +0200
committerShauren <shauren.trinity@gmail.com>2022-05-02 19:29:51 +0200
commit076c63c766d10697cea17da8bd5194862a682cbe (patch)
treea52bd66f822118e361465d34f6b7371cfe563fa2 /src/server/game/Entities/Unit
parentacda6f9dcf411a1406b81e1a100125dbe34f942b (diff)
Core/Spells: Implemented SPELL_ATTR5_NOT_AVAILABLE_WHILE_CHARMED
Diffstat (limited to 'src/server/game/Entities/Unit')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3d695465a33..7dcdd263662 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -9512,6 +9512,9 @@ void CharmInfo::InitPossessCreateSpells()
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId, _unit->GetMap()->GetDifficultyID());
if (spellInfo)
{
+ if (spellInfo->HasAttribute(SPELL_ATTR5_NOT_AVAILABLE_WHILE_CHARMED))
+ continue;
+
if (spellInfo->IsPassive())
_unit->CastSpell(_unit, spellInfo->Id, true);
else
@@ -9544,6 +9547,9 @@ void CharmInfo::InitCharmCreateSpells()
continue;
}
+ if (spellInfo->HasAttribute(SPELL_ATTR5_NOT_AVAILABLE_WHILE_CHARMED))
+ continue;
+
if (spellInfo->IsPassive())
{
_unit->CastSpell(_unit, spellInfo->Id, true);