Skip to content

Commit 4b2e3de

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-vas-autobalance
2 parents 8963bff + 5a29762 commit 4b2e3de

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Spellscripts for "Toss your Luck!"
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_item_titanium_seal_of_dalaran_toss','spell_item_titanium_seal_of_dalaran_catch');
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(60458, 'spell_item_titanium_seal_of_dalaran_toss'),
5+
(60476, 'spell_item_titanium_seal_of_dalaran_catch');

src/server/scripts/Spells/spell_item.cpp

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4286,6 +4286,64 @@ class spell_item_eggnog : public SpellScript
42864286
}
42874287
};
42884288

4289+
// Titanium Seal of Dalaran
4290+
enum TitaniumSealOfDalaranTexts
4291+
{
4292+
TEXT_TSOD_COIN_TOSS = 32638,
4293+
TEXT_TSOD_FLIPPED_HEADS = 32663,
4294+
TEXT_TSOD_FLIPPED_TAILS = 32664
4295+
};
4296+
4297+
// 60458 - Toss Your Luck!
4298+
class spell_item_titanium_seal_of_dalaran_toss : public SpellScript
4299+
{
4300+
PrepareSpellScript(spell_item_titanium_seal_of_dalaran_toss);
4301+
4302+
bool Validate(SpellInfo const* /*spellInfo*/) override
4303+
{
4304+
return sObjectMgr->GetBroadcastText(TEXT_TSOD_COIN_TOSS);
4305+
}
4306+
4307+
void RelocateHeight(SpellDestination& dest)
4308+
{
4309+
dest.RelocateOffset({ 0.0f, 0.0f, 20.0f });
4310+
}
4311+
4312+
void TriggerEmote(SpellEffIndex /*effIndex*/)
4313+
{
4314+
Unit* caster = GetCaster();
4315+
caster->TextEmote(TEXT_TSOD_COIN_TOSS, caster);
4316+
}
4317+
4318+
void Register() override
4319+
{
4320+
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_item_titanium_seal_of_dalaran_toss::RelocateHeight, EFFECT_0, TARGET_DEST_CASTER);
4321+
OnEffectLaunch += SpellEffectFn(spell_item_titanium_seal_of_dalaran_toss::TriggerEmote, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE);
4322+
}
4323+
};
4324+
4325+
// 60476 - Toss Your Luck!
4326+
class spell_item_titanium_seal_of_dalaran_catch : public SpellScript
4327+
{
4328+
PrepareSpellScript(spell_item_titanium_seal_of_dalaran_catch);
4329+
4330+
bool Validate(SpellInfo const* /*spellInfo*/) override
4331+
{
4332+
return sObjectMgr->GetBroadcastText(TEXT_TSOD_FLIPPED_HEADS) && sObjectMgr->GetBroadcastText(TEXT_TSOD_FLIPPED_TAILS);
4333+
}
4334+
4335+
void TriggerEmote(SpellEffIndex /*effIndex*/)
4336+
{
4337+
Unit* caster = GetCaster();
4338+
caster->TextEmote(RAND(TEXT_TSOD_FLIPPED_HEADS, TEXT_TSOD_FLIPPED_TAILS), caster);
4339+
}
4340+
4341+
void Register() override
4342+
{
4343+
OnEffectHit += SpellEffectFn(spell_item_titanium_seal_of_dalaran_catch::TriggerEmote, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
4344+
}
4345+
};
4346+
42894347
void AddSC_item_spell_scripts()
42904348
{
42914349
// 23074 Arcanite Dragonling
@@ -4421,4 +4479,6 @@ void AddSC_item_spell_scripts()
44214479
RegisterSpellScript(spell_item_mad_alchemists_potion);
44224480
RegisterSpellScript(spell_item_crazy_alchemists_potion);
44234481
RegisterSpellScript(spell_item_eggnog);
4482+
RegisterSpellScript(spell_item_titanium_seal_of_dalaran_toss);
4483+
RegisterSpellScript(spell_item_titanium_seal_of_dalaran_catch);
44244484
}

0 commit comments

Comments
 (0)