mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/DB: Quest 'Gordunni Cobalt'
SpellScript and conditions for spells of this quest.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
-- Spellscript and conditions for spells of quest Gordunni Cobalt
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=19395;
|
||||
INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
|
||||
(19395,'spell_gordunni_trap');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=11757;
|
||||
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
|
||||
(11757,1,13,31,5,144050,'Digging for Cobalt targets Gordunni Trap');
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
/*######
|
||||
## npc_gregan_brewspewer
|
||||
@@ -201,6 +202,37 @@ public:
|
||||
}
|
||||
|
||||
};
|
||||
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);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCast += SpellCastFn(spell_gordunni_trap_SpellScript::HandleDummy);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_gordunni_trap_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## AddSC
|
||||
@@ -211,4 +243,5 @@ void AddSC_feralas()
|
||||
new npc_gregan_brewspewer();
|
||||
new npc_oox22fe();
|
||||
new npc_screecher_spirit();
|
||||
new spell_gordunni_trap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user