TrinityCore
Loading...
Searching...
No Matches
zone_dalaran_broken_isle.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "ScriptMgr.h"
19#include "Conversation.h"
20#include "ConversationAI.h"
21#include "ObjectAccessor.h"
22#include "Player.h"
23#include "PlayerChoice.h"
24#include "ScriptedCreature.h"
25#include "SpellAuras.h"
26#include "SpellScript.h"
27
69
70// 224240 - 7.0 Order Campaign - Dalaran Aura
72{
73 void HandlePeriodic(AuraEffect const* /*aurEff*/) const
74 {
76 if (!player)
77 return;
78
79 switch (player->GetClass())
80 {
81 case CLASS_WARRIOR:
82 {
84 player->CastSpell(nullptr, SPELL_SUMMON_DALTON_WARRIOR, true);
86 player->CastSpell(nullptr, SPELL_SUMMON_EITRIGG_WARRIOR, true);
87 break;
88 }
89 case CLASS_HUNTER:
90 {
92 player->CastSpell(nullptr, SPELL_SUMMON_SNOWFEATHER_HUNTER, true);
93 break;
94 }
95 case CLASS_MAGE:
96 {
98 player->CastSpell(nullptr, SPELL_MAGE_ORDER_FORMATION, true);
99 break;
100 }
101 case CLASS_ROGUE:
102 {
104 player->CastSpell(nullptr, SPELL_SUMMON_RAVENHOLDT_COURIER_ROGUE, true);
105 break;
106 }
107 case CLASS_PRIEST:
108 {
110 player->CastSpell(nullptr, SPELL_A_SUMMON_MESSENGER_PRIEST, true);
112 player->CastSpell(nullptr, SPELL_H_SUMMON_MESSENGER_PRIEST, true);
113 break;
114 }
115 case CLASS_WARLOCK:
116 {
118 player->CastSpell(nullptr, SPELL_SUMMON_RYSSTINS_PORTAL_WARLOCK, true);
119 break;
120 }
121 case CLASS_PALADIN:
122 {
124 player->CastSpell(nullptr, SPELL_SUMMON_MAXWELL_TYROSUS_PALADIN, true);
125 break;
126 }
127 case CLASS_DRUID:
128 {
130 player->CastSpell(nullptr, SPELL_SUMMON_RUNETOTEM_DRUID, true);
131 break;
132 }
133 case CLASS_MONK:
134 {
136 player->CastSpell(nullptr, SPELL_SUMMON_DA_NEL_MONK, true);
137 break;
138 }
140 {
142 player->CastSpell(nullptr, SPELL_SUMMON_KORVAS_DH, true);
144 player->CastSpell(nullptr, SPELL_SUMMON_KORVAS_DH, true);
145 break;
146 }
148 {
150 player->CastSpell(nullptr, SPELL_AN_AUDIENCE_WITH_THE_KING, true);
151 break;
152 }
153 default:
154 break;
155 }
156 }
157
162};
163
176
177// 240 - Playerchoice
193
202
203// 1100 - Conversation
205{
206public:
208
209 void OnCreate(Unit* creator) override
210 {
211 Creature* ravenholdCurier = creator->FindNearestCreatureWithOptions(20.0f, { .CreatureId = NPC_SUMMON_RAVENHOLD_COURIER, .IgnorePhases = true, .OwnerGuid = creator->GetGUID() });
212 if (!ravenholdCurier)
213 return;
214
217 }
218};
219
220// 201253 - Sealed Letter
236
uint16_t uint16
Definition Define.h:155
@ QUEST_STATUS_REWARDED
Definition QuestDef.h:153
@ QUEST_STATUS_NONE
Definition QuestDef.h:147
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
#define RegisterConversationAI(ai_name)
Definition ScriptMgr.h:1437
@ EFFECT_0
@ CLASS_HUNTER
@ CLASS_DRUID
@ CLASS_MONK
@ CLASS_PRIEST
@ CLASS_WARRIOR
@ CLASS_WARLOCK
@ CLASS_MAGE
@ CLASS_DEATH_KNIGHT
@ CLASS_DEMON_HUNTER
@ CLASS_PALADIN
@ CLASS_ROGUE
@ TEAM_ALLIANCE
@ TEAM_HORDE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_EXPIRE
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
Unit * GetCaster() const
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
Conversation *const conversation
ConversationAI(Conversation *c, uint32 scriptId={}) noexcept
void AddActor(int32 actorId, uint32 actorIdx, ObjectGuid const &actorGuid)
Player * ToPlayer()
Definition Object.h:126
TeamId GetTeamId() const
Definition Player.h:2424
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15962
Definition Unit.h:635
uint8 GetClass() const
Definition Unit.h:764
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
Definition Object.cpp:1526
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
void OnResponse(WorldObject *, Player *player, PlayerChoice const *, PlayerChoiceResponse const *response, uint16) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes) const
TriggerCastFlags TriggerFlags
@ CONVO_ACTOR_SUMMON_COURIER
@ SPELL_SEALED_LETTER_CREDIT
@ NPC_SUMMON_RAVENHOLD_COURIER
void AddSC_zone_dalaran_broken_isle()
@ QUEST_NEEDS_OF_THE_HUNTER
@ SPELL_SUMMON_DALTON_WARRIOR
@ SPELL_SUMMON_RYSSTINS_PORTAL_WARLOCK
@ SPELL_SUMMON_DA_NEL_MONK
@ SPELL_SUMMON_RUNETOTEM_DRUID
@ SPELL_AN_AUDIENCE_WITH_THE_KING
@ QUEST_A_NEW_DIRECTION_JAYCE
@ SPELL_MAGE_ORDER_FORMATION
@ QUEST_CALL_OF_THE_ILLIDARI_ALTRUIS
@ SPELL_SUMMON_EITRIGG_WARRIOR
@ SPELL_A_SUMMON_MESSENGER_PRIEST
@ QUEST_AN_URGENT_GATHERING
@ QUEST_CALL_OF_THE_ILLIDARI_JAYCE
@ QUEST_A_NEW_DIRECTION_ALTRUIS
@ QUEST_A_SUMMONS_FROM_MOONGLADE
@ SPELL_SUMMON_RYSSTINS_WARLOCK
@ QUEST_CALL_OF_THE_UNCROWNED
@ QUEST_AN_IMPORTANT_MISSION
@ SPELL_SUMMON_MAXWELL_TYROSUS_PALADIN
@ SPELL_SUMMON_SNOWFEATHER_HUNTER
@ SPELL_SUMMON_RAVENHOLDT_COURIER_ROGUE
@ SPELL_H_SUMMON_MESSENGER_PRIEST
@ SPELL_FORCE_BEAST_MASTERY_SPEC
@ SPELL_FORCE_MARKSMANSHIP_SPEC
@ PLAYERCHOICE_RESPONSE_CHOOSE_SURVIVAL_WEAPON
@ SPELL_FORCE_SURVIVAL_SPEC
@ PLAYERCHOICE_RESPONSE_CHOOSE_MARKSMANSHIP_WEAPON
@ PLAYERCHOICE_RESPONSE_CHOOSE_BEAST_MASTERY_WEAPON