mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Scripting: Get rid of ModifyVehiclePassengerExitPos (#27126)
This commit is contained in:
8
sql/updates/world/3.3.5/2021_10_20_00_world.sql
Normal file
8
sql/updates/world/3.3.5/2021_10_20_00_world.sql
Normal 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);
|
||||
@@ -12704,9 +12704,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)
|
||||
{
|
||||
|
||||
@@ -2123,12 +2123,6 @@ void ScriptMgr::ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& dama
|
||||
FOREACH_SCRIPT(UnitScript)->ModifySpellDamageTaken(target, attacker, damage);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -411,9 +411,6 @@ class TC_GAME_API UnitScript : public ScriptObject
|
||||
|
||||
// Called when Spell Damage is being Dealt
|
||||
virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { }
|
||||
|
||||
// Called when an unit exits a vehicle
|
||||
virtual void ModifyVehiclePassengerExitPos(Unit* /*passenger*/, Vehicle* /*vehicle*/, Position& /*pos*/) { }
|
||||
};
|
||||
|
||||
class TC_GAME_API CreatureScript : public ScriptObject
|
||||
@@ -423,9 +420,6 @@ class TC_GAME_API CreatureScript : public ScriptObject
|
||||
CreatureScript(char const* name);
|
||||
|
||||
public:
|
||||
// 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;
|
||||
};
|
||||
@@ -1086,7 +1080,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);
|
||||
void ModifyVehiclePassengerExitPos(Unit* passenger, Vehicle* vehicle, Position& pos);
|
||||
|
||||
private:
|
||||
uint32 _scriptCount;
|
||||
|
||||
@@ -1740,46 +1740,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,
|
||||
@@ -1954,7 +1914,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);
|
||||
|
||||
Reference in New Issue
Block a user