Scripts/ZulGurub: clean up the code and remove old hacks
This commit is contained in:
1 parent
62dd05fc8a
commit
ab602837b1
12 files changed
+121
-162
No files matched your search
@@ -139,7 +139,7 @@ class boss_arlokk : public CreatureScript
|
||||
_triggersSideAGUID[sideA] = trigger->GetGUID();
|
||||
++sideA;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
_triggersSideBGUID[sideB] = trigger->GetGUID();
|
||||
++sideB;
|
||||
@@ -364,7 +364,7 @@ class npc_zulian_prowler : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (Unit* arlokk = me->GetUnit(*me, _instance->GetData64(NPC_ARLOKK)))
|
||||
if (Unit* arlokk = ObjectAccessor::GetUnit(*me, _instance->GetData64(NPC_ARLOKK)))
|
||||
{
|
||||
if (arlokk->IsAlive())
|
||||
arlokk->GetAI()->SetData(_sideData, 0);
|
||||
|
||||
@@ -43,7 +43,8 @@ enum Events
|
||||
|
||||
class boss_gahzranka : public CreatureScript // gahzranka
|
||||
{
|
||||
public: boss_gahzranka() : CreatureScript("boss_gahzranka") { }
|
||||
public:
|
||||
boss_gahzranka() : CreatureScript("boss_gahzranka") { }
|
||||
|
||||
struct boss_gahzrankaAI : public BossAI
|
||||
{
|
||||
|
||||
@@ -41,7 +41,8 @@ enum Events
|
||||
|
||||
class boss_grilek : public CreatureScript // grilek
|
||||
{
|
||||
public: boss_grilek() : CreatureScript("boss_grilek") { }
|
||||
public:
|
||||
boss_grilek() : CreatureScript("boss_grilek") { }
|
||||
|
||||
struct boss_grilekAI : public BossAI
|
||||
{
|
||||
|
||||
@@ -66,7 +66,8 @@ enum Events
|
||||
|
||||
class boss_hakkar : public CreatureScript
|
||||
{
|
||||
public: boss_hakkar() : CreatureScript("boss_hakkar") { }
|
||||
public:
|
||||
boss_hakkar() : CreatureScript("boss_hakkar") { }
|
||||
|
||||
struct boss_hakkarAI : public BossAI
|
||||
{
|
||||
|
||||
@@ -42,7 +42,8 @@ enum Events
|
||||
|
||||
class boss_hazzarah : public CreatureScript
|
||||
{
|
||||
public: boss_hazzarah() : CreatureScript("boss_hazzarah") { }
|
||||
public:
|
||||
boss_hazzarah() : CreatureScript("boss_hazzarah") { }
|
||||
|
||||
struct boss_hazzarahAI : public BossAI
|
||||
{
|
||||
@@ -94,11 +95,8 @@ class boss_hazzarah : public CreatureScript
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Creature* Illusion = me->SummonCreature(NPC_NIGHTMARE_ILLUSION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if (Illusion)
|
||||
if (Creature* Illusion = me->SummonCreature(NPC_NIGHTMARE_ILLUSION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000))
|
||||
Illusion->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ILLUSIONS, urand(15000, 25000));
|
||||
break;
|
||||
|
||||
@@ -16,13 +16,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Jin'do the Hexxer
|
||||
SD%Complete: 85
|
||||
SDComment: Mind Control not working because of core bug. Shades visible for all.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
@@ -34,32 +27,48 @@ enum Say
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BRAINWASHTOTEM = 24262,
|
||||
SPELL_POWERFULLHEALINGWARD = 24309, // HACKED Totem summoned by script because the spell totems will not cast.
|
||||
SPELL_BRAIN_WASH_TOTEM = 24262,
|
||||
SPELL_POWERFULL_HEALING_WARD = 24309,
|
||||
SPELL_HEX = 24053,
|
||||
SPELL_DELUSIONSOFJINDO = 24306,
|
||||
SPELL_SHADEOFJINDO = 24308, // HACKED
|
||||
//Healing Ward Spell
|
||||
SPELL_HEAL = 38588, // HACKED Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
|
||||
//Shade of Jindo Spell
|
||||
SPELL_DELUSIONS_OF_JINDO = 24306,
|
||||
SPELL_SHADE_OF_JINDO = 24308,
|
||||
// Healing Ward Spell
|
||||
SPELL_HEAL = 24311,
|
||||
// Shade of Jindo Spell
|
||||
SPELL_SHADOWSHOCK = 19460,
|
||||
SPELL_INVISIBLE = 24699
|
||||
SPELL_INVISIBLE = 24307
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_BRAINWASHTOTEM = 1,
|
||||
EVENT_POWERFULLHEALINGWARD = 2,
|
||||
EVENT_BRAIN_WASH_TOTEM = 1,
|
||||
EVENT_POWERFULL_HEALING_WARD = 2,
|
||||
EVENT_HEX = 3,
|
||||
EVENT_DELUSIONSOFJINDO = 4,
|
||||
EVENT_DELUSIONS_OF_JINDO = 4,
|
||||
EVENT_TELEPORT = 5
|
||||
};
|
||||
|
||||
Position const TeleportLoc = {-11583.7783f, -1249.4278f, 77.5471f, 4.745f};
|
||||
Position const TeleportLoc = { -11583.7783f, -1249.4278f, 77.5471f, 4.745f };
|
||||
|
||||
// Formation of summoned trolls
|
||||
Position const Formation[] =
|
||||
{
|
||||
{ -11582.2998f, -1247.8599f, 77.6298f, 0.0f },
|
||||
{ -11585.0996f, -1248.7600f, 77.6298f, 0.0f },
|
||||
{ -11586.5996f, -1250.7199f, 77.6298f, 0.0f },
|
||||
{ -11586.4003f, -1253.9200f, 77.6298f, 0.0f },
|
||||
{ -11584.2001f, -1252.2099f, 77.6298f, 0.0f },
|
||||
{ -11582.5000f, -1250.3199f, 77.6298f, 0.0f },
|
||||
{ -11583.2001f, -1254.8299f, 77.6298f, 0.0f },
|
||||
{ -11581.5000f, -1252.5400f, 77.6298f, 0.0f },
|
||||
{ -11580.2001f, -1250.5999f, 77.6298f, 0.0f },
|
||||
{ -11580.5996f, -1254.7900f, 77.6298f, 0.0f }
|
||||
};
|
||||
|
||||
class boss_jindo : public CreatureScript
|
||||
{
|
||||
public: boss_jindo() : CreatureScript("boss_jindo") { }
|
||||
public:
|
||||
boss_jindo() : CreatureScript("boss_jindo") { }
|
||||
|
||||
struct boss_jindoAI : public BossAI
|
||||
{
|
||||
@@ -78,10 +87,10 @@ class boss_jindo : public CreatureScript
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_BRAINWASHTOTEM, 20000);
|
||||
events.ScheduleEvent(EVENT_POWERFULLHEALINGWARD, 16000);
|
||||
events.ScheduleEvent(EVENT_BRAIN_WASH_TOTEM, 20000);
|
||||
events.ScheduleEvent(EVENT_POWERFULL_HEALING_WARD, 16000);
|
||||
events.ScheduleEvent(EVENT_HEX, 8000);
|
||||
events.ScheduleEvent(EVENT_DELUSIONSOFJINDO, 10000);
|
||||
events.ScheduleEvent(EVENT_DELUSIONS_OF_JINDO, 10000);
|
||||
events.ScheduleEvent(EVENT_TELEPORT, 5000);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
@@ -100,14 +109,13 @@ class boss_jindo : public CreatureScript
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_BRAINWASHTOTEM:
|
||||
DoCast(me, SPELL_BRAINWASHTOTEM);
|
||||
events.ScheduleEvent(EVENT_BRAINWASHTOTEM, urand(18000, 26000));
|
||||
case EVENT_BRAIN_WASH_TOTEM:
|
||||
DoCast(me, SPELL_BRAIN_WASH_TOTEM);
|
||||
events.ScheduleEvent(EVENT_BRAIN_WASH_TOTEM, urand(18000, 26000));
|
||||
break;
|
||||
case EVENT_POWERFULLHEALINGWARD: // HACK
|
||||
//DoCast(me, SPELL_POWERFULLHEALINGWARD);
|
||||
me->SummonCreature(14987, me->GetPositionX()+3, me->GetPositionY()-2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
|
||||
events.ScheduleEvent(EVENT_POWERFULLHEALINGWARD, urand(14000, 20000));
|
||||
case EVENT_POWERFULL_HEALING_WARD:
|
||||
DoCast(me, SPELL_POWERFULL_HEALING_WARD);
|
||||
events.ScheduleEvent(EVENT_POWERFULL_HEALING_WARD, urand(14000, 20000));
|
||||
break;
|
||||
case EVENT_HEX:
|
||||
if (Unit* target = me->GetVictim())
|
||||
@@ -118,52 +126,27 @@ class boss_jindo : public CreatureScript
|
||||
}
|
||||
events.ScheduleEvent(EVENT_HEX, urand(12000, 20000));
|
||||
break;
|
||||
case EVENT_DELUSIONSOFJINDO: // HACK
|
||||
case EVENT_DELUSIONS_OF_JINDO:
|
||||
// Casting the delusion curse with a shade so shade will attack the same target with the curse.
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_DELUSIONSOFJINDO);
|
||||
Creature* Shade = me->SummonCreature(NPC_SHADE_OF_JINDO, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Shade)
|
||||
Shade->AI()->AttackStart(target);
|
||||
DoCast(target, SPELL_SHADE_OF_JINDO, true);
|
||||
DoCast(target, SPELL_DELUSIONS_OF_JINDO);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_DELUSIONSOFJINDO, urand(4000, 12000));
|
||||
events.ScheduleEvent(EVENT_DELUSIONS_OF_JINDO, urand(4000, 12000));
|
||||
break;
|
||||
case EVENT_TELEPORT: // Possible HACK
|
||||
case EVENT_TELEPORT:
|
||||
// Teleports a random player and spawns 9 Sacrificed Trolls to attack player
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
DoTeleportPlayer(target, TeleportLoc.m_positionX, TeleportLoc.m_positionY, TeleportLoc.m_positionZ, TeleportLoc.m_orientation);
|
||||
DoTeleportPlayer(target, TeleportLoc.GetPositionX(), TeleportLoc.GetPositionY(), TeleportLoc.GetPositionZ(), TeleportLoc.GetOrientation());
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
Creature* SacrificedTroll;
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX()+2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX()-2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX()+4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX()-4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX(), target->GetPositionY()+2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX(), target->GetPositionY()-2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX(), target->GetPositionY()+4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX(), target->GetPositionY()-4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
|
||||
// Summon a formation of trolls
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
if (Creature* SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, Formation[i].GetPositionX(), Formation[i].GetPositionY(), Formation[i].GetPositionZ(), Formation[i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_TELEPORT, urand(15000, 23000));
|
||||
break;
|
||||
@@ -182,15 +165,11 @@ class boss_jindo : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
//Healing Ward
|
||||
// Healing Ward
|
||||
class npc_healing_ward : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_healing_ward()
|
||||
: CreatureScript("npc_healing_ward")
|
||||
{
|
||||
}
|
||||
npc_healing_ward() : CreatureScript("npc_healing_ward") { }
|
||||
|
||||
struct npc_healing_wardAI : public ScriptedAI
|
||||
{
|
||||
@@ -200,7 +179,6 @@ class npc_healing_ward : public CreatureScript
|
||||
}
|
||||
|
||||
uint32 Heal_Timer;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
@@ -208,18 +186,15 @@ class npc_healing_ward : public CreatureScript
|
||||
Heal_Timer = 2000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
}
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Heal_Timer
|
||||
// Heal_Timer
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO));
|
||||
if (pJindo)
|
||||
DoCast(pJindo, SPELL_HEAL);
|
||||
if (Unit* jindo = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JINDO)))
|
||||
DoCast(jindo, SPELL_HEAL);
|
||||
Heal_Timer = 3000;
|
||||
} else Heal_Timer -= diff;
|
||||
|
||||
@@ -237,11 +212,7 @@ class npc_healing_ward : public CreatureScript
|
||||
class npc_shade_of_jindo : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_shade_of_jindo()
|
||||
: CreatureScript("npc_shade_of_jindo")
|
||||
{
|
||||
}
|
||||
npc_shade_of_jindo() : CreatureScript("npc_shade_of_jindo") { }
|
||||
|
||||
struct npc_shade_of_jindoAI : public ScriptedAI
|
||||
{
|
||||
@@ -259,8 +230,7 @@ class npc_shade_of_jindo : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
|
||||
//ShadowShock_Timer
|
||||
// ShadowShock_Timer
|
||||
if (ShadowShock_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_SHADOWSHOCK);
|
||||
|
||||
@@ -37,7 +37,8 @@ enum Says
|
||||
SAY_WATCH = 2,
|
||||
SAY_WATCH_WHISPER = 3,
|
||||
SAY_OHGAN_DEAD = 4,
|
||||
SAY_GRATS_JINDO = 0,
|
||||
|
||||
SAY_GRATS_JINDO = 0
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -106,7 +107,8 @@ Position const PosMandokir[2] =
|
||||
|
||||
class boss_mandokir : public CreatureScript
|
||||
{
|
||||
public: boss_mandokir() : CreatureScript("boss_mandokir") { }
|
||||
public:
|
||||
boss_mandokir() : CreatureScript("boss_mandokir") { }
|
||||
|
||||
struct boss_mandokirAI : public BossAI
|
||||
{
|
||||
@@ -118,9 +120,9 @@ class boss_mandokir : public CreatureScript
|
||||
{
|
||||
_Reset();
|
||||
killCount = 0;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
events.ScheduleEvent(EVENT_CHECK_START, 1000);
|
||||
if (Creature* speaker = Creature::GetCreature(*me, instance->GetData64(NPC_VILEBRANCH_SPEAKER)))
|
||||
if (Creature* speaker = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_VILEBRANCH_SPEAKER)))
|
||||
if (!speaker->IsAlive())
|
||||
speaker->Respawn(true);
|
||||
}
|
||||
@@ -132,7 +134,7 @@ class boss_mandokir : public CreatureScript
|
||||
{
|
||||
// Do not want to unsummon Ohgan
|
||||
for (int i = 0; i < CHAINED_SPIRT_COUNT; ++i)
|
||||
if (Creature* unsummon = Creature::GetCreature(*me, chainedSpirtGUIDs[i]))
|
||||
if (Creature* unsummon = ObjectAccessor::GetCreature(*me, chainedSpirtGUIDs[i]))
|
||||
unsummon->DespawnOrUnsummon();
|
||||
instance->SetBossState(DATA_MANDOKIR, DONE);
|
||||
instance->SaveToDB();
|
||||
@@ -169,7 +171,7 @@ class boss_mandokir : public CreatureScript
|
||||
if (++killCount == 3)
|
||||
{
|
||||
Talk(SAY_DING_KILL);
|
||||
if (Creature* jindo = Creature::GetCreature(*me, instance->GetData64(DATA_JINDO)))
|
||||
if (Creature* jindo = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_JINDO)))
|
||||
if (jindo->IsAlive())
|
||||
jindo->AI()->Talk(SAY_GRATS_JINDO);
|
||||
DoCast(me, SPELL_LEVEL_UP, true);
|
||||
@@ -213,7 +215,7 @@ class boss_mandokir : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CHECK_START, 1000);
|
||||
break;
|
||||
case EVENT_STARTED:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->GetMotionMaster()->MovePath(PATH_MANDOKIR, false);
|
||||
break;
|
||||
default:
|
||||
@@ -293,7 +295,8 @@ enum OhganSpells
|
||||
|
||||
class npc_ohgan : public CreatureScript
|
||||
{
|
||||
public: npc_ohgan() : CreatureScript("npc_ohgan") { }
|
||||
public:
|
||||
npc_ohgan() : CreatureScript("npc_ohgan") { }
|
||||
|
||||
struct npc_ohganAI : public ScriptedAI
|
||||
{
|
||||
@@ -345,7 +348,8 @@ enum VilebranchSpells
|
||||
|
||||
class npc_vilebranch_speaker : public CreatureScript
|
||||
{
|
||||
public: npc_vilebranch_speaker() : CreatureScript("npc_vilebranch_speaker") { }
|
||||
public:
|
||||
npc_vilebranch_speaker() : CreatureScript("npc_vilebranch_speaker") { }
|
||||
|
||||
struct npc_vilebranch_speakerAI : public ScriptedAI
|
||||
{
|
||||
|
||||
@@ -29,10 +29,10 @@ EndScriptData */
|
||||
|
||||
enum Says
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_TRANSFORM = 1,
|
||||
SAY_SPIDER_SPAWN = 2,
|
||||
SAY_DEATH = 3
|
||||
SAY_AGGRO = 0,
|
||||
SAY_TRANSFORM = 1,
|
||||
SAY_SPIDER_SPAWN = 2,
|
||||
SAY_DEATH = 3
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -64,6 +64,11 @@ enum Phases
|
||||
PHASE_THREE = 3
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_SPIDER = 15041
|
||||
};
|
||||
|
||||
class boss_marli : public CreatureScript
|
||||
{
|
||||
public: boss_marli() : CreatureScript("boss_marli") { }
|
||||
@@ -107,23 +112,12 @@ class boss_marli : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SPAWN_START_SPIDERS:
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Talk(SAY_SPIDER_SPAWN);
|
||||
Creature* Spider = NULL;
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (Creature* spider = me->SummonCreature(NPC_SPIDER, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
spider->AI()->AttackStart(target);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ASPECT_OF_MARLI, 12000, 0, PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_TRANSFORM, 45000, 0, PHASE_TWO);
|
||||
@@ -142,11 +136,8 @@ class boss_marli : public CreatureScript
|
||||
break;
|
||||
case EVENT_SPAWN_SPIDER:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
}
|
||||
if (Creature* spider = me->SummonCreature(NPC_SPIDER, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
spider->AI()->AttackStart(target);
|
||||
events.ScheduleEvent(EVENT_SPAWN_SPIDER, urand(12000, 17000));
|
||||
break;
|
||||
case EVENT_TRANSFORM:
|
||||
@@ -235,9 +226,7 @@ class npc_spawn_of_marli : public CreatureScript
|
||||
LevelUp_Timer = 3000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
}
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -40,7 +40,8 @@ enum Misc
|
||||
|
||||
class boss_renataki : public CreatureScript
|
||||
{
|
||||
public: boss_renataki() : CreatureScript("boss_renataki") { }
|
||||
public:
|
||||
boss_renataki() : CreatureScript("boss_renataki") { }
|
||||
|
||||
struct boss_renatakiAI : public BossAI
|
||||
{
|
||||
@@ -101,9 +102,7 @@ class boss_renataki : public CreatureScript
|
||||
{
|
||||
if (Ambush_Timer <= diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
DoCast(target, SPELL_AMBUSH);
|
||||
@@ -135,14 +134,12 @@ class boss_renataki : public CreatureScript
|
||||
{
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
DoModifyThreatPercent(me->GetVictim(), -50);
|
||||
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
DoModifyThreatPercent(me->GetVictim(), -50);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
Aggro_Timer = urand(7000, 20000);
|
||||
} else Aggro_Timer -= diff;
|
||||
|
||||
@@ -78,7 +78,8 @@ enum Phases
|
||||
|
||||
class boss_thekal : public CreatureScript
|
||||
{
|
||||
public: boss_thekal() : CreatureScript("boss_thekal") { }
|
||||
public:
|
||||
boss_thekal() : CreatureScript("boss_thekal") { }
|
||||
|
||||
struct boss_thekalAI : public BossAI
|
||||
{
|
||||
@@ -171,7 +172,7 @@ class boss_thekal : public CreatureScript
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->setFaction(14);
|
||||
@@ -184,7 +185,7 @@ class boss_thekal : public CreatureScript
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->setFaction(14);
|
||||
@@ -318,8 +319,8 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
//Casting Greaterheal to Thekal or Zath if they are in meele range.
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
|
||||
if (!pThekal || !pZath)
|
||||
return;
|
||||
@@ -352,7 +353,7 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -364,7 +365,7 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
if (instance->GetBossState(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -405,11 +406,7 @@ class npc_zealot_lorkhan : public CreatureScript
|
||||
class npc_zealot_zath : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_zealot_zath()
|
||||
: CreatureScript("npc_zealot_zath")
|
||||
{
|
||||
}
|
||||
npc_zealot_zath() : CreatureScript("npc_zealot_zath") { }
|
||||
|
||||
struct npc_zealot_zathAI : public ScriptedAI
|
||||
{
|
||||
@@ -500,7 +497,7 @@ class npc_zealot_zath : public CreatureScript
|
||||
if (instance->GetBossState(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -512,7 +509,7 @@ class npc_zealot_zath : public CreatureScript
|
||||
if (instance->GetBossState(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -85,7 +85,8 @@ enum NPCs
|
||||
|
||||
class boss_venoxis : public CreatureScript
|
||||
{
|
||||
public: boss_venoxis() : CreatureScript("boss_venoxis") { }
|
||||
public:
|
||||
boss_venoxis() : CreatureScript("boss_venoxis") { }
|
||||
|
||||
struct boss_venoxisAI : public BossAI
|
||||
{
|
||||
@@ -167,7 +168,6 @@ class boss_venoxis : public CreatureScript
|
||||
DoCast(me, SPELL_THRASH, true);
|
||||
events.ScheduleEvent(EVENT_THRASH, urand(10000, 20000));
|
||||
break;
|
||||
|
||||
// troll form spells and Actions (first part)
|
||||
case EVENT_DISPEL_MAGIC:
|
||||
DoCast(me, SPELL_DISPEL_MAGIC);
|
||||
|
||||
@@ -41,7 +41,8 @@ enum Events
|
||||
|
||||
class boss_wushoolay : public CreatureScript
|
||||
{
|
||||
public: boss_wushoolay() : CreatureScript("boss_wushoolay") { }
|
||||
public:
|
||||
boss_wushoolay() : CreatureScript("boss_wushoolay") { }
|
||||
|
||||
struct boss_wushoolayAI : public BossAI
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user