[10646] Preserve creature dynamic flags at UpdateEntry

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
Schmoozerd 2010-10-26 13:22:10 +02:00 committed by NoFantasy
parent f50dc536ec
commit edbb840103
2 changed files with 4 additions and 2 deletions

View file

@ -325,7 +325,9 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data,
SetUInt32Value(UNIT_FIELD_FLAGS, unitFlags);
SetUInt32Value(UNIT_DYNAMIC_FLAGS,GetCreatureInfo()->dynamicflags);
// preserve all current dynamic flags if exist
uint32 dynFlags = GetUInt32Value(UNIT_DYNAMIC_FLAGS);
SetUInt32Value(UNIT_DYNAMIC_FLAGS, dynFlags ? dynFlags : GetCreatureInfo()->dynamicflags);
SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(GetCreatureInfo()->armor));
SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(GetCreatureInfo()->resistance1));