mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10646] Preserve creature dynamic flags at UpdateEntry
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
f50dc536ec
commit
edbb840103
2 changed files with 4 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue