aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-06 13:27:42 -0500
committermegamage <none@none>2009-04-06 13:27:42 -0500
commite8866340ce2cb717486c8def489ddc9d3046a0cc (patch)
treeba1fde0208396dc62a3e0bcb55d298ed8bdbc4e9 /src/game/Unit.cpp
parent69657cad7c385341de7da6b1d3ec1e738b6e2555 (diff)
*CreatureGroups fixed and improoved. By TrullyONE
- Multimap support for instances added. - Removed redundant group checks. - New movement rules (bool group formed/dismissed added). - uint32 Creature::GroupID replaced with CreatureGroup pointer. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp11
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)