diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 414c0afa836..6dcc96500cc 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -46,6 +46,7 @@ #include "GridNotifiersImpl.h" #include "CellImpl.h" #include "Path.h" +#include "CreatureGroups.h" #include <math.h> @@ -9686,6 +9687,10 @@ void Unit::CombatStart(Unit* target) if(!target->IsStandState() && !target->hasUnitState(UNIT_STAT_STUNNED)) target->SetStandState(PLAYER_STATE_NONE); + //Call creature group update + if(GetTypeId()==TYPEID_UNIT && ((Creature *)this)->GetFormationID()) + CreatureGroupHolder[((Creature *)this)->GetFormationID()]->MemberHasAttacked(((Creature *)this)); + if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER && !((Creature*)target)->HasReactState(REACT_PASSIVE) && ((Creature*)target)->AI()) { |