@@ -0,0 +1,5 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1627743560834389300');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`=23134;
|
||||||
|
INSERT INTO `spell_script_names` VALUES
|
||||||
|
(23134, 'spell_item_goblin_bomb');
|
||||||
@@ -461,7 +461,7 @@ public:
|
|||||||
checkTimer = 0;
|
checkTimer = 0;
|
||||||
if (Unit* target = me->SelectNearestTarget(30.0f))
|
if (Unit* target = me->SelectNearestTarget(30.0f))
|
||||||
{
|
{
|
||||||
me->GetMotionMaster()->MoveChase(target);
|
me->GetMotionMaster()->MoveFollow(target, 0.f, 0.f);
|
||||||
if (me->GetDistance(target) < 3.0f)
|
if (me->GetDistance(target) < 3.0f)
|
||||||
{
|
{
|
||||||
me->CastSpell(me, bombSpellId, false);
|
me->CastSpell(me, bombSpellId, false);
|
||||||
|
|||||||
@@ -4288,6 +4288,46 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum GoblinBomb
|
||||||
|
{
|
||||||
|
SPELL_SUMMON_GOBLIN_BOMB = 13258,
|
||||||
|
};
|
||||||
|
|
||||||
|
// 23134 - Goblin Bomb
|
||||||
|
class spell_item_goblin_bomb : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_item_goblin_bomb() : SpellScriptLoader("spell_item_goblin_bomb") {}
|
||||||
|
|
||||||
|
class spell_item_goblin_bomb_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_item_goblin_bomb_SpellScript);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ SPELL_SUMMON_GOBLIN_BOMB });
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||||
|
{
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
{
|
||||||
|
caster->CastSpell(caster, SPELL_SUMMON_GOBLIN_BOMB, true, GetCastItem());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHit += SpellEffectFn(spell_item_goblin_bomb_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const override
|
||||||
|
{
|
||||||
|
return new spell_item_goblin_bomb_SpellScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_item_spell_scripts()
|
void AddSC_item_spell_scripts()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -4395,4 +4435,5 @@ void AddSC_item_spell_scripts()
|
|||||||
new spell_item_muisek_vessel();
|
new spell_item_muisek_vessel();
|
||||||
new spell_item_greatmothers_soulcatcher();
|
new spell_item_greatmothers_soulcatcher();
|
||||||
new spell_item_eggnog();
|
new spell_item_eggnog();
|
||||||
|
new spell_item_goblin_bomb();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user