new spells
This commit is contained in:
@@ -5627,6 +5627,139 @@ class spell_gen_abandon_vehicle : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
//WowCommunity
|
||||
struct WormholeDest
|
||||
{
|
||||
uint32 mapId;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float o; // orientation
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Pattern A: SpellScripts (random teleport on SPELL_EFFECT_DUMMY)
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 1. Wormhole Generator: Argus (Spell 250796, Map 1669)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static constexpr WormholeDest ArgusDestinations[] =
|
||||
{
|
||||
{ 1669, 633.745f, 1438.83f, 622.762f, 0.0f }, // Krokuun
|
||||
{ 1669, 5391.07f, 9898.29f, -91.4524f, 0.0f }, // Mac'Aree
|
||||
{ 1669, -2895.55f, 8780.41f, -228.743f, 0.0f }, // Antoran Wastes
|
||||
};
|
||||
|
||||
class spell_wormhole_argus : public SpellScript
|
||||
{
|
||||
void HandleTeleport(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Player* player = GetHitUnit()->ToPlayer())
|
||||
{
|
||||
auto const& dest = Trinity::Containers::SelectRandomContainerElement(ArgusDestinations);
|
||||
player->TeleportTo(dest.mapId, dest.x, dest.y, dest.z, dest.o);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_wormhole_argus::HandleTeleport, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 2. Wormhole Generator: Kul Tiras (Spell 299083, Map 1643)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static constexpr WormholeDest KulTirasDestinations[] =
|
||||
{
|
||||
{ 1643, 1182.41f, -97.8003f, 31.5567f, 0.0f }, // Tiragarde Sound
|
||||
{ 1643, 58.9879f, 2155.31f, 71.0015f, 0.0f }, // Drustvar
|
||||
{ 1643, 2807.3f, 6.28646f, 50.9802f, 0.0f }, // Stormsong Valley
|
||||
{ 1643, 3116.98f, 4898.31f, 33.6045f, 0.0f }, // Mechagon Island
|
||||
};
|
||||
|
||||
class spell_wormhole_kul_tiras : public SpellScript
|
||||
{
|
||||
void HandleTeleport(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Player* player = GetHitUnit()->ToPlayer())
|
||||
{
|
||||
auto const& dest = Trinity::Containers::SelectRandomContainerElement(KulTirasDestinations);
|
||||
player->TeleportTo(dest.mapId, dest.x, dest.y, dest.z, dest.o);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_wormhole_kul_tiras::HandleTeleport, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 3. Wormhole Generator: Zandalar (Spell 299084, Map 1642)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static constexpr WormholeDest ZandalarDestinations[] =
|
||||
{
|
||||
{ 1642, -1128.36f, 804.606f, 500.229f, 0.0f }, // Zuldazar
|
||||
{ 1642, 1099.99f, 1114.03f, 26.3739f, 0.0f }, // Nazmir
|
||||
{ 1642, 1973.68f, 2394.98f, 120.8f, 0.0f }, // Vol'dun
|
||||
};
|
||||
|
||||
class spell_wormhole_zandalar : public SpellScript
|
||||
{
|
||||
void HandleTeleport(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Player* player = GetHitUnit()->ToPlayer())
|
||||
{
|
||||
auto const& dest = Trinity::Containers::SelectRandomContainerElement(ZandalarDestinations);
|
||||
player->TeleportTo(dest.mapId, dest.x, dest.y, dest.z, dest.o);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_wormhole_zandalar::HandleTeleport, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 4. Intra-Dalaran Wormhole (Spell 199978, Map 1220)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static constexpr WormholeDest DalaranDestinations[] =
|
||||
{
|
||||
{ 1220, -855.0f, 4425.0f, 740.0f, 0.0f }, // Krasus' Landing
|
||||
{ 1220, -704.0f, 4557.0f, 729.0f, 0.0f }, // The Eventide
|
||||
{ 1220, -706.0f, 4500.0f, 680.0f, 0.0f }, // The Underbelly
|
||||
{ 1220, -637.0f, 4446.0f, 729.0f, 0.0f }, // Magus Commerce
|
||||
{ 1220, -767.0f, 4359.0f, 730.0f, 0.0f }, // Runeweaver Square
|
||||
};
|
||||
|
||||
class spell_wormhole_dalaran : public SpellScript
|
||||
{
|
||||
void HandleTeleport(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Player* player = GetHitUnit()->ToPlayer())
|
||||
{
|
||||
auto const& dest = Trinity::Containers::SelectRandomContainerElement(DalaranDestinations);
|
||||
player->TeleportTo(dest.mapId, dest.x, dest.y, dest.z, dest.o);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_wormhole_dalaran::HandleTeleport, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
//WowCommunity
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_gen_absorb0_hitlimit1);
|
||||
@@ -5815,4 +5948,11 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_force_phase_update);
|
||||
RegisterSpellScriptWithArgs(spell_gen_no_npc_damage_below_override, "spell_gen_no_npc_damage_below_override_70", 70.0f);
|
||||
RegisterSpellScript(spell_gen_abandon_vehicle);
|
||||
|
||||
//WowCommunity
|
||||
RegisterSpellScript(spell_wormhole_argus); // Spell 250796
|
||||
RegisterSpellScript(spell_wormhole_kul_tiras); // Spell 299083
|
||||
RegisterSpellScript(spell_wormhole_zandalar); // Spell 299084
|
||||
RegisterSpellScript(spell_wormhole_dalaran); // Spell 199978
|
||||
//WowCommunity
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user