diff options
author | megamage <none@none> | 2009-01-28 00:25:06 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-28 00:25:06 -0600 |
commit | 53e646d23056bac858a370fdf1949237b201ebea (patch) | |
tree | af68b1cdc7e479343f10df744c75a274a719e2e7 | |
parent | 6de869d8f62464742ea18d34753f1898728d9f53 (diff) |
*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
-rw-r--r-- | src/game/Creature.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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)); |