Core/SAI: do not pass old creatureData to UpdateEntry() and keep current health when changing a NPC's entry.
Port From (https://github.com/TrinityCore/TrinityCore/commit/62f5d9b46bd20faf90dd973e2786d1517b1b3bd2)
This commit is contained in:
@@ -370,7 +370,12 @@ namespace Game.Entities
|
||||
if (updateLevel)
|
||||
SelectLevel();
|
||||
else
|
||||
{
|
||||
ulong previousHealth = GetHealth();
|
||||
UpdateLevelDependantStats(); // We still re-initialize level dependant stats on entry update
|
||||
if (previousHealth > 0)
|
||||
SetHealth(previousHealth);
|
||||
}
|
||||
|
||||
SetMeleeDamageSchool((SpellSchools)cInfo.DmgSchool);
|
||||
SetStatFlatModifier(UnitMods.ResistanceHoly, UnitModifierFlatType.Base, cInfo.Resistance[(int)SpellSchools.Holy]);
|
||||
|
||||
Reference in New Issue
Block a user