mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Scripts/Sholazar Basin: Reconnaissance Flight (12671)
Add workaround for the player/accessory mounting issue. Some small additions. Closes: 9443
This commit is contained in:
@@ -1021,7 +1021,14 @@ public:
|
||||
void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) OVERRIDE
|
||||
{
|
||||
if (apply && passenger->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
/// @workaround - Because accessory gets unmounted when using vehicle_template_accessory.
|
||||
/// When vehicle spawns accessory is mounted to seat 0,but when player mounts
|
||||
/// he uses the same seat (instead of mounting to seat 1) kicking the accessory out.
|
||||
passenger->ChangeSeat(1, false);
|
||||
me->GetVehicleKit()->InstallAccessory(NPC_PILOT, 0, true, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
me->GetMotionMaster()->MovePath(NPC_PLANE, false);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) OVERRIDE
|
||||
@@ -1056,6 +1063,7 @@ public:
|
||||
case 25:
|
||||
Talk(PLANE_EMOTE);
|
||||
DoCast(SPELL_ENGINE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVEMENT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user