Skip to content

Commit

Permalink
Core/Spells: Enslave Demon shouldn't be usable on player pets.
Browse files Browse the repository at this point in the history
Closes #7133
  • Loading branch information
Subv committed Nov 14, 2012
1 parent 10a8a4f commit 6325060
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/game/Spells/Spell.cpp
Expand Up @@ -5436,6 +5436,9 @@ SpellCastResult Spell::CheckCast(bool strict)

if (target->GetCharmerGUID())
return SPELL_FAILED_CHARMED;

if (target->GetOwner() && target->GetOwner()->GetTypeId() == TYPEID_PLAYER)
return SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED;

int32 damage = CalculateDamage(i, target);
if (damage && int32(target->getLevel()) > damage)
Expand Down

0 comments on commit 6325060

Please sign in to comment.