*Fix build.
--HG-- branch : trunk
This commit is contained in:
1 parent
2b753d0f23
commit
8f0fecd7e3
345 files changed
+682
-874
No files matched your search
+12
-8
@@ -9705,12 +9705,6 @@ void Unit::CombatStart(Unit* target)
|
||||
&& !((Creature*)target)->HasReactState(REACT_PASSIVE) && ((Creature*)target)->IsAIEnabled)
|
||||
{
|
||||
((Creature*)target)->AI()->AttackStart(this);
|
||||
((Creature*)target)->AI()->EnterCombat(this);
|
||||
if(((Creature*)target)->GetFormation())
|
||||
{
|
||||
((Creature*)target)->GetFormation()->MemberAttackStart((Creature*)target, this);
|
||||
sLog.outDebug("Unit::CombatStart() calls CreatureGroups::MemberHasAttacked(this);");
|
||||
}
|
||||
}
|
||||
|
||||
SetInCombatWith(target);
|
||||
@@ -9744,8 +9738,18 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||
|
||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
|
||||
if(GetTypeId() != TYPEID_PLAYER && GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != IDLE_MOTION_TYPE)
|
||||
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
if(GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
if(GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != IDLE_MOTION_TYPE)
|
||||
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
if(enemy)
|
||||
{
|
||||
if(!((Creature*)this)->HasReactState(REACT_PASSIVE) && ((Creature*)this)->IsAIEnabled)
|
||||
((Creature*)this)->AI()->EnterCombat(enemy);
|
||||
if(((Creature*)this)->GetFormation())
|
||||
((Creature*)this)->GetFormation()->MemberAttackStart((Creature*)this, enemy);
|
||||
}
|
||||
}
|
||||
|
||||
if(GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->isPet())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user