Merge pull request #4489 from devilcoredev/fix_001

Core/Achievemens: Fix 'The Undying' and 'The Immortal' achievements
This commit is contained in:
Shocker committed 2012-01-04 13:27:43 -08:00
commit ecb1bdd7c3
8 files changed
+174 -88

No files matched your search

+4
View File
@@ -12764,6 +12764,10 @@ void Unit::setDeathState(DeathState s)
// do not why since in IncreaseMaxHealth currenthealth is checked
SetHealth(0);
SetPower(getPowerType(), 0);
// players in instance don't have ZoneScript, but they have InstanceScript
if (ZoneScript* zoneScript = GetZoneScript() ? GetZoneScript() : (ZoneScript*)GetInstanceScript())
zoneScript->OnUnitDeath(this);
}
else if (s == JUST_ALIVED)
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground)