azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.55k stars 2.62k forks source link

Core/Vehicle HandleChangeSeatsOnControlledVehicle #14516

Closed w5860363 closed 3 weeks ago

w5860363 commented 1 year ago

Current Behaviour

error HandleChangeSeatsOnControlledVehicle, Opcode: 1179, Player 6 tried to switch seats but current seatflags 1662027787 don't permit that.

Expected Blizzlike Behaviour

Single person can switch to co pilot to use anti-aircraft guns

Source

No response

Steps to reproduce the problem

1: .npc add temp 33109 2: Click the co pilot

Extra Notes

No response

AC rev. hash/commit

https://github.com/azerothcore/azerothcore-wotlk/commit/8d2dda24ed85e835953156d1df429567bfc6fea8

Operating system

windows 10

Custom changes or Modules

No response

w5860363 commented 5 months ago

Still occurring in ULDs

sogladev commented 1 month ago

Removing these lines in SpellInfoCorrections enables swaps again

Not sure why these were disabled, maybe to prevent a crash?

diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp
index 0e3c9833a..de6e0735c 100644
--- a/src/server/game/Spells/SpellInfoCorrections.cpp
+++ b/src/server/game/Spells/SpellInfoCorrections.cpp
@@ -4960,6 +4960,2 @@ void SpellMgr::LoadSpellInfoCorrections()
     vse->m_flags &= ~VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;
-    vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(3011)); // Salvaged Demolisher, Ulduar - not allow to change seats
-    vse->m_flags &= ~VEHICLE_SEAT_FLAG_CAN_SWITCH;
-    vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(3077)); // Salvaged Demolisher Seat, Ulduar - not allow to change seats
-    vse->m_flags &= ~VEHICLE_SEAT_FLAG_CAN_SWITCH;