feat: add WotLK vehicle exit UI with Leave Vehicle button

Parse SMSG_PLAYER_VEHICLE_DATA (PackedGuid + uint32 vehicleId) and
track in-vehicle state. Add sendRequestVehicleExit() which sends
CMSG_REQUEST_VEHICLE_EXIT. Render a floating red "Leave Vehicle"
button above the action bar whenever vehicleId_ is non-zero.
State cleared on world leave and zone transfer.
This commit is contained in:
Kelsi 2026-03-12 17:25:00 -07:00
parent fbcec9e7bf
commit b7c1aa39a9
3 changed files with 62 additions and 3 deletions

View file

@ -1594,6 +1594,11 @@ public:
return it != taxiNpcHasRoutes_.end() && it->second;
}
// Vehicle (WotLK)
bool isInVehicle() const { return vehicleId_ != 0; }
uint32_t getVehicleId() const { return vehicleId_; }
void sendRequestVehicleExit();
// Vendor
void openVendor(uint64_t npcGuid);
void closeVendor();
@ -2536,6 +2541,9 @@ private:
return it != factionHostileMap_.end() ? it->second : true; // default hostile if unknown
}
// Vehicle (WotLK): non-zero when player is seated in a vehicle
uint32_t vehicleId_ = 0;
// Taxi / Flight Paths
std::unordered_map<uint64_t, bool> taxiNpcHasRoutes_; // guid -> has new/available routes
std::unordered_map<uint32_t, TaxiNode> taxiNodes_;