From 5f1589d6d19bf9d4548e0e9fda97f77bb1240ebf Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 23 Aug 2009 22:36:51 -0500 Subject: *Allow vehicles to regenerate energy. --HG-- branch : trunk --- src/game/Unit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 55435379a73..2766d31d6bc 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10550,8 +10550,12 @@ void Unit::ClearInCombat() RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); // Player's state will be cleared in Player::UpdateContestedPvP - if(GetTypeId()!=TYPEID_PLAYER) + if(GetTypeId() != TYPEID_PLAYER) + { clearUnitState(UNIT_STAT_ATTACK_PLAYER); + if(HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER)) + SetUInt32Value(UNIT_DYNAMIC_FLAGS, ((Creature*)this)->GetCreatureInfo()->dynamicflags); + } else ((Player*)this)->UpdatePotionCooldown(); -- cgit v1.2.3