mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Script/Creature: calculate Traveler's Tundra Mammoth's NPCs' exit position based on current player's position (#23344)
* Script/Creature: calculate Traveler's Tundra Mammoth's NPCs' exit position based on current player's position. * Comment out unused argument.
This commit is contained in:
committed by
Giacomo Pozzoni
parent
d365dd9157
commit
d71a0608bf
@@ -2951,6 +2951,40 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum TravelerTundraMammothNPCs
|
||||
{
|
||||
NPC_HAKMUD_OF_ARGUS = 32638,
|
||||
NPC_GNIMO = 32639,
|
||||
NPC_DRIX_BLACKWRENCH = 32641,
|
||||
NPC_MOJODISHU = 32642
|
||||
};
|
||||
|
||||
class npc_traveler_tundra_mammoth_exit_pos : public UnitScript
|
||||
{
|
||||
public:
|
||||
npc_traveler_tundra_mammoth_exit_pos() : UnitScript("npc_traveler_tundra_mammoth_exit_pos") { }
|
||||
|
||||
void ModifyVehiclePassengerExitPos(Unit* passenger, Vehicle* /*vehicle*/, Position& pos)
|
||||
{
|
||||
if (passenger->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
switch (passenger->GetEntry())
|
||||
{
|
||||
// Right side
|
||||
case NPC_DRIX_BLACKWRENCH:
|
||||
case NPC_GNIMO:
|
||||
pos.RelocateOffset({ -2.0f, -2.0f, 0.0f, 0.0f });
|
||||
break;
|
||||
// Left side
|
||||
case NPC_MOJODISHU:
|
||||
case NPC_HAKMUD_OF_ARGUS:
|
||||
pos.RelocateOffset({ -2.0f, 2.0f, 0.0f, 0.0f });
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_npcs_special()
|
||||
{
|
||||
new npc_air_force_bots();
|
||||
@@ -2978,4 +3012,5 @@ void AddSC_npcs_special()
|
||||
new npc_train_wrecker();
|
||||
new npc_argent_squire_gruntling();
|
||||
new npc_bountiful_table();
|
||||
new npc_traveler_tundra_mammoth_exit_pos();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user