From edbb8401036a0645d6ff587b2724148a9bba281d Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Tue, 26 Oct 2010 13:22:10 +0200 Subject: [PATCH] [10646] Preserve creature dynamic flags at UpdateEntry Signed-off-by: NoFantasy --- src/game/Creature.cpp | 4 +++- src/shared/revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index ecdd7d09f..e7b15ea6e 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -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)); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 42692b17c..1421895ae 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10645" + #define REVISION_NR "10646" #endif // __REVISION_NR_H__