mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-03 07:37:11 +01:00
Scripts/RazorfenKraul: Fix force field before boss Agathelos the Raging
Closes #712
This commit is contained in:
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry` = 4625;
|
||||
4
sql/updates/world/2011_05_15_01_world_smart_scripts.sql
Normal file
4
sql/updates/world/2011_05_15_01_world_smart_scripts.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 4625 AND `source_type` = 0 AND `id` IN (0,1);
|
||||
INSERT INTO `smart_scripts` VALUES
|
||||
(4625,0,0,0,1,0,100,3,0,1100,0,1100,11,7083,2,0,0,0,0,1,0,0,0,0,0,0,0,'Ward Keepers - Cast the Guard Spell'),
|
||||
(4625,0,1,0,6,0,100,2,0,0,0,0,34,1,1,0,0,0,0,0,0,0,0,0,0,0,0,'Ward Keepers - Send Event on Die');
|
||||
@@ -298,6 +298,7 @@ void AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs
|
||||
void AddSC_razorfen_downs();
|
||||
void AddSC_instance_razorfen_downs();
|
||||
void AddSC_razorfen_kraul(); //Razorfen Kraul
|
||||
void AddSC_instance_razorfen_kraul();
|
||||
void AddSC_boss_kurinnaxx(); //Ruins of ahn'qiraj
|
||||
void AddSC_boss_rajaxx();
|
||||
void AddSC_boss_moam();
|
||||
@@ -901,6 +902,7 @@ void AddKalimdorScripts()
|
||||
AddSC_razorfen_downs();
|
||||
AddSC_instance_razorfen_downs();
|
||||
AddSC_razorfen_kraul(); //Razorfen Kraul
|
||||
AddSC_instance_razorfen_kraul();
|
||||
AddSC_boss_kurinnaxx(); //Ruins of ahn'qiraj
|
||||
AddSC_boss_rajaxx();
|
||||
AddSC_boss_moam();
|
||||
|
||||
@@ -1511,7 +1511,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this);
|
||||
}
|
||||
// and duration of auras affected by SPELL_AURA_PERIODIC_HASTE
|
||||
else if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || (m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION))
|
||||
else if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
duration = int32(duration * m_originalCaster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
|
||||
if (duration != m_spellAura->GetMaxDuration())
|
||||
|
||||
@@ -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