Core/Players: worgen will now learn running wild at level 20

*fixed transforming worgen when taking oder dealing damage
This commit is contained in:
Ovalord committed 2018-01-20 17:03:04 +01:00
1 parent c7c4189f0b
commit b584255286
4 files changed
+26

No files matched your search

+14
View File
@@ -686,6 +686,20 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
damage = 0;
}
if (victim->getRace() == RACE_WORGEN && victim->ToPlayer())
{
if (Player* worgenVictm = victim->ToPlayer())
if (worgenVictm->HasSpell(SPELL_TWO_FORMS_RACIAL) && !worgenVictm->HasAura(SPELL_ALTERED_FORM_RACIAL))
worgenVictm->CastSpell(worgenVictm, SPELL_ALTERED_FORM_RACIAL, true);
}
if (getRace() == RACE_WORGEN && ToPlayer())
{
if (Player* worgenPlayer = ToPlayer())
if (worgenPlayer->HasSpell(SPELL_TWO_FORMS_RACIAL) && !HasAura(SPELL_ALTERED_FORM_RACIAL))
CastSpell(worgenPlayer, SPELL_ALTERED_FORM_RACIAL, true);
}
if (victim->IsAIEnabled)
victim->GetAI()->DamageTaken(this, damage);