TrinityCore
Loading...
Searching...
No Matches
strand_of_the_ancients.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
19#include "ScriptMgr.h"
20#include "GameObject.h"
21#include "GameObjectAI.h"
22#include "Player.h"
23#include "SpellScript.h"
24#include "ZoneScript.h"
25
26// 191305 - Horde Banner
27// 191306 - Alliance Banner
28// 191307 - Horde Banner
29// 191308 - Alliance Banner
30// 191309 - Horde Banner
31// 191310 - Alliance Banner
33{
35
36 bool OnGossipHello(Player* player) override
37 {
39 return true;
40
41 if (ZoneScript* zonescript = me->GetZoneScript())
42 {
43 zonescript->DoAction(ACTION_SOTA_CAPTURE_GRAVEYARD, player, me);
44 return false;
45 }
46
47 return true;
48 }
49};
50
51// 52410 - Place Seaforium Charge
53{
59
64
65 void HandleDummy(SpellEffIndex /*effIndex*/)
66 {
67 if (Player* playerCaster = GetCaster()->ToPlayer())
68 {
69 Team const team = playerCaster->GetBGTeam();
70 if (team == ALLIANCE)
71 playerCaster->CastSpell(playerCaster, SPELL_PLACE_SEAFORIUM_CHARGE_ALLIANCE, true);
72 else if (team == HORDE)
73 playerCaster->CastSpell(playerCaster, SPELL_PLACE_SEAFORIUM_CHARGE_HORDE, true);
74 }
75 }
76
81};
82
#define RegisterGameObjectAI(ai_name)
Definition ScriptMgr.h:1410
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ ALLIANCE
@ HORDE
@ GO_FLAG_NOT_SELECTABLE
@ GO_STATE_READY
#define SpellEffectFn(F, I, N)
GameObject *const me
GOState GetGoState() const
Definition GameObject.h:284
bool HasFlag(GameObjectFlags flags) const
Definition GameObject.h:276
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHit
ZoneScript * GetZoneScript() const
Definition Object.h:417
bool Validate(SpellInfo const *) override
void AddSC_strand_of_the_ancients()
@ ACTION_SOTA_CAPTURE_GRAVEYARD
bool OnGossipHello(Player *player) override