mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Scripts/Spells: Dimensional Ripper - Everlook (#23547)
This commit is contained in:
2
sql/updates/world/3.3.5/9999_99_99_99_world.sql
Normal file
2
sql/updates/world/3.3.5/9999_99_99_99_world.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_dimensional_ripper_everlook';
|
||||||
|
INSERT INTO `spell_script_names` VALUES (23442,'spell_item_dimensional_ripper_everlook');
|
||||||
@@ -1062,25 +1062,6 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
|||||||
TC_LOG_ERROR("spells", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
|
TC_LOG_ERROR("spells", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// post effects for TARGET_DEST_DB
|
|
||||||
/// @todo: awful hacks, move this to spellscripts
|
|
||||||
switch (m_spellInfo->Id)
|
|
||||||
{
|
|
||||||
// Dimensional Ripper - Everlook
|
|
||||||
case 23442:
|
|
||||||
{
|
|
||||||
int32 r = irand(0, 119);
|
|
||||||
if (r >= 70) // 7/12 success
|
|
||||||
{
|
|
||||||
if (r < 100) // 4/12 evil twin
|
|
||||||
m_caster->CastSpell(m_caster, 23445, true);
|
|
||||||
else // 1/12 fire
|
|
||||||
m_caster->CastSpell(m_caster, 23449, true);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectApplyAura(SpellEffIndex effIndex)
|
void Spell::EffectApplyAura(SpellEffIndex effIndex)
|
||||||
|
|||||||
@@ -1724,6 +1724,7 @@ class spell_item_scroll_of_recall : public SpellScript
|
|||||||
enum TransporterSpells
|
enum TransporterSpells
|
||||||
{
|
{
|
||||||
SPELL_EVIL_TWIN = 23445,
|
SPELL_EVIL_TWIN = 23445,
|
||||||
|
SPELL_TRANSPORTER_MALFUNCTION_FIRE = 23449,
|
||||||
SPELL_TRANSPORTER_MALFUNCTION_SMALLER = 36893,
|
SPELL_TRANSPORTER_MALFUNCTION_SMALLER = 36893,
|
||||||
SPELL_TRANSPORTER_MALFUNCTION_BIGGER = 36895,
|
SPELL_TRANSPORTER_MALFUNCTION_BIGGER = 36895,
|
||||||
SPELL_TRANSPORTER_MALFUNCTION_CHICKEN = 36940,
|
SPELL_TRANSPORTER_MALFUNCTION_CHICKEN = 36940,
|
||||||
@@ -1733,6 +1734,41 @@ enum TransporterSpells
|
|||||||
SPELL_SOUL_SPLIT_GOOD = 36901
|
SPELL_SOUL_SPLIT_GOOD = 36901
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 23442 - Dimensional Ripper - Everlook
|
||||||
|
class spell_item_dimensional_ripper_everlook : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_item_dimensional_ripper_everlook);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ SPELL_TRANSPORTER_MALFUNCTION_FIRE, SPELL_EVIL_TWIN });
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Load() override
|
||||||
|
{
|
||||||
|
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleScript(SpellEffIndex /* effIndex */)
|
||||||
|
{
|
||||||
|
int32 r = irand(0, 119);
|
||||||
|
if (r <= 70) // 7/12 success
|
||||||
|
return;
|
||||||
|
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
|
||||||
|
if (r < 100) // 4/12 evil twin
|
||||||
|
caster->CastSpell(caster, SPELL_EVIL_TWIN, true);
|
||||||
|
else // 1/12 fire
|
||||||
|
caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_FIRE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_item_dimensional_ripper_everlook::HandleScript, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 36941 - Ultrasafe Transporter: Toshley's Station
|
// 36941 - Ultrasafe Transporter: Toshley's Station
|
||||||
class spell_item_ultrasafe_transporter : public SpellScript
|
class spell_item_ultrasafe_transporter : public SpellScript
|
||||||
{
|
{
|
||||||
@@ -4214,6 +4250,7 @@ void AddSC_item_spell_scripts()
|
|||||||
RegisterAuraScript(spell_item_power_circle);
|
RegisterAuraScript(spell_item_power_circle);
|
||||||
RegisterSpellScript(spell_item_savory_deviate_delight);
|
RegisterSpellScript(spell_item_savory_deviate_delight);
|
||||||
RegisterSpellScript(spell_item_scroll_of_recall);
|
RegisterSpellScript(spell_item_scroll_of_recall);
|
||||||
|
RegisterSpellScript(spell_item_dimensional_ripper_everlook);
|
||||||
RegisterSpellScript(spell_item_ultrasafe_transporter);
|
RegisterSpellScript(spell_item_ultrasafe_transporter);
|
||||||
RegisterSpellScript(spell_item_dimensional_ripper_area52);
|
RegisterSpellScript(spell_item_dimensional_ripper_area52);
|
||||||
RegisterAuraScript(spell_item_unsated_craving);
|
RegisterAuraScript(spell_item_unsated_craving);
|
||||||
|
|||||||
Reference in New Issue
Block a user