*Changed EventStart distance in Teron Gorefiend

*Added a check for Charge distance in nalorakk
*Remove unneeded include in blackrock_depths

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2008-12-24 21:23:38 +01:00
parent 8f338a56b9
commit 5fd71c003b
3 changed files with 11 additions and 8 deletions
@@ -258,7 +258,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
m_creature->AddThreat(who, 1.0f);
}
if(!InCombat && !Intro && m_creature->IsWithinDistInMap(who, 200.0f) && (who->GetTypeId() == TYPEID_PLAYER))
if(!InCombat && !Intro && m_creature->IsWithinDistInMap(who, 60.0f) && (who->GetTypeId() == TYPEID_PLAYER))
{
if(pInstance)
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
@@ -29,7 +29,6 @@ update `creature_template` set `npcflag`='1',`ScriptName`='npc_tobias_seecher' w
update `instance_template` set `script`='instance_blackrock_depths' where `map`='230';
*/
#include "GameObject.h"
#include "precompiled.h"
#include "def_blackrock_depths.h"
@@ -436,15 +436,19 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
DoPlaySoundToSet(m_creature, SOUND_YELL_SURGE);
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1);
if(!target) target = m_creature->getVictim();
if(!target)
target = m_creature->getVictim();
TankGUID = m_creature->getVictim()->GetGUID();
ChargeTargetGUID = target->GetGUID();
float x, y, z;
target->GetContactPoint(m_creature, x, y, z);
m_creature->SetSpeed(MOVE_RUN, 5.0f);
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
if(target && m_creature->IsWithinDistInMap(target, 50.0f))
{
float x, y, z;
target->GetContactPoint(m_creature, x, y, z);
m_creature->SetSpeed(MOVE_RUN, 5.0f);
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
}
Surge_Timer = 15000 + rand()%5000;
return;