DB/VehicleSeat

From wowdev
Jump to: navigation, search

≥ Wrath

Structure

struct VehicleSeatEntry // sizeof(0x100)
{
   m_ID; // +0x0, size 0x4, type 0                                           // 0
   m_flags; // +0x4, size 0x4, type 0                                        // 1
   m_attachmentID; // +0x8, size 0x4, type 0                                 // 2
   m_attachmentOffsetX; // +0xC, size 0x4, type 3                            // 3
   m_attachmentOffsetY; // +0x10, size 0x4, type 3                           // 4
   m_attachmentOffsetZ; // +0x14, size 0x4, type 3                           // 5
   m_enterPreDelay; // +0x18, size 0x4, type 3                               // 6
   m_enterSpeed; // +0x1C, size 0x4, type 3                                  // 7
   m_enterGravity; // +0x20, size 0x4, type 3                                // 8
   m_enterMinDuration; // +0x24, size 0x4, type 3                            // 9
   m_enterMaxDuration; // +0x28, size 0x4, type 3                            // 10
   m_enterMinArcHeight; // +0x2C, size 0x4, type 3                           // 11
   m_enterMaxArcHeight; // +0x30, size 0x4, type 3                           // 12
   m_enterAnimStart; // +0x34, size 0x4, type 0                              // 13
   m_enterAnimLoop; // +0x38, size 0x4, type 0                               // 14
   m_rideAnimStart; // +0x3C, size 0x4, type 0                               // 15
   m_rideAnimLoop; // +0x40, size 0x4, type 0                                // 16
   m_rideUpperAnimStart; // +0x44, size 0x4, type 0                          // 17
   m_rideUpperAnimLoop; // +0x48, size 0x4, type 0                           // 18
   m_exitPreDelay; // +0x4C, size 0x4, type 3                                // 19
   m_exitSpeed; // +0x50, size 0x4, type 3                                   // 20
   m_exitGravity; // +0x54, size 0x4, type 3                                 // 21
   m_exitMinDuration; // +0x58, size 0x4, type 3                             // 22
   m_exitMaxDuration; // +0x5C, size 0x4, type 3                             // 23
   m_exitMinArcHeight; // +0x60, size 0x4, type 3                            // 24
   m_exitMaxArcHeight; // +0x64, size 0x4, type 3                            // 25
   m_exitAnimStart; // +0x68, size 0x4, type 0                               // 26
   m_exitAnimLoop; // +0x6C, size 0x4, type 0                                // 27
   m_exitAnimEnd; // +0x70, size 0x4, type 0                                 // 28
   m_passengerYaw; // +0x74, size 0x4, type 3                                // 29
   m_passengerPitch; // +0x78, size 0x4, type 3                              // 30
   m_passengerRoll; // +0x7C, size 0x4, type 3                               // 31
   m_passengerAttachmentID; // +0x80, size 0x4, type 0                       // 32
   m_vehicleEnterAnim; // +0x84, size 0x4, type 0                            // 33
   m_vehicleExitAnim; // +0x88, size 0x4, type 0                             // 34
   m_vehicleRideAnimLoop; // +0x8C, size 0x4, type 0                         // 35
   m_vehicleEnterAnimBone; // +0x90, size 0x4, type 0                        // 36
   m_vehicleExitAnimBone; // +0x94, size 0x4, type 0                         // 37
   m_vehicleRideAnimLoopBone; // +0x98, size 0x4, type 0                     // 38
   m_vehicleEnterAnimDelay; // +0x9C, size 0x4, type 3                       // 39
   m_vehicleExitAnimDelay; // +0xA0, size 0x4, type 3                        // 40
   m_vehicleAbilityDisplay; // +0xA4, size 0x4, type 0                       // 41
   m_enterUISoundID; // +0xA8, size 0x4, type 0                              // 42
   m_exitUISoundID; // +0xAC, size 0x4, type 0                               // 43
   m_uiSkin; // +0xB0, size 0x4, type 0                                      // 44
   m_flagsB; // +0xB4, size 0x4, type 0                                      // 45
   m_cameraEnteringDelay; // +0xB8, size 0x4, type 3                         // 46 -- here and below: added in 3.1
   m_cameraEnteringDuration; // +0xBC, size 0x4, type 3                      // 47
   m_cameraExitingDelay; // +0xC0, size 0x4, type 3                          // 48
   m_cameraExitingDuration; // +0xC4, size 0x4, type 3                       // 49
   m_cameraOffsetX; // +0xC8, size 0x4, type 3                               // 50
   m_cameraOffsetY; // +0xCC, size 0x4, type 3                               // 51
   m_cameraOffsetZ; // +0xD0, size 0x4, type 3                               // 52
   m_cameraPosChaseRate; // +0xD4, size 0x4, type 3                          // 53
   m_cameraFacingChaseRate; // +0xD8, size 0x4, type 3                       // 54
   m_cameraEnteringZoom; // +0xDC, size 0x4, type 3                          // 55
   m_cameraSeatZoomMin; // +0xE0, size 0x4, type 3                           // 56
   m_cameraSeatZoomMax; // +0xE4, size 0x4, type 3                           // 57
   m_enterAnimKitID; // +0xE8, size 0x4, type 0                              // 58 -- here and below: added after 3.3.5a
   m_rideAnimKitID; // +0xEC, size 0x4, type 0                               // 59
   m_exitAnimKitID; // +0xF0, size 0x4, type 0                               // 60
   m_vehicleEnterAnimKitID; // +0xF4, size 0x4, type 0                       // 61
   m_vehicleRideAnimKitID; // +0xF8, size 0x4, type 0                        // 62
   m_vehicleExitAnimKitID; // +0xFC, size 0x4, type 0                        // 63

    bool IsUsable() const { return m_flags & 0x2000000; }
};

6.0.1.18179

struct VehicleSeatRec {
  uint32_t m_ID;
  uint32_t m_flags;
  uint32_t m_attachmentID;           // apparently not directly the attachmentID, but mapped via g_vehicleGeoComponentLinks[] dd 14h, 22h, 13h, 15h, 16h, 11h, 17h, 18h, 19h, 0Fh, 10h, 25h, 26h, 27h, 28h, 29h, 2Ah, 2Bh, 2Ch, 2Dh, 2Eh, 0, 2Fh, 30h, 6, 5?
  float m_attachmentOffset[3];
  float m_enterPreDelay;
  float m_enterSpeed;
  float m_enterGravity;
  float m_enterMinDuration;
  float m_enterMaxDuration;
  float m_enterMinArcHeight;
  float m_enterMaxArcHeight;
  uint32_t m_enterAnimStart;
  uint32_t m_enterAnimLoop;
  uint32_t m_rideAnimStart;
  uint32_t m_rideAnimLoop;
  uint32_t m_rideUpperAnimStart;
  uint32_t m_rideUpperAnimLoop;
  float m_exitPreDelay;
  float m_exitSpeed;
  float m_exitGravity;
  float m_exitMinDuration;
  float m_exitMaxDuration;
  float m_exitMinArcHeight;
  float m_exitMaxArcHeight;
  uint32_t m_exitAnimStart;
  uint32_t m_exitAnimLoop;
  uint32_t m_exitAnimEnd;
  float m_passengerYaw;
  float m_passengerPitch;
  float m_passengerRoll;
  uint32_t m_passengerAttachmentID;
  uint32_t m_vehicleEnterAnim;
  uint32_t m_vehicleExitAnim;
  uint32_t m_vehicleRideAnimLoop;
  uint32_t m_vehicleEnterAnimBone;
  uint32_t m_vehicleExitAnimBone;
  uint32_t m_vehicleRideAnimLoopBone;
  float m_vehicleEnterAnimDelay;
  float m_vehicleExitAnimDelay;
  uint32_t m_vehicleAbilityDisplay;
  uint32_t m_enterUISoundID;
  uint32_t m_exitUISoundID;
  uint32_t m_flagsB;
  float m_cameraEnteringDelay;
  float m_cameraEnteringDuration;
  float m_cameraExitingDelay;
  float m_cameraExitingDuration;
  float m_cameraOffset[3];
  float m_cameraPosChaseRate;
  float m_cameraFacingChaseRate;
  float m_cameraEnteringZoom;
  float m_cameraSeatZoomMin;
  float m_cameraSeatZoomMax;
  uint32_t m_enterAnimKitID;
  uint32_t m_rideAnimKitID;
  uint32_t m_exitAnimKitID;
  uint32_t m_vehicleEnterAnimKitID;
  uint32_t m_vehicleRideAnimKitID;
  uint32_t m_vehicleExitAnimKitID;
  uint32_t m_cameraModeID;
  uint32_t m_flagsC;
  uint32_t m_uiSkinFileDataID;
};

enum VEHICLE_SEAT_FLAGS

   VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER                         = 0x00000001,
   VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE                          = 0x00000002,
   VEHICLE_SEAT_FLAG_UNK3                                             = 0x00000004,
   VEHICLE_SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_VOLUNTARY_EXIT  = 0x00000008,
   VEHICLE_SEAT_FLAG_UNK5                                             = 0x00000010,
   VEHICLE_SEAT_FLAG_UNK6                                             = 0x00000020,
   VEHICLE_SEAT_FLAG_UNK7                                             = 0x00000040,
   VEHICLE_SEAT_FLAG_UNK8                                             = 0x00000080,
   VEHICLE_SEAT_FLAG_UNK9                                             = 0x00000100,
   VEHICLE_SEAT_FLAG_HIDE_PASSENGER                                   = 0x00000200, // Passenger is hidden
   VEHICLE_SEAT_FLAG_ALLOW_TURNING                                    = 0x00000400, // needed for CGCamera__SyncFreeLookFacing
   VEHICLE_SEAT_FLAG_CAN_CONTROL                                      = 0x00000800, // Lua_UnitInVehicleControlSeat
   VEHICLE_SEAT_FLAG_CAN_CAST_MOUNT_SPELL                             = 0x00001000, // Can cast spells with SPELL_AURA_MOUNTED from seat (possibly 4.x only, 0 seats on 3.3.5a)
   VEHICLE_SEAT_FLAG_UNCONTROLLED                                     = 0x00002000, // can override !& VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT
   VEHICLE_SEAT_FLAG_CAN_ATTACK                                       = 0x00004000, // Can attack, cast spells and use items from vehicle
   VEHICLE_SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_FORCED_EXIT     = 0x00008000,
   VEHICLE_SEAT_FLAG_UNK17                                            = 0x00010000,
   VEHICLE_SEAT_FLAG_UNK18                                            = 0x00020000, // Needs research and support (28 vehicles): Allow entering vehicles while keeping specific permanent(?) auras that impose visuals (states like beeing under freeze/stun mechanic, emote state animations).
   VEHICLE_SEAT_FLAG_HAS_VEH_EXIT_ANIM_VOLUNTARY_EXIT                 = 0x00040000,
   VEHICLE_SEAT_FLAG_HAS_VEH_EXIT_ANIM_FORCED_EXIT                    = 0x00080000,
   VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE                         = 0x00100000,
   VEHICLE_SEAT_FLAG_UNK22                                            = 0x00200000,
   VEHICLE_SEAT_FLAG_REC_HAS_VEHICLE_ENTER_ANIM                       = 0x00400000,
   VEHICLE_SEAT_FLAG_IS_USING_VEHICLE_CONTROLS                        = 0x00800000, // Lua_IsUsingVehicleControls
   VEHICLE_SEAT_FLAG_ENABLE_VEHICLE_ZOOM                              = 0x01000000,
   VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT                                = 0x02000000, // Lua_CanExitVehicle - can enter and exit at free will
   VEHICLE_SEAT_FLAG_CAN_SWITCH                                       = 0x04000000, // Lua_CanSwitchVehicleSeats
   VEHICLE_SEAT_FLAG_HAS_START_WARITING_FOR_VEH_TRANSITION_ANIM_ENTER = 0x08000000,
   VEHICLE_SEAT_FLAG_HAS_START_WARITING_FOR_VEH_TRANSITION_ANIM_EXIT  = 0x10000000,
   VEHICLE_SEAT_FLAG_CAN_CAST                                         = 0x20000000, // Lua_UnitHasVehicleUI
   VEHICLE_SEAT_FLAG_UNK2                                             = 0x40000000, // checked in conjunction with 0x800 in CastSpell2
   VEHICLE_SEAT_FLAG_ALLOWS_INTERACTION                               = 0x80000000

enum VEHICLE_SEAT_FLAGS_B

   VEHICLE_SEAT_FLAG_B_NONE                     = 0x00000000,
   VEHICLE_SEAT_FLAG_B_USABLE_FORCED            = 0x00000002,
   VEHICLE_SEAT_FLAG_B_TARGETS_IN_RAIDUI        = 0x00000008,           // Lua_UnitTargetsVehicleInRaidUI
   VEHICLE_SEAT_FLAG_B_EJECTABLE                = 0x00000020,           // ejectable
   VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2          = 0x00000040,
   VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3          = 0x00000100,
   VEHICLE_SEAT_FLAG_B_UNK7                     = 0x00010000,           // Passenger forced to repeat all vehicle animations
   VEHICLE_SEAT_FLAG_B_KEEP_PET                 = 0x00020000,
   VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4          = 0x02000000,
   VEHICLE_SEAT_FLAG_B_CAN_SWITCH               = 0x04000000,
   VEHICLE_SEAT_FLAG_B_VEHICLE_PLAYERFRAME_UI   = 0x80000000            // Lua_UnitHasVehiclePlayerFrameUI - actually checked for flagsb &~ 0x80000000

enum VEHICLE_SEAT_FLAGS_C

   VEHICLE_SEAT_FLAG_C_HIDE_PET_FRAME           = 0x00000200,           // Script_UnitInVehicleHidesPetFrame