*Creature formations implemented.
--HG-- branch : trunk
This commit is contained in:
1 parent
d1fc67b44e
commit
9948e98703
9 files changed
+369
-7
No files matched your search
@@ -46,6 +46,7 @@
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Path.h"
|
||||
#include "CreatureGroups.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -9686,6 +9687,10 @@ void Unit::CombatStart(Unit* target)
|
||||
if(!target->IsStandState() && !target->hasUnitState(UNIT_STAT_STUNNED))
|
||||
target->SetStandState(PLAYER_STATE_NONE);
|
||||
|
||||
//Call creature group update
|
||||
if(GetTypeId()==TYPEID_UNIT && ((Creature *)this)->GetFormationID())
|
||||
CreatureGroupHolder[((Creature *)this)->GetFormationID()]->MemberHasAttacked(((Creature *)this));
|
||||
|
||||
if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
|
||||
&& !((Creature*)target)->HasReactState(REACT_PASSIVE) && ((Creature*)target)->AI())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user