Skip to content

Commit

Permalink
Core/Spells: Remove hacks related to TARGET_DEST_NEARBY_DB and DB data (
Browse files Browse the repository at this point in the history
  • Loading branch information
aquadeus authored Jan 24, 2025
1 parent fa06e7a commit 68b10dc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 45 deletions.
27 changes: 27 additions & 0 deletions sql/updates/world/master/2025_01_24_01_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_summon_amberleaf_troublemaker';

DELETE FROM `spell_target_position` WHERE `ID` IN (274343, 114698, 102207);
INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `OrderIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES
(274343, 0, 0, 1864, 3890.8254, -1248.8317, 115.37704, NULL, 58630),
(274343, 0, 1, 1864, 3891.2378, -1239.0885, 113.49874, NULL, 58630),
(274343, 0, 2, 1864, 3893.4775, -1259.2014, 113.48286, NULL, 58630),
(274343, 0, 3, 1864, 3895.1963, -1230.0226, 113.33343, NULL, 58630),
(274343, 0, 4, 1864, 3897.9368, -1266.1163, 113.27721, NULL, 58630),
(274343, 0, 5, 1864, 3901.125, -1222.0486, 113.06683, NULL, 58630),
(274343, 0, 6, 1864, 3904.9348, -1272.2205, 112.99738, NULL, 58630),

(102207, 0, 0, 860, 1239.606, 3732.9072, 94.0207, NULL, 58630),
(102207, 0, 1, 860, 1226.9045, 3696.5312, 93.174614, NULL, 58630),
(102207, 0, 2, 860, 1216.5017, 3732.6094, 92.79299, NULL, 58630),
(102207, 0, 3, 860, 1223.4375, 3700.6067, 93.851036, NULL, 58630),

(114698, 0, 0, 860, 1181.8802, 3446.1953, 102.41484, NULL, 58630),
(114698, 0, 1, 860, 1186.4254, 3446.265, 102.409, NULL, 58630),
(114698, 0, 2, 860, 1184.158, 3448.5808, 102.42686, NULL, 58630),
(114698, 0, 3, 860, 1181.8923, 3437.5764, 102.60773, NULL, 58630),
(114698, 0, 4, 860, 1186.5817, 3443.6372, 102.41002, NULL, 58630),
(114698, 0, 5, 860, 1188.6007, 3445.9895, 102.409, NULL, 58630),
(114698, 0, 6, 860, 1181.6615, 3451.1711, 102.8552, NULL, 58630),
(114698, 0, 7, 860, 1188.3351, 3443.039, 102.41056, NULL, 58630),
(114698, 0, 8, 860, 1187.9219, 3448.9497, 102.44913, NULL, 58630),
(114698, 0, 9, 860, 1187.408, 3440.7612, 102.5322, NULL, 58630);
18 changes: 0 additions & 18 deletions src/server/game/Spells/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4984,24 +4984,6 @@ void SpellMgr::LoadSpellInfoCorrections()
});
});

// Summon Amberleaf Troublemaker
ApplySpellFix({ 114698 }, [](SpellInfo* spellInfo)
{
ApplySpellEffectFix(spellInfo, EFFECT_0, [](SpellEffectInfo* spellEffectInfo)
{
spellEffectInfo->TargetA = SpellImplicitTargetInfo(TARGET_DEST_DEST);
});
});

// Summon Living Air
ApplySpellFix({ 102207 }, [](SpellInfo* spellInfo)
{
ApplySpellEffectFix(spellInfo, EFFECT_0, [](SpellEffectInfo* spellEffectInfo)
{
spellEffectInfo->TargetA = SpellImplicitTargetInfo(TARGET_DEST_TARGET_RANDOM);
});
});

// ENDOF THE WANDERING ISLE SPELLS
//

Expand Down
27 changes: 0 additions & 27 deletions src/server/scripts/Pandaria/zone_the_wandering_isle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1207,32 +1207,6 @@ class spell_meditation_timer_bar : public AuraScript
}
};

std::array<Position, 9> AmberleafTroublemakerPositions = { {
{ 1181.6615f, 3451.1711f, 102.85520f },
{ 1187.9219f, 3448.9497f, 102.44913f },
{ 1182.2552f, 3441.4202f, 102.43922f },
{ 1181.6615f, 3451.1711f, 102.85520f },
{ 1180.1442f, 3448.6729f, 102.65444f },
{ 1187.4080f, 3440.7612f, 102.53220f },
{ 1186.5817f, 3443.6372f, 102.41002f },
{ 1188.3351f, 3443.0390f, 102.41056f },
{ 1181.8802f, 3446.1953f, 102.41484f }
} };

// 114698 - Summon Amberleaf Troublemaker
class spell_summon_amberleaf_troublemaker : public SpellScript
{
void SetDest(SpellDestination& dest)
{
dest.Relocate(Trinity::Containers::SelectRandomContainerElement(AmberleafTroublemakerPositions));
}

void Register() override
{
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_summon_amberleaf_troublemaker::SetDest, EFFECT_0, TARGET_DEST_DEST);
}
};

void AddSC_zone_the_wandering_isle()
{
RegisterCreatureAI(npc_tushui_huojin_trainee);
Expand All @@ -1251,7 +1225,6 @@ void AddSC_zone_the_wandering_isle()
RegisterSpellScript(spell_force_summoner_to_ride_vehicle);
RegisterSpellScript(spell_ride_drake);
RegisterSpellScript(spell_meditation_timer_bar);
RegisterSpellScript(spell_summon_amberleaf_troublemaker);

new at_min_dimwind_captured();
new at_cave_of_meditation();
Expand Down

0 comments on commit 68b10dc

Please sign in to comment.