mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 23:56:25 +00:00
fix(Scripts/ZulAman): speed up gong event (#20547)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 45217 AND `ScriptName` = 'spell_ritual_of_power';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (45217, 'spell_ritual_of_power');
|
||||
@@ -58,8 +58,9 @@ DoorData const doorData[] =
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_SPIRIT_LYNX, DATA_SPIRIT_LYNX },
|
||||
{ 0, 0 }
|
||||
{ NPC_SPIRIT_LYNX, DATA_SPIRIT_LYNX },
|
||||
{ NPC_HARRISON_JONES, DATA_HARRISON_JONES },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
ObjectData const gameObjectData[] =
|
||||
|
||||
@@ -33,6 +33,7 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
|
||||
/*######
|
||||
## npc_forest_frog
|
||||
@@ -348,6 +349,11 @@ enum Events
|
||||
GONG_EVENT_11 = 11
|
||||
};
|
||||
|
||||
enum Actions
|
||||
{
|
||||
ACTION_COMPLETE_EVENT_3 = 0,
|
||||
};
|
||||
|
||||
enum Waypoints
|
||||
{
|
||||
HARRISON_MOVE_1 = 860440,
|
||||
@@ -419,6 +425,15 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action == ACTION_COMPLETE_EVENT_3)
|
||||
{
|
||||
_gongEvent = GONG_EVENT_4;
|
||||
_gongTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_gongEvent)
|
||||
@@ -444,8 +459,6 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
case GONG_EVENT_3:
|
||||
if (GameObject* gong = _instance->GetGameObject(DATA_STRANGE_GONG))
|
||||
gong->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
_gongEvent = GONG_EVENT_4;
|
||||
_gongTimer = 105000;
|
||||
break;
|
||||
case GONG_EVENT_4:
|
||||
me->RemoveAura(SPELL_BANGING_THE_GONG);
|
||||
@@ -538,9 +551,27 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
ObjectGuid uiTargetGUID;
|
||||
};
|
||||
|
||||
class spell_ritual_of_power : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_ritual_of_power);
|
||||
|
||||
void OnEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* creature = instance->GetCreature(DATA_HARRISON_JONES))
|
||||
creature->AI()->DoAction(ACTION_COMPLETE_EVENT_3);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunch += SpellEffectFn(spell_ritual_of_power::OnEffect, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_zulaman()
|
||||
{
|
||||
RegisterZulAmanCreatureAI(npc_forest_frog);
|
||||
new npc_zulaman_hostage();
|
||||
RegisterZulAmanCreatureAI(npc_harrison_jones);
|
||||
RegisterSpellScript(spell_ritual_of_power);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ enum DataTypes
|
||||
TYPE_RAND_VENDOR_2 = 9,
|
||||
DATA_STRANGE_GONG = 10,
|
||||
DATA_MASSIVE_GATE = 11,
|
||||
DATA_HEXLORD_GATE = 12
|
||||
DATA_HEXLORD_GATE = 12,
|
||||
DATA_HARRISON_JONES = 13
|
||||
};
|
||||
|
||||
enum CreatureIds
|
||||
|
||||
Reference in New Issue
Block a user