diff options
Diffstat (limited to 'src/bindings/scripts')
4 files changed, 11 insertions, 24 deletions
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index f99f9a130aa..34bda60c1b7 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -240,9 +240,9 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { - if(who && !m_creature->getVictim() && m_creature->canStartAttack(who)) - AttackStart(who); - if (!Intro && who && m_creature->IsWithinLOSInMap(who)&& m_creature->IsWithinDistInMap(who, 100) && m_creature->IsHostileTo(who)) + ScriptedAI::MoveInLineOfSight(who); + + if (!Intro && m_creature->IsWithinLOSInMap(who)&& m_creature->IsWithinDistInMap(who, 100) && m_creature->IsHostileTo(who)) { DoScriptText(SAY_INTRO, m_creature); Intro = true; diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp index 77ba7fd7ce2..b6a9f0fecae 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp @@ -434,14 +434,10 @@ void hyjalAI::EnterCombat(Unit *who) void hyjalAI::MoveInLineOfSight(Unit *who) { - if(IsDummy)return; - if (IsBeingEscorted && !GetAttack()) - return; - - if(m_creature->getVictim() || !m_creature->canStartAttack(who)) + if(IsDummy) return; - AttackStart(who); + npc_escortAI::MoveInLineOfSight(who); } void hyjalAI::SummonCreature(uint32 entry, float Base[4][3]) diff --git a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp index aaded603f80..6ee3aba6d12 100644 --- a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp +++ b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp @@ -649,22 +649,16 @@ struct TRINITY_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI WaveTimer = 0; } - void EnterCombat(Unit* who){} - void MoveInLineOfSight(Unit* who) { - if( who->GetTypeId() == TYPEID_PLAYER && !m_creature->canStartAttack(who) && !Progress) + if(!Progress && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 10.0f)) { if( CAST_PLR(who)->GetQuestStatus(QUEST_POWERING_OUR_DEFENSES) == QUEST_STATUS_INCOMPLETE ) { - float Radius = 10.0; - if( m_creature->IsWithinDistInMap(who, Radius) ) - { - PlayerGUID = who->GetGUID(); - WaveTimer = 1000; - EndTimer = 60000; - Progress = true; - } + PlayerGUID = who->GetGUID(); + WaveTimer = 1000; + EndTimer = 60000; + Progress = true; } } } diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp index 12c7c3fa2ad..df0ac6851af 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp @@ -170,10 +170,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { if(!Intro && !Flying) - { - if(!m_creature->getVictim() && m_creature->canStartAttack(who)) - ScriptedAI::AttackStart(who); - } + ScriptedAI::MoveInLineOfSight(who); } void MovementInform(uint32 type, uint32 id) |
