From 53e646d23056bac858a370fdf1949237b201ebea Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 28 Jan 2009 00:25:06 -0600 Subject: *Clear combat flag when creature is created. This fix the bug that some creatures do not fight back. Thanks to tlexii for pointing out the bug. --HG-- branch : trunk --- src/game/Creature.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/game') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 553beb79509..8a7b8f5c47d 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -336,6 +336,8 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data ) SetUInt32Value(UNIT_FIELD_FLAGS,GetCreatureInfo()->unit_flags); SetUInt32Value(UNIT_DYNAMIC_FLAGS,GetCreatureInfo()->dynamicflags); + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + SetMeleeDamageSchool(SpellSchools(GetCreatureInfo()->dmgschool)); SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(GetCreatureInfo()->armor)); SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(GetCreatureInfo()->resistance1)); -- cgit v1.2.3