TrinityCore
arathi_basin.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 "Map.h"
19#include "MotionMaster.h"
20#include "ScriptMgr.h"
21#include "ScriptedCreature.h"
22#include "SpellScript.h"
23
25{
28};
29
30// 150513 - Arathor Gryphon Rider
31// 150459 - Defiler Bat Rider
32template<uint32 Path>
34{
36
37 void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
38 {
39 if (pathId != Path)
40 return;
41
42 // despawn formation group
43 std::list<Creature*> followers;
45 for (Creature* follower : followers)
46 follower->DespawnOrUnsummon(500ms);
47
48 me->DespawnOrUnsummon(500ms);
49 }
50};
51
52// 261985 - Blacksmith Working
54{
55 static constexpr uint32 ITEM_BLACKSMITH_HAMMER = 5956;
56
57 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
58 {
60 }
61
62 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
63 {
64 if (Creature* creature = GetTarget()->ToCreature())
65 creature->LoadEquipment(creature->GetOriginalEquipmentId());
66 }
67
68 void Register() override
69 {
72 }
73};
74
76{
79
81}
uint32_t uint32
Definition: Define.h:142
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
@ EFFECT_0
Definition: SharedDefines.h:30
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
void AddSC_arathi_basin()
ArathiBasinGryphonBatRiderLeaderData
@ PATH_BAT_RIDER_LEADER
@ PATH_GRYPHON_RIDER_LEADER
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetTarget() const
Creature *const me
Definition: CreatureAI.h:61
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
uint32 GetEntry() const
Definition: Object.h:161
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
Definition: Unit.cpp:13604
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition: Object.cpp:3312
void OnApply(AuraEffect const *, AuraEffectHandleModes)
static constexpr uint32 ITEM_BLACKSMITH_HAMMER
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void WaypointPathEnded(uint32, uint32 pathId) override
npc_bg_ab_gryphon_bat_rider_leader(Creature *creature)