*Fix the bug that escorted creatures return to their spawnpoint after engaging combat.
--HG-- branch : trunk
This commit is contained in:
1 parent
87ca52c2a9
commit
8898e9f420
4 files changed
+43
-3
No files matched your search
+4
-3
@@ -10536,9 +10536,10 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||
|
||||
if(GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
//if(GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != IDLE_MOTION_TYPE)
|
||||
//if (((Creature *)this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
|
||||
//((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
// Set home position at place of engaging combat for escorted creatures
|
||||
if(((Creature*)this)->IsAIEnabled)
|
||||
if (((Creature *)this)->AI()->IsEscorted())
|
||||
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
if(enemy)
|
||||
{
|
||||
if(((Creature*)this)->IsAIEnabled)
|
||||
|
||||
Reference in new issue
Block a user