mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/DalaranLegion: Implement Quest: "Weapons of Legend" (Hunter) (#31099)
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
|
||||
// This is where scripts' loading functions should be declared:
|
||||
|
||||
void AddSC_zone_dalaran_broken_isle();
|
||||
void AddSC_zone_mardum();
|
||||
|
||||
// Maw of Souls
|
||||
void AddSC_boss_ymiron_the_fallen_king();
|
||||
void AddSC_instance_maw_of_souls();
|
||||
@@ -31,12 +34,14 @@ void AddSC_instance_black_rook_hold();
|
||||
|
||||
// Orderhalls
|
||||
void AddSC_orderhall_warrior();
|
||||
void AddSC_zone_mardum();
|
||||
|
||||
// The name of this function should match:
|
||||
// void Add${NameOfDirectory}Scripts()
|
||||
void AddBrokenIslesScripts()
|
||||
{
|
||||
AddSC_zone_dalaran_broken_isle();
|
||||
AddSC_zone_mardum();
|
||||
|
||||
// Maw of Souls
|
||||
AddSC_boss_ymiron_the_fallen_king();
|
||||
AddSC_instance_maw_of_souls();
|
||||
@@ -49,6 +54,6 @@ void AddBrokenIslesScripts()
|
||||
AddSC_boss_amalgam_of_souls();
|
||||
AddSC_instance_black_rook_hold();
|
||||
|
||||
// Orderhalls
|
||||
AddSC_orderhall_warrior();
|
||||
AddSC_zone_mardum();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "PlayerChoice.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
@@ -66,7 +67,7 @@ enum OrderCampaignDalaranIntro
|
||||
// 224240 - 7.0 Order Campaign - Dalaran Aura
|
||||
class spell_dalaran_order_campaign_intro_aura : public AuraScript
|
||||
{
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/) const
|
||||
{
|
||||
Player* player = Object::ToPlayer(GetCaster());
|
||||
if (!player)
|
||||
@@ -157,8 +158,41 @@ class spell_dalaran_order_campaign_intro_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum WeaponsOfLegendHunter
|
||||
{
|
||||
// Spells
|
||||
SPELL_FORCE_BEAST_MASTERY_SPEC = 198433,
|
||||
SPELL_FORCE_SURVIVAL_SPEC = 198435,
|
||||
SPELL_FORCE_MARKSMANSHIP_SPEC = 198436,
|
||||
|
||||
// Playerchoice
|
||||
PLAYERCHOICE_RESPONSE_CHOOSE_BEAST_MASTERY_WEAPON = 504,
|
||||
PLAYERCHOICE_RESPONSE_CHOOSE_SURVIVAL_WEAPON = 505,
|
||||
PLAYERCHOICE_RESPONSE_CHOOSE_MARKSMANSHIP_WEAPON = 506,
|
||||
};
|
||||
|
||||
// 240 - Playerchoice
|
||||
class playerchoice_weapons_of_legend_hunter : public PlayerChoiceScript
|
||||
{
|
||||
public:
|
||||
playerchoice_weapons_of_legend_hunter() : PlayerChoiceScript("playerchoice_weapons_of_legend_hunter") {}
|
||||
|
||||
void OnResponse(WorldObject* /*object*/, Player* player, PlayerChoice const* /*choice*/, PlayerChoiceResponse const* response, uint16 /*clientIdentifier*/) override
|
||||
{
|
||||
if (response->ResponseId == PLAYERCHOICE_RESPONSE_CHOOSE_BEAST_MASTERY_WEAPON)
|
||||
player->CastSpell(player, SPELL_FORCE_BEAST_MASTERY_SPEC, CastSpellExtraArgsInit{ .TriggerFlags = TRIGGERED_FULL_MASK });
|
||||
else if (response->ResponseId == PLAYERCHOICE_RESPONSE_CHOOSE_SURVIVAL_WEAPON)
|
||||
player->CastSpell(player, SPELL_FORCE_SURVIVAL_SPEC, CastSpellExtraArgsInit{ .TriggerFlags = TRIGGERED_FULL_MASK });
|
||||
else if (response->ResponseId == PLAYERCHOICE_RESPONSE_CHOOSE_MARKSMANSHIP_WEAPON)
|
||||
player->CastSpell(player, SPELL_FORCE_MARKSMANSHIP_SPEC, CastSpellExtraArgsInit{ .TriggerFlags = TRIGGERED_FULL_MASK });
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_zone_dalaran_broken_isle()
|
||||
{
|
||||
// Playerchoice
|
||||
new playerchoice_weapons_of_legend_hunter();
|
||||
|
||||
// Spellscripts
|
||||
RegisterSpellScript(spell_dalaran_order_campaign_intro_aura);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user