diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index def8f0c1f3a..973b2a7ea35 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9556,12 +9556,11 @@ void Unit::CombatStart(Unit* target) } //Call creature group update - if(GetTypeId()==TYPEID_UNIT && ((Creature*)this)->GetFormationID()) - { - CreatureGroupHolderType::iterator itr = CreatureGroupHolder.find(((Creature*)this)->GetFormationID()); - if(itr != CreatureGroupHolder.end()) - itr->second->MemberHasAttacked(((Creature*)this)); - } + if(GetTypeId()==TYPEID_UNIT && ((Creature*)this)->GetFormation()) + { + ((Creature*)this)->GetFormation()->MemberHasAttacked(*(Creature*)this); + sLog.outDebug("Unit::CombatStart() calls CreatureGroups::MemberHasAttacked(this);"); + } } void Unit::SetInCombatState(bool PvP) |