mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/Quest): improve Securing the Celestial Ridge (#17847)
* fix(Scripts/Quest): improve Securing the Celestial Ridge * update
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 18544);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(18544, 0, 0, 0, 1, 0, 100, 257, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 3832.74, 1448.12, -138.4, 0, 'Veraku - Out of Combat - Move To Position'),
|
||||
(18544, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 0, 'Veraku - On Just Summoned - Start Attacking');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_challenge_veraku';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(34895, 'spell_challenge_veraku');
|
||||
@@ -950,6 +950,37 @@ class spell_q10190_battery_recharging_blaster_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum Veraku
|
||||
{
|
||||
NPC_VERAKU = 18544,
|
||||
SPELL_CHALLENGE_VERAKU = 34895
|
||||
};
|
||||
|
||||
class spell_challenge_veraku : public SpellScript
|
||||
{
|
||||
public:
|
||||
PrepareSpellScript(spell_challenge_veraku);
|
||||
|
||||
bool Validate(SpellInfo const* /*SpellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_CHALLENGE_VERAKU });
|
||||
}
|
||||
|
||||
SpellCastResult CheckRequirement()
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* veraku = caster->FindNearestCreature(NPC_VERAKU, 100.0f))
|
||||
if (!veraku->HasAura(SPELL_CHALLENGE_VERAKU))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_challenge_veraku::CheckRequirement);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_netherstorm()
|
||||
{
|
||||
// Ours
|
||||
@@ -962,5 +993,6 @@ void AddSC_netherstorm()
|
||||
new npc_bessy();
|
||||
new npc_maxx_a_million_escort();
|
||||
RegisterSpellAndAuraScriptPair(spell_q10190_battery_recharging_blaster, spell_q10190_battery_recharging_blaster_aura);
|
||||
RegisterSpellScript(spell_challenge_veraku);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user