*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
This commit is contained in:
megamage
2009-04-06 13:27:42 -05:00
parent 69657cad7c
commit e8866340ce
12 changed files with 229 additions and 142 deletions
+5 -6
View File
@@ -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)