mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
@@ -31,6 +31,7 @@ EndContentData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
/*####
|
||||
# npc_ruul_snowhoof
|
||||
@@ -344,9 +345,42 @@ class go_naga_brazier : public GameObjectScript
|
||||
}
|
||||
};
|
||||
|
||||
enum KingoftheFoulwealdMisc
|
||||
{
|
||||
GO_BANNER = 178205
|
||||
};
|
||||
|
||||
class spell_destroy_karangs_banner : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_destroy_karangs_banner() : SpellScriptLoader("spell_destroy_karangs_banner") { }
|
||||
|
||||
class spell_destroy_karangs_banner_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_destroy_karangs_banner_SpellScript);
|
||||
|
||||
void HandleAfterCast()
|
||||
{
|
||||
if (GameObject* banner = GetCaster()->FindNearestGameObject(GO_BANNER, GetSpellInfo()->GetMaxRange(true)))
|
||||
banner->Delete();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterCast += SpellCastFn(spell_destroy_karangs_banner_SpellScript::HandleAfterCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_destroy_karangs_banner_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_ashenvale()
|
||||
{
|
||||
new npc_ruul_snowhoof();
|
||||
new npc_muglash();
|
||||
new go_naga_brazier();
|
||||
new spell_destroy_karangs_banner();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user