EverWrath/src/server/scripts/Kalimdor/zone_feralas.cpp
The GhostRider 3186edc568
fix(DB/SAI): Shay Leafrunner (#16454)
* fix(DB/SAI): Wandering-Shay-Quest

* fix(DB/SAI): Wandering-Shay-Quest

* Update rev_1685747385631953200.sql

* Update rev_1685747385631953200.sql

---------

Co-authored-by: dario strani <xspid@lastrevenge.ddns.net>
2023-06-25 23:43:59 -03:00

72 lines
2.1 KiB
C++

/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Feralas
SD%Complete: 100
SDComment: Quest support: 3520 Special vendor Gregan Brewspewer
SDCategory: Feralas
EndScriptData */
#include "Group.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "SpellScript.h"
enum GordunniTrap
{
GO_GORDUNNI_DIRT_MOUND = 144064,
};
class spell_gordunni_trap : public SpellScriptLoader
{
public:
spell_gordunni_trap() : SpellScriptLoader("spell_gordunni_trap") { }
class spell_gordunni_trap_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gordunni_trap_SpellScript);
void HandleDummy()
{
if (Unit* caster = GetCaster())
if (GameObject* chest = caster->SummonGameObject(GO_GORDUNNI_DIRT_MOUND, caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0))
{
chest->SetSpellId(GetSpellInfo()->Id);
caster->RemoveGameObject(chest, false);
}
}
void Register() override
{
OnCast += SpellCastFn(spell_gordunni_trap_SpellScript::HandleDummy);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_gordunni_trap_SpellScript();
}
};
void AddSC_feralas()
{
new spell_gordunni_trap();
}