Core/Units: Fix Unit::_IsValidAttackTarget (UNIT_FLAG_OOC_NOT_ATTACKABLE check specifically)

Closes #3172
This commit is contained in:
Machiavelli committed 2011-11-16 21:02:37 +01:00
1 parent c67af87eda
commit 70b558dd39
2 files changed
+10 -3

No files matched your search

@@ -130,7 +130,7 @@ public:
me->SetHealth(0);
me->InterruptNonMeleeSpells(true);
me->RemoveAllAuras();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->GetMotionMaster()->MovementExpired(false);
me->GetMotionMaster()->MoveIdle();
me->SetStandState(UNIT_STAND_STATE_DEAD);
@@ -152,7 +152,7 @@ public:
{
bIsUndead = true;
bEventInProgress = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->UpdateEntry(MOB_INGVAR_UNDEAD);
me->SetInCombatWith(me->getVictim());
me->GetMotionMaster()->MoveChase(me->getVictim());