From c20d0cb77e0bf1e8770856d2080205a1dc2e76fd Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Sun, 27 Apr 2014 02:23:33 +0300 Subject: Scripts/Sholazar Basin: Reconnaissance Flight (12671) Add workaround for the player/accessory mounting issue. Some small additions. Closes: 9443 --- src/server/scripts/Northrend/zone_sholazar_basin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index 6e39d341c58..770a95c23d7 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -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; } } -- cgit v1.2.3