*Creature Groups - additional checks added.(hope it fix the crash). VC71 VC80 updated.
--HG-- branch : trunk
This commit is contained in:
+1
-1
@@ -627,7 +627,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
|
||||
void UpdateWaypointID(uint32 wpID){m_waypointID = wpID;}
|
||||
|
||||
void SearchFormation();
|
||||
bool IsFormationLeader() {return GetDBTableGUIDLow() == m_formationID;}
|
||||
bool IsFormationLeader() {return (GetDBTableGUIDLow() && GetDBTableGUIDLow() == m_formationID);}
|
||||
uint32 GetFormationID(){return m_formationID;}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -80,8 +80,9 @@ template<>
|
||||
inline void Traveller<Creature>::MoveTo(float x, float y, float z, uint32 t)
|
||||
{
|
||||
//Call for creature group update
|
||||
if(i_traveller.IsFormationLeader() && !i_traveller.isInCombat())
|
||||
CreatureGroupHolder[i_traveller.GetFormationID()]->LeaderMovedInEvade();
|
||||
if(i_traveller.IsFormationLeader() && !i_traveller.isInCombat() &&
|
||||
CreatureGroupHolder.find(i_traveller.GetFormationID()) != CreatureGroupHolder.end())
|
||||
CreatureGroupHolder[i_traveller.GetFormationID()]->LeaderMovedInEvade();
|
||||
|
||||
i_traveller.AI_SendMoveToPacket(x, y, z, t, i_traveller.GetUnitMovementFlags(), 0);
|
||||
}
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
@@ -592,6 +592,12 @@
|
||||
<File
|
||||
RelativePath="..\..\src\game\CreatureAISelector.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\CreatureGroups.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\CreatureGroups.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\DestinationHolder.cpp">
|
||||
</File>
|
||||
|
||||
@@ -946,6 +946,14 @@
|
||||
RelativePath="..\..\src\game\CreatureAISelector.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\CreatureGroups.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\CreatureGroups.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\DestinationHolder.cpp"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user