From e4be94461bb999c41e5d91826e1b64e245829ba6 Mon Sep 17 00:00:00 2001 From: "shadowu@mail.bg" Date: Tue, 16 Dec 2008 09:39:33 +0200 Subject: *Creature Groups - additional checks added.(hope it fix the crash). VC71 VC80 updated. --HG-- branch : trunk --- src/game/Unit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6dcc96500cc..19ea4029cf8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9688,7 +9688,8 @@ void Unit::CombatStart(Unit* target) target->SetStandState(PLAYER_STATE_NONE); //Call creature group update - if(GetTypeId()==TYPEID_UNIT && ((Creature *)this)->GetFormationID()) + if(GetTypeId()==TYPEID_UNIT && ((Creature *)this)->GetFormationID() && + CreatureGroupHolder.find(((Creature *)this)->GetFormationID()) != CreatureGroupHolder.end()) CreatureGroupHolder[((Creature *)this)->GetFormationID()]->MemberHasAttacked(((Creature *)this)); if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER -- cgit v1.2.3