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:
Wyrserth
2019-06-02 21:42:24 +02:00
committed by Giacomo Pozzoni
parent d365dd9157
commit d71a0608bf

View File

@@ -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();
}