mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/Quest): Fires Over Skettis (#19567)
* fix(Scripts/Quest): Fires Over Skettis * Update spell_item.cpp ---------
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_skyguard_blasting_charges';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||||
|
(39844, 'spell_item_skyguard_blasting_charges');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 39844) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 30) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 185549) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 0);
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(17, 0, 39844, 0, 0, 30, 0, 185549, 30, 0, 0, 0, 0, '', ' Launch a blasting charge from your flying mount at monstrous kaliri eggs.');
|
||||||
@@ -4051,6 +4051,46 @@ class spell_item_gor_dreks_ointment : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Skettis
|
||||||
|
{
|
||||||
|
QUEST_FIRES_OVER_SKETTIS = 11008
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_item_skyguard_blasting_charges : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_item_skyguard_blasting_charges);
|
||||||
|
|
||||||
|
void HandleOpenObject(SpellEffIndex effIndex)
|
||||||
|
{
|
||||||
|
PreventHitDefaultEffect(effIndex);
|
||||||
|
if (GameObject* go = GetHitGObj())
|
||||||
|
go->UseDoorOrButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||||
|
{
|
||||||
|
if (Unit* kaliri = GetHitUnit())
|
||||||
|
kaliri->ToCreature()->DespawnOrUnsummon(0s, 30s);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellCastResult CheckQuest()
|
||||||
|
{
|
||||||
|
if (Player* playerCaster = GetCaster()->ToPlayer())
|
||||||
|
{
|
||||||
|
if (playerCaster->GetQuestStatus(QUEST_FIRES_OVER_SKETTIS) == QUEST_STATUS_INCOMPLETE)
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
}
|
||||||
|
return SPELL_FAILED_DONT_REPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_item_skyguard_blasting_charges::HandleOpenObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT);
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_item_skyguard_blasting_charges::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
|
OnCheckCast += SpellCheckCastFn(spell_item_skyguard_blasting_charges::CheckQuest);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_item_spell_scripts()
|
void AddSC_item_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||||
@@ -4175,4 +4215,5 @@ void AddSC_item_spell_scripts()
|
|||||||
RegisterSpellAndAuraScriptPair(spell_item_eye_of_grillok, spell_item_eye_of_grillok_aura);
|
RegisterSpellAndAuraScriptPair(spell_item_eye_of_grillok, spell_item_eye_of_grillok_aura);
|
||||||
RegisterSpellScript(spell_item_fel_mana_potion);
|
RegisterSpellScript(spell_item_fel_mana_potion);
|
||||||
RegisterSpellScript(spell_item_gor_dreks_ointment);
|
RegisterSpellScript(spell_item_gor_dreks_ointment);
|
||||||
|
RegisterSpellScript(spell_item_skyguard_blasting_charges);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user