Example #1
0
 void EnterEvadeMode()
 {
     m_creature->RemoveAllAuras();
     m_creature->DeleteThreatList();
     m_creature->CombatStop(false);//do not interrupt channeling
     m_creature->SetLootRecipient(NULL);
     if (GetIsBeingEscorted())
     {
         SetReturning(true);
         ReturnToLastPoint();
         debug_log("TSCR: EscortAI (EnterEvadeMode() Override) has left combat and is now returning to last point");
     }
     else
         m_creature->GetMotionMaster()->MoveTargetedHome();
 }
void npc_escortAI::EnterEvadeMode() {
	me->RemoveAllAuras();
	me->DeleteThreatList();
	me->CombatStop(true);
	me->SetLootRecipient(NULL);

	if (HasEscortState(STATE_ESCORT_ESCORTING)) {
		AddEscortState(STATE_ESCORT_RETURNING);
		ReturnToLastPoint();
		sLog->outDebug(
				LOG_FILTER_TSCR,
				"TSCR: EscortAI (script: %s, creature entry: %u) has left combat and is now returning to last point");
	} else {
		me->GetMotionMaster()->MoveTargetedHome();
		Reset();
	}
}
Example #3
0
void npc_escortAI::EnterEvadeMode()
{
    me->RemoveAllAuras();
    me->DeleteThreatList();
    me->CombatStop(true);
    me->SetLootRecipient(NULL);

    if (HasEscortState(STATE_ESCORT_ESCORTING))
    {
        ReturnToLastPoint();
    }
    else
    {
        me->GetMotionMaster()->MoveTargetedHome();

        Reset();
    } 
}
Example #4
0
void npc_escortAI::EnterEvadeMode()
{
    m_creature->RemoveAllAuras();
    m_creature->DeleteThreatList();
    m_creature->CombatStop(true);
    m_creature->SetLootRecipient(NULL);

    if (HasEscortState(STATE_ESCORT_ESCORTING))
    {
        AddEscortState(STATE_ESCORT_RETURNING);
        ReturnToLastPoint();
        debug_log("TSCR: EscortAI has left combat and is now returning to last point");
    }
    else
    {
        m_creature->GetMotionMaster()->MoveTargetedHome();
        Reset();
    }
}
Example #5
0
void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/)
{
    me->RemoveAllAuras();
    me->DeleteThreatList();
    me->CombatStop(true);
    me->SetLootRecipient(NULL);

    if (HasEscortState(STATE_ESCORT_ESCORTING))
    {
        AddEscortState(STATE_ESCORT_RETURNING);
        ReturnToLastPoint();
        TC_LOG_DEBUG("scripts", "EscortAI has left combat and is now returning to last point");
    }
    else
    {
        me->GetMotionMaster()->MoveTargetedHome();
        if (HasImmuneToNPCFlags)
            me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
        Reset();
    }
}
Example #6
0
    void EnterEvadeMode()
    {
        if (!HasEscortState(STATE_ESCORT_ESCORTING))
        {
            me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
            me->SetHomePosition(1845.577759f+rand_norm()*5-2.5f, 800.681152f+rand_norm()*5-2.5f, 44.104248f, M_PI);
        }

        me->DeleteThreatList();
        me->CombatStop(true);
        if (HasEscortState(STATE_ESCORT_ESCORTING))
        {
            AddEscortState(STATE_ESCORT_RETURNING);
            ReturnToLastPoint();
        }
        else
        {
            me->GetMotionMaster()->MoveTargetedHome();
            Reset();
        }
        me->ClearUnitState(UNIT_STATE_EVADE);
    }