Core/Scripting: Get rid of ModifyVehiclePassengerExitPos (#27126)

(cherry picked from commit d7adc50daa)
This commit is contained in:
offl
2021-10-20 01:04:02 +03:00
committed by Shauren
parent cf76eb73d9
commit 7a0268d4f1
5 changed files with 8 additions and 57 deletions

View File

@@ -0,0 +1,8 @@
--
DELETE FROM `vehicle_seat_addon` WHERE `SeatEntry` BETWEEN 2726 AND 2730;
INSERT INTO `vehicle_seat_addon` (`SeatEntry`, `SeatOrientation`, `ExitParamX`, `ExitParamY`, `ExitParamZ`, `ExitParamO`, `ExitParamValue`) VALUES
(2730, 0, 2807.8577, 7038.5713, 7.0758133, 4.73480987548828125, 2),
(2728, 0, 2801.1677, 7046.4683, 5.362013, 4.73480987548828125, 2),
(2729, 0, 2803.7292, 7046.5156, 5.362013, 4.73480987548828125, 2),
(2727, 0, 2801.4797, 7051.3794, 5.362913, 4.73480987548828125, 2),
(2726, 0, 2803.3186, 7051.4106, 5.362913, 4.73480987548828125, 2);

View File

@@ -12092,9 +12092,6 @@ void Unit::_ExitVehicle(Position const* exitPosition)
pos = vehicle->GetBase()->GetPosition();
pos.SetOrientation(GetOrientation());
// To-do: snap this hook out of existance
sScriptMgr->ModifyVehiclePassengerExitPos(this, vehicle, pos);
// Change exit position based on seat entry addon data
if (seatAddon)
{

View File

@@ -2349,12 +2349,6 @@ void ScriptMgr::OnQuestObjectiveChange(Player* player, Quest const* quest, Quest
tmpscript->OnQuestObjectiveChange(player, quest, objective, oldAmount, newAmount);
}
void ScriptMgr::ModifyVehiclePassengerExitPos(Unit* passenger, Vehicle* vehicle, Position& pos)
{
FOREACH_SCRIPT(UnitScript)->ModifyVehiclePassengerExitPos(passenger, vehicle, pos);
FOREACH_SCRIPT(CreatureScript)->ModifyVehiclePassengerExitPos(passenger, vehicle, pos);
}
SpellScriptLoader::SpellScriptLoader(char const* name)
: ScriptObject(name)
{

View File

@@ -447,9 +447,6 @@ class TC_GAME_API UnitScript : public ScriptObject
// Called when Spell Damage is being Dealt
virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/, SpellInfo const* /*spellInfo*/) { }
// Called when an unit exits a vehicle
virtual void ModifyVehiclePassengerExitPos(Unit* /*passenger*/, Vehicle* /*vehicle*/, Position& /*pos*/) { }
};
class TC_GAME_API CreatureScript : public ScriptObject
@@ -462,9 +459,6 @@ class TC_GAME_API CreatureScript : public ScriptObject
~CreatureScript();
// Called when an unit exits a vehicle
virtual void ModifyVehiclePassengerExitPos(Unit* /*passenger*/, Vehicle* /*vehicle*/, Position& /*pos*/) { }
// Called when a CreatureAI object is needed for the creature.
virtual CreatureAI* GetAI(Creature* /*creature*/) const = 0;
};
@@ -1271,7 +1265,6 @@ class TC_GAME_API ScriptMgr
void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage);
void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage);
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage, SpellInfo const* spellInfo);
void ModifyVehiclePassengerExitPos(Unit* passenger, Vehicle* vehicle, Position& pos);
public: /* AreaTriggerEntityScript */

View File

@@ -1738,46 +1738,6 @@ public:
}
};
enum OrabusTheHelmsman
{
NPC_ORABUS = 32576,
NPC_KVALDIR_CREWMAN_1 = 32577,
NPC_KVALDIR_CREWMAN_2 = 32578,
NPC_KVALDIR_CREWMAN_3 = 32579,
NPC_KVALDIR_CREWMAN_4 = 32580
};
class npc_orabus_the_helmsman_ship_exit_pos : public UnitScript
{
public:
npc_orabus_the_helmsman_ship_exit_pos() : UnitScript("npc_orabus_the_helmsman_ship_exit_pos") { }
void ModifyVehiclePassengerExitPos(Unit* passenger, Vehicle* /*vehicle*/, Position& pos)
{
if (passenger->GetTypeId() == TYPEID_UNIT)
{
switch (passenger->GetEntry())
{
case NPC_ORABUS:
pos.Relocate(2807.858f, 7038.571f, 7.075813f, 4.73481f);
break;
case NPC_KVALDIR_CREWMAN_1:
pos.Relocate(2801.168f, 7046.468f, 5.362013f, 4.73481f);
break;
case NPC_KVALDIR_CREWMAN_2:
pos.Relocate(2803.729f, 7046.516f, 5.362013f, 4.73481f);
break;
case NPC_KVALDIR_CREWMAN_3:
pos.Relocate(2801.48f, 7051.379f, 5.362913f, 4.73481f);
break;
case NPC_KVALDIR_CREWMAN_4:
pos.Relocate(2803.319f, 7051.411f, 5.362913f, 4.73481f);
break;
}
}
}
};
enum ShorteningBlaster
{
SPELL_SHORTENING_BLASTER_BIGGER1 = 45674,
@@ -1952,7 +1912,6 @@ void AddSC_borean_tundra()
new spell_windsoul_totem_aura();
new spell_q11719_bloodspore_ruination_45997();
new npc_bloodmage_laurith();
new npc_orabus_the_helmsman_ship_exit_pos();
RegisterSpellScript(spell_q11653_shortening_blaster);
RegisterSpellScript(spell_nerubar_web_random_unit_not_on_quest);
RegisterSpellScript(spell_nerubar_web_random_unit_not_on_quest_dummy);