TrinityCore
Loading...
Searching...
No Matches
zone_dustwallow_marsh.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 "Player.h"
20#include "SpellInfo.h"
21#include "SpellScript.h"
22
27
28// 42489 - Cast Ooze Zap When Energized
57
58// 42485 - End of Ooze Channel
60{
62
63 bool Validate(SpellInfo const* /*spellInfo*/) override
64 {
66 }
67
69 {
71 if (Player* player = GetCaster()->ToPlayer())
72 player->CastSpell(player, SPELL_OOZE_CHANNEL_CREDIT, true);
74 }
75
80};
81
82// 42492 - Cast Energized
84{
86
87 void FilterTargets(std::list<WorldObject*>& targets)
88 {
89 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
90 {
91 if ((*itr)->GetTypeId() == TYPEID_PLAYER && (*itr)->ToPlayer()->GetQuestStatus(GetEffectInfo(EFFECT_1).CalcValue()) == QUEST_STATUS_INCOMPLETE)
92 ++itr;
93 else
94 targets.erase(itr++);
95 }
96 targets.push_back(GetCaster());
97 }
98
100 {
101 PreventHitDefaultEffect(effIndex);
103 }
104
111};
112
113/*######
114## Quest 11140: Recover the Cargo!
115######*/
116
122
123// 42287 - Salvage Wreckage
143
144/*######
145## Quest 11142: Survey Alcaz Island
146######*/
147
152
153// 42385 - Alcaz Survey Aura
173
uint32_t uint32
Definition Define.h:133
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:107
bool roll_chance_i(int chance)
Definition Random.h:59
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_SRC_AREA_ENTRY
SpellCastResult
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_CAST_OK
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_DUMMY
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
HookList< EffectApplyHandler > AfterEffectRemove
Unit * GetTarget() const
HookList< CheckCastHandler > OnCheckCast
Unit * GetCaster() const
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Unit * GetExplTargetUnit() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void KillSelf(bool durabilityLoss=true)
Definition Unit.h:1023
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_dustwallow_marsh_alcaz_survey_aura)
PrepareSpellScript(spell_dustwallow_marsh_salvage_wreckage)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_energize_aoe)
void HandleScript(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex effIndex)
PrepareSpellScript(spell_ooze_zap_channel_end)
bool Validate(SpellInfo const *) override
void Register() override
PrepareSpellScript(spell_ooze_zap)
void HandleDummy(SpellEffIndex effIndex)
SpellCastResult CheckRequirement()
@ SPELL_OOZE_CHANNEL_CREDIT
void AddSC_dustwallow_marsh()
@ SPELL_ALCAZ_SURVEY_CREDIT
@ SPELL_SUMMON_BURROWER
@ SPELL_SUMMON_LOCKBOX