diff options
author | megamage <none@none> | 2009-08-23 22:36:51 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-23 22:36:51 -0500 |
commit | 5f1589d6d19bf9d4548e0e9fda97f77bb1240ebf (patch) | |
tree | 8d13ac05294821c049abb62fc8a3b73b924ec085 /src/game/Unit.cpp | |
parent | 7712d5e0bd021e92b87e592a830129c69133dee4 (diff) |
*Allow vehicles to regenerate energy.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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(); |