Scripts/RazorfenKraul: Fix force field before boss Agathelos the Raging
Closes #712
This commit is contained in:
@@ -43,13 +43,11 @@ public:
|
||||
instance_razorfen_kraul_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
|
||||
uint64 DoorWardGUID;
|
||||
uint32 WardCheck_Timer;
|
||||
int WardKeeperAlive;
|
||||
int WardKeeperDeath;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
WardKeeperAlive = 1;
|
||||
WardCheck_Timer = 4000;
|
||||
WardKeeperDeath = 0;
|
||||
DoorWardGUID = 0;
|
||||
}
|
||||
|
||||
@@ -73,29 +71,25 @@ public:
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 21099: DoorWardGUID = go->GetGUID(); break;
|
||||
case 21099: DoorWardGUID = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void Update(uint32 diff)
|
||||
void Update(uint32 /*diff*/)
|
||||
{
|
||||
if (WardCheck_Timer <= diff)
|
||||
{
|
||||
HandleGameObject(DoorWardGUID, WardKeeperAlive);
|
||||
WardKeeperAlive = 0;
|
||||
WardCheck_Timer = 4000;
|
||||
}else
|
||||
WardCheck_Timer -= diff;
|
||||
if (WardKeeperDeath == WARD_KEEPERS_NR)
|
||||
if(GameObject* pGo = instance->GetGameObject(DoorWardGUID))
|
||||
{
|
||||
pGo->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_WARD_KEEPERS:
|
||||
if (data == NOT_STARTED)
|
||||
WardKeeperAlive = 1;
|
||||
break;
|
||||
case EVENT_WARD_KEEPER: WardKeeperDeath++; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ EndContentData */
|
||||
|
||||
#define QUEST_WILLIX_THE_IMPORTER 1144
|
||||
#define ENTRY_BOAR 4514
|
||||
#define SPELL_QUILLBOAR_CHANNELING 7083
|
||||
|
||||
class npc_willix : public CreatureScript
|
||||
{
|
||||
@@ -146,54 +145,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class npc_deaths_head_ward_keeper : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_deaths_head_ward_keeper() : CreatureScript("npc_deaths_head_ward_keeper") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_deaths_head_ward_keeperAI(pCreature);
|
||||
}
|
||||
|
||||
struct npc_deaths_head_ward_keeperAI : public ScriptedAI
|
||||
{
|
||||
npc_deaths_head_ward_keeperAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript *pInstance;
|
||||
uint32 QuillboarChanneling_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
QuillboarChanneling_Timer = 1500;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!me->isAlive())
|
||||
return;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_WARD_KEEPERS, NOT_STARTED);
|
||||
|
||||
if (QuillboarChanneling_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
DoCast(me, SPELL_QUILLBOAR_CHANNELING);
|
||||
QuillboarChanneling_Timer = 1100;
|
||||
} else QuillboarChanneling_Timer -= diff;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_razorfen_kraul()
|
||||
{
|
||||
new npc_willix();
|
||||
new npc_deaths_head_ward_keeper();
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
#ifndef DEF_RAZORFEN_KRAUL_H
|
||||
#define DEF_RAZORFEN_KRAUL_H
|
||||
|
||||
#define TYPE_WARD_KEEPERS 1
|
||||
#define EVENT_WARD_KEEPER 1
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user