mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Merge
--HG-- branch : trunk
This commit is contained in:
@@ -21,7 +21,6 @@ enum ePoints
|
||||
npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature),
|
||||
m_uiPlayerGUID(0),
|
||||
MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
||||
CanMelee(true),
|
||||
m_uiPlayerCheckTimer(1000),
|
||||
m_uiWPWaitTimer(2500),
|
||||
m_uiEscortState(STATE_ESCORT_NONE),
|
||||
@@ -303,7 +302,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
|
||||
|
||||
void npc_escortAI::UpdateEscortAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!CanMelee && !UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -76,7 +76,6 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
|
||||
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
|
||||
float GetMaxPlayerDistance() { return MaxPlayerDistance; }
|
||||
|
||||
void SetCanMelee(bool usemelee) { CanMelee = usemelee; }
|
||||
void SetDespawnAtEnd(bool despawn) { DespawnAtEnd = despawn; }
|
||||
void SetDespawnAtFar(bool despawn) { DespawnAtFar = despawn; }
|
||||
bool GetAttack() { return m_bIsActiveAttacker; }//used in EnterEvadeMode override
|
||||
@@ -109,7 +108,6 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
|
||||
bool m_bIsRunning; //all creatures are walking by default (has flag MOVEMENTFLAG_WALK)
|
||||
bool m_bCanInstantRespawn; //if creature should respawn instantly after escort over (if not, database respawntime are used)
|
||||
bool m_bCanReturnToStart; //if creature can walk same path (loop) without despawn. Not for regular escort quests.
|
||||
bool CanMelee;
|
||||
bool DespawnAtEnd;
|
||||
bool DespawnAtFar;
|
||||
bool ScriptWP;
|
||||
|
||||
@@ -1138,7 +1138,7 @@ struct mob_frost_wyrmAI : public hyjal_trashAI
|
||||
hyjal_trashAI::UpdateAI(diff);
|
||||
if (IsEvent || IsOverrun)
|
||||
{
|
||||
CAST_AI(hyjal_trashAI, m_creature->AI())->SetCanMelee(false);
|
||||
CAST_AI(hyjal_trashAI, m_creature->AI())->SetCanAttack(false);
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
if (IsEvent)
|
||||
@@ -1249,7 +1249,7 @@ struct mob_gargoyleAI : public hyjal_trashAI
|
||||
hyjal_trashAI::UpdateAI(diff);
|
||||
if (IsEvent || IsOverrun)
|
||||
{
|
||||
CAST_AI(hyjal_trashAI, m_creature->AI())->SetCanMelee(false);
|
||||
CAST_AI(hyjal_trashAI, m_creature->AI())->SetCanAttack(false);
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
if (IsEvent)
|
||||
|
||||
Reference in New Issue
Block a user