From df25ccb30d7f73dcbf31107d9166cc8cbc702367 Mon Sep 17 00:00:00 2001 From: Trista Date: Sun, 10 Mar 2013 03:29:30 +0200 Subject: Scripts/Eye of Eternity: Last stability changes * Release button bug should be now really fixed, if someone manage to get it due to some server delay, it can be hit by typing "RepopMe()" or "Reload". It's now only clientside issue that I couldn't reproduce. * Before there was a chance for transition to phase III to break if hit at precise moment. On top of that, if SoP was to be executed there was no time for purple dimension change. (Note: If transiton happen while SoP is cast it will get specific client data and dimension light will stay changing that is hard to hit, but is blizz bug.) --- .../Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 31 +++++++++++++++------- .../EyeOfEternity/instance_eye_of_eternity.cpp | 12 ++++----- 2 files changed, 28 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index bafd9a4510b..47e39574690 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -66,6 +66,9 @@ enum Events EVENT_MOVE_TO_VORTEX_POINT = 22, // This should be fixed someday in core, we can't call new movement from MovementInform EVENT_START_FIRST_RANDOM_PORTAL = 23, // There is something that is still loading when we first enter instance and it breaks // first visual cast of intro portal beam mechanic, so we need short delay from the event. + EVENT_DELAY_MOVE_TO_DESTROY_P = 24, // If Malygos is too close to destroy platform point and transition from II to III is hit, + // this event will be sheduled to start after 5 seconds so there is enough time for "dimension change". + // ============ NEXUS LORDS ============ EVENT_ARCANE_SHOCK = 1, EVENT_HASTE_BUFF = 2, @@ -489,9 +492,13 @@ public: DummyEntryCheckPredicate pred; summons.DoAction(ACTION_DELAYED_DESPAWN, pred); Talk(SAY_END_P_TWO); - me->GetMotionMaster()->Initialize(); + me->GetMotionMaster()->Clear(false); me->StopMoving(); - me->GetMotionMaster()->MovePoint(POINT_DESTROY_PLATFORM_P_TWO, MalygosPositions[0]); + if (me->GetPositionZ() > 300.0f) + events.ScheduleEvent(EVENT_DELAY_MOVE_TO_DESTROY_P, 5*IN_MILLISECONDS, 0, PHASE_TWO); + else + me->GetMotionMaster()->MovePoint(POINT_DESTROY_PLATFORM_P_TWO, MalygosPositions[0]); + events.ScheduleEvent(EVENT_LIGHT_DIMENSION_CHANGE, 1*IN_MILLISECONDS, 0, PHASE_TWO); break; case ACTION_HANDLE_RESPAWN: @@ -834,14 +841,17 @@ public: } break; case EVENT_FLY_OUT_OF_PLATFORM: - if (Creature* alexstraszaBunny = me->GetMap()->GetCreature(instance->GetData64(DATA_ALEXSTRASZA_BUNNY_GUID))) + if (!_performingDestroyPlatform) { - Position randomPosOnRadius; - // Hardcodded retail value, reason is Z getters can fail... (TO DO: Change to getter when height calculation works on 100%!) - randomPosOnRadius.m_positionZ = 283.0521f; - alexstraszaBunny->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 120.0f, alexstraszaBunny->GetAngle(me)); - me->GetMotionMaster()->MovePoint(POINT_FLY_OUT_OF_PLATFORM_P_TWO, randomPosOnRadius); - _flyingOutOfPlatform = true; + if (Creature* alexstraszaBunny = me->GetMap()->GetCreature(instance->GetData64(DATA_ALEXSTRASZA_BUNNY_GUID))) + { + Position randomPosOnRadius; + // Hardcodded retail value, reason is Z getters can fail... (TO DO: Change to getter when height calculation works on 100%!) + randomPosOnRadius.m_positionZ = 283.0521f; + alexstraszaBunny->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 120.0f, alexstraszaBunny->GetAngle(me)); + me->GetMotionMaster()->MovePoint(POINT_FLY_OUT_OF_PLATFORM_P_TWO, randomPosOnRadius); + _flyingOutOfPlatform = true; + } } if (_arcaneReinforcements && instance) @@ -925,6 +935,9 @@ public: case EVENT_LIGHT_DIMENSION_CHANGE: SendLightOverride(LIGHT_CHANGE_DIMENSIONS, 2*IN_MILLISECONDS); break; + case EVENT_DELAY_MOVE_TO_DESTROY_P: + me->GetMotionMaster()->MovePoint(POINT_DESTROY_PLATFORM_P_TWO, MalygosPositions[0]); + break; case EVENT_MOVE_TO_P_THREE_POINT: Talk(SAY_START_P_THREE); me->GetMotionMaster()->MovePoint(POINT_IDLE_P_THREE, MalygosPositions[4]); diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index da008d10367..079732b0f14 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -157,12 +157,12 @@ public: if (unit->GetTypeId() != TYPEID_PLAYER) return; - // For some reason player continues sometimes to be moving after death on this map, - // perhaps only client side issue am not entirtly sure. - // This fix not being able to press release button. - // Variation of this with some check needs to be implemented somewhere within core code. - // It'll stay here until someone find where and why the leak happens. - unit->StopMoving(); + // Player continues to be moving after death no matter if spline will be cleared along with all movements, + // so on next world tick was all about delay if box will pop or not (when new movement will be registered) + // since in EoE you never stop falling. However root at this precise* moment works, + // it will get cleared on release. If by any chance some lag happen "Reload()" and "RepopMe()" works, + // last test I made now gave me 50/0 of this bug so I can't do more about it. + unit->SetControlled(true, UNIT_STATE_ROOT); } void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) -- cgit v1.2.3 From 535bda8f160179ccee74a5f118394a3a8b2e2e67 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 10 Mar 2013 14:16:35 +0100 Subject: Core/Vehicles: Corrected an oversight in b3b66a8d028fafef1e71477325f467ef73626c8e Closes #9399 --- src/server/game/Entities/Vehicle/Vehicle.cpp | 15 +++++++++------ src/server/game/Entities/Vehicle/Vehicle.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 0714c31b047..85215c5302b 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -744,6 +744,12 @@ void Vehicle::RemovePendingEventsForSeat(int8 seatId) } } +VehicleJoinEvent::~VehicleJoinEvent() +{ + if (Target) + Target->RemovePendingEvent(this); +} + /** * @fn bool VehicleJoinEvent::Execute(uint64, uint32) * @@ -762,7 +768,7 @@ void Vehicle::RemovePendingEventsForSeat(int8 seatId) bool VehicleJoinEvent::Execute(uint64, uint32) { ASSERT(Passenger->IsInWorld()); - ASSERT(Target->GetBase()->IsInWorld()); + ASSERT(Target && Target->GetBase()->IsInWorld()); Target->RemovePendingEventsForSeat(Seat->first); @@ -832,10 +838,6 @@ bool VehicleJoinEvent::Execute(uint64, uint32) // Actually quite a redundant hook. Could just use OnAddPassenger and check for unit typemask inside script. if (Passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY)) sScriptMgr->OnInstallAccessory(Target, Passenger->ToCreature()); - - // update all passenger's positions - //Passenger's spline OR vehicle movement will update positions - //RelocatePassengers(_me->GetPositionX(), _me->GetPositionY(), _me->GetPositionZ(), _me->GetOrientation()); } return true; @@ -854,6 +856,7 @@ bool VehicleJoinEvent::Execute(uint64, uint32) void VehicleJoinEvent::Abort(uint64) { + /// Check if the Vehicle was already uninstalled, in which case all auras were removed already if (Target) { sLog->outDebug(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, board on vehicle GuidLow: %u, Entry: %u SeatId: %d cancelled", @@ -865,7 +868,7 @@ void VehicleJoinEvent::Abort(uint64) Target->GetBase()->RemoveAurasByType(SPELL_AURA_CONTROL_VEHICLE, Passenger->GetGUID()); } else - sLog->outDebug(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, board on destroyed vehicle SeatId: %d cancelled", + sLog->outDebug(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, board on uninstalled vehicle SeatId: %d cancelled", Passenger->GetGUIDLow(), Passenger->GetEntry(), (int32)Seat->first); if (Passenger->IsInWorld() && Passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY)) diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index b8ed3a8f947..70b821de912 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -113,7 +113,7 @@ class VehicleJoinEvent : public BasicEvent friend class Vehicle; protected: VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) {} - ~VehicleJoinEvent() { Target->RemovePendingEvent(this); } + ~VehicleJoinEvent(); bool Execute(uint64, uint32); void Abort(uint64); -- cgit v1.2.3