fix(Core/SAI): Do not reset HP with SMART_ACTION_UPDATE_ENTRY (#4486)

Co-Authored-By: Wyrserth <43747507+Wyrserth@users.noreply.github.com>
This commit is contained in:
Kitzunu
2021-02-13 20:53:44 +01:00
committed by GitHub
parent 6c4efcdc67
commit 812a744371
2 changed files with 6 additions and 1 deletions
@@ -434,7 +434,12 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
SetAttackTime(OFF_ATTACK, cInfo->BaseAttackTime);
SetAttackTime(RANGED_ATTACK, cInfo->RangeAttackTime);
uint32 previousHealth = GetHealth();
SelectLevel(changelevel);
if (previousHealth > 0)
{
SetHealth(previousHealth);
}
SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool));
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(getLevel(), cInfo->unit_class);