战地1 Struct - 图1

    1. template<typename T1, typename T2>
    2. struct pair
    3. {
    4. T1 first;
    5. T2 second;
    6. };
    7. template<typename T>
    8. struct hash_node
    9. {
    10. pair<uint64_t, T*> mValue;
    11. hash_node<T>* mpNext;
    12. };
    13. template<typename T>
    14. struct hashtable
    15. {
    16. uint64_t vtable;
    17. hash_node<T>** mpBucketArray;
    18. unsigned int mnBucketCount;
    19. unsigned int mnElementCount;
    20. //... some other stuff
    21. };
    22. template<typename T>
    23. struct hashtable_iterator
    24. {
    25. hash_node<T>* mpNode;
    26. hash_node<T>** mpBucket;
    27. };
    28. struct AxisAlignedBox {
    29. Vector min;
    30. Vector max;
    31. AxisAlignedBox::AxisAlignedBox() {}
    32. };
    33. struct LinearTransform_AABB {
    34. public:
    35. AxisAlignedBox m_Box;
    36. Matrix4x4 pad;
    37. LinearTransform_AABB::LinearTransform_AABB() {}
    38. };
    39. class ClientPlayerManager {
    40. public:
    41. };
    42. class PhysicsManager {
    43. public:
    44. char pad0[0x88]; // 0x0000
    45. //RayCaster* rayCaster; // 0x0088
    46. };
    47. class Level {
    48. public:
    49. char pad0[0x108]; // 0x0000
    50. PhysicsManager* physicsManager; //0x0108
    51. };
    52. class ClientGameContext {
    53. public:
    54. char pad_0x0000[0x30]; // 0x0000
    55. Level* level; // 0x0030
    56. char pad_0x0038[0x30]; // 0x0038
    57. ClientPlayerManager* m_clientPlayerManager; //0x0068
    58. static ClientGameContext* GetInstance() {
    59. return *(ClientGameContext**)(OFFSET_CLIENTGAMECONTEXT);
    60. }
    61. };
    62. class HealthComponent {
    63. public:
    64. char pad_0000[32]; //0x0000
    65. float m_Health; //0x0020
    66. float m_MaxHealth; //0x0024
    67. char pad_0028[24]; //0x0028
    68. float m_VehicleHealth; //0x0040
    69. char pad_0044[4092]; //0x0044
    70. }; //Size: 0x1040
    71. class VehicleEntityData {
    72. public:
    73. char pad_0000[504]; //0x0000
    74. float m_FrontMaxHealth; //0x01F8
    75. char pad_01FC[252]; //0x01FC
    76. char* m_namesid; //0x02F8
    77. char pad_0300[7488]; //0x0300
    78. }; //Size: 0x2040
    79. Vector Mat3Vector(Matrix4x4 mat, Vector vec);
    80. class ClientVehicleEntity {
    81. public:
    82. virtual void Function0(); //
    83. virtual void Function1(); //
    84. virtual void Function2(); //
    85. virtual void Function3(); //
    86. virtual void Function4(); //
    87. virtual void Function5(); //
    88. virtual void Function6(); //
    89. virtual void Function7(); //
    90. virtual void Function8(); //
    91. virtual void Function9(); //
    92. virtual void Function10(); //
    93. virtual void Function11(); //
    94. virtual void Function12(); //
    95. virtual void Function13(); //
    96. virtual void Function14(); //
    97. virtual void Function15(); //
    98. virtual void Function16(); //
    99. virtual void Function17(); //
    100. virtual void Function18(); //
    101. virtual void Function19(); //
    102. virtual void Function20(); //
    103. virtual void Function21(); //
    104. virtual void Function22(); //
    105. virtual void Function23(); //
    106. virtual void Function24();
    107. virtual void GetTransformAABB(LinearTransform_AABB& mTransform); // 26
    108. virtual void GetTransform(Matrix4x4* mTransform);
    109. HealthComponent* GetHealthComponent() {
    110. return *(HealthComponent**)((BYTE*)this + 0x1D0);
    111. };
    112. VehicleEntityData* GetEntityData() {
    113. return *(VehicleEntityData**)((BYTE*)this + 0x30);
    114. };
    115. Vector GetVehiclePosition()
    116. {
    117. LinearTransform_AABB _AABB;
    118. Matrix4x4 _Transform;
    119. GetTransform(&_Transform);
    120. Vector Position = Vector(_Transform.m[3][0], _Transform.m[3][1], _Transform.m[3][2]);
    121. Vector glmPos = Vector(Position.x, Position.y, Position.z);
    122. GetTransformAABB(_AABB);
    123. Vector min = Vector(_AABB.m_Box.min.x, _AABB.m_Box.min.y, _AABB.m_Box.min.z);
    124. Vector max = Vector(_AABB.m_Box.max.x, _AABB.m_Box.max.y, _AABB.m_Box.max.z);
    125. Matrix4x4 TransformMatrix{ _Transform.m[0][0], _Transform.m[1][0], _Transform.m[2][0], 0,
    126. _Transform.m[0][1], _Transform.m[1][1], _Transform.m[2][1], 0,
    127. _Transform.m[0][2], _Transform.m[1][2], _Transform.m[2][2], 0 };
    128. min = glmPos + Mat3Vector(TransformMatrix, min);
    129. max = glmPos + Mat3Vector(TransformMatrix, max);
    130. return Vector(min.x, min.y, min.z);
    131. }
    132. bool IsDead() {
    133. return !(this->GetHealthComponent()->m_VehicleHealth > 0.1f);
    134. }
    135. bool IsHorse()
    136. {
    137. return this->GetHealthComponent()->m_Health > 0.1f;
    138. }
    139. }; //Size: 0x0048
    140. class QuatTransform {
    141. public:
    142. Vector4 m_TransAndScale; //0x0000
    143. Vector4 m_Rotation; //0x0010
    144. }; //Size=0x0020
    145. class UpdatePoseResultData {
    146. public:
    147. enum BONES {
    148. BONE_HEAD = 0x35,
    149. BONE_NECK = 0x33,
    150. BONE_SPINE2 = 0x7,
    151. BONE_SPINE1 = 0x6,
    152. BONE_SPINE = 0x5,
    153. BONE_LEFTSHOULDER = 0x8,
    154. BONE_RIGHTSHOULDER = 0xA3,
    155. BONE_LEFTELBOWROLL = 0xE,
    156. BONE_RIGHTELBOWROLL = 0xA9,
    157. BONE_LEFTHAND = 0x10,
    158. BONE_RIGHTHAND = 0xAB,
    159. BONE_LEFTKNEEROLL = 0x11F,
    160. BONE_RIGHTKNEEROLL = 0x12D,
    161. BONE_LEFTFOOT = 0x115,
    162. BONE_RIGHTFOOT = 0x123
    163. };
    164. char pad_0000[24]; //0x0000
    165. class QuatTransform* m_ActiveWorldTransforms; //0x0020
    166. char pad_0020[4128]; //0x0020
    167. }; //Size: 0x1040
    168. class BoneCollisionComponent {
    169. public:
    170. UpdatePoseResultData m_ragdollTransforms; //0x0000
    171. }; //Size: 0x0008
    172. class ClientSoldierWeaponsComponent
    173. {
    174. public:
    175. enum WeaponSlot
    176. {
    177. M_PRIMARY = 0,
    178. M_SECONDARY = 1,
    179. M_GADGET = 2,
    180. M_GRENADE = 6,
    181. M_KNIFE = 7
    182. };
    183. char pad_0x0000[0x8A8]; //0x0000
    184. DWORD64 m_handler; //0x08A8
    185. char pad_0x08B0[0x160]; //0x08B0
    186. DWORD32 m_activeSlot; //0x0A10 //当前武器
    187. char pad_0x0A14[0x62C]; //0x0A14
    188. };
    189. class BulletEntityData
    190. {
    191. public:
    192. char pad0[0x94]; // 0x0000
    193. float m_timeToLive; // 0x0094
    194. char pad1[0xa8]; // 0x0098
    195. float m_Gravity; //0x0140
    196. float m_impactImpulse; //0x0144
    197. float m_detonationTimeVariation; //0x0148
    198. float m_vehicleDetonationRadius; //0x014C
    199. float m_vehicleDrtonationActivationDelay; //0x0150
    200. float m_flyBySoundRadius; //0x0154
    201. float m_flyBySoundSpeed; //0x0158
    202. float m_firstFraneTravelDistance; //0x015C
    203. float m_distributeDamageOverTime; //0x0160
    204. char _0x0164[4];
    205. float m_StartDamage; //0x0168
    206. float m_EndDamage; //0x016C
    207. float m_DamageFallOff; //0x0170
    208. float m_DamageFallOffEndDistance; //0x0174
    209. float m_TimeToArmExplosion; //0x0178
    210. char _0x017C[4];
    211. BYTE m_bHasVehicleDetination; //0x0180
    212. BYTE m_bInstantHit; //0x0181
    213. BYTE m_bStopTrail; //0x0182
    214. char _0x0183[701];
    215. };
    216. class ShotConfigData
    217. {
    218. public:
    219. char pad_0000[168]; //0x0000
    220. float m_initialSpeed; //0x00A8 //子弹初速度
    221. char pad_00AC[52]; //0x00AC
    222. BulletEntityData* m_pProjectileData; //0x00E0
    223. char pad_00E8[28]; //0x00E8
    224. uint8_t shellbullet; //0x0104
    225. char pad_0105[287]; //0x0105
    226. float speedfire; //0x0224
    227. float speedfire2; //0x0228
    228. char pad_022C[3609]; //0x022C
    229. }; //Size=0x0808
    230. class PrimaryFire
    231. {
    232. public:
    233. char pad_0x0000[0x10]; //0x0000
    234. ShotConfigData* m_shotConfigData; //0x0010
    235. char pad_0x0018[0x7F0]; //0x0018
    236. }; //Size=0x0808
    237. struct GunSwayDispersionData {
    238. float m_MinAngle; //0x0000
    239. float m_MaxAngle; //0x0004
    240. float m_IncreasePerShot; //0x0008
    241. float m_DecreasePerSecond; //0x000C
    242. float m_NoFireDecreasePerSecond; //0x0010
    243. float m_NoFireTimeThreshold; //0x0014
    244. };
    245. struct GunSwayDispersionModData {
    246. float m_MinAngleModifier; //0x0000
    247. float m_MaxAngleModifier; //0x0004
    248. float m_IncreasePerShotModifier; //0x0008
    249. float m_DecreasePerSecondModifier; //0x000C
    250. float m_NoFireDecreasePerSecondModifier; //0x0010
    251. float m_NoFireTimeThresholdModifier; //0x0014
    252. float m_FirstShotDispersionModifier; //0x0018
    253. };
    254. struct GunSwayRecoilData {
    255. float m_RecoilAmplitudeMax; //0x0000
    256. float m_RecoilAmplitudeIncPerShot; //0x0004
    257. float m_HorizontalRecoilAmplitudeIncPerShotMin; //0x0008
    258. float m_HorizontalRecoilAmplitudeIncPerShotMax; //0x000C
    259. float m_HorizontalRecoilAmplitudeMax; //0x0010
    260. float m_RecoilAmplitudeDecreaseFactor; //0x0014
    261. };
    262. struct GunSwayRecoilModData {
    263. float m_RecoilMagnitudeMod; //0x0000
    264. float m_RecoilAngleMod; //0x0004
    265. float m_FirstShotRecoilMod; //0x0008
    266. float m_RecoilAmplitudeDecreaseFactorMod; //0x000C
    267. float m_RecoilAngleOffset; //0x0010
    268. };
    269. struct GunSwayStanceTransition {
    270. GunSwayDispersionData m_MaxPenaltyValue; //0x0000
    271. float m_CoolDown; //0x0018
    272. };
    273. struct GunSwayBaseMoveJumpData {
    274. GunSwayDispersionData m_BaseValue; //0x0000
    275. GunSwayDispersionData m_Moving; //0x0018
    276. GunSwayDispersionData m_Jumping; //0x0030
    277. GunSwayDispersionData m_Sprinting; //0x0048
    278. GunSwayRecoilData m_Recoil; //0x0060
    279. };
    280. struct GunSwayStandData {
    281. GunSwayBaseMoveJumpData m_NoZoom; //0x0000
    282. GunSwayBaseMoveJumpData m_Zoom; //0x0078
    283. };
    284. struct GunSwayBaseMoveData {
    285. GunSwayDispersionData m_BaseValue; //0x0000
    286. GunSwayDispersionData m_Moving; //0x0018
    287. GunSwayRecoilData m_Recoil; //0x0030
    288. };
    289. struct GunSwayCrouchProneData {
    290. GunSwayBaseMoveData m_NoZoom; //0x0000
    291. GunSwayBaseMoveData m_Zoom; //0x0048
    292. };
    293. struct GunSwayStanceZoomModifierData {
    294. GunSwayDispersionModData m_DispersionMod; //0x0000
    295. GunSwayDispersionModData m_MovingDispersionMod; //0x001C
    296. GunSwayDispersionModData m_SprintingDispersionMod; //0x0038
    297. float m_RecoilMagnitudeMod; //0x0054
    298. float m_RecoilAngleMod; //0x0058
    299. float m_RecoilAngleOffset; //0x005C
    300. float m_FirstShotRecoilMod; //0x0060
    301. float m_RecoilAmplitudeDecreaseFactorMod; //0x0064
    302. };
    303. class GunSwayData
    304. {
    305. public:
    306. GunSwayDispersionData* m_Dispersion; //0x0010
    307. GunSwayRecoilData* m_Recoil; //0x0018
    308. GunSwayStanceTransition* m_StanceTransitionDispersion; //0x0020
    309. GunSwayDispersionModData* m_SuppressionDispersionModifiers; //0x0028
    310. GunSwayRecoilModData* m_SuppressionRecoilModifiers; //0x0030
    311. GunSwayStandData m_Stand; //0x0038
    312. GunSwayCrouchProneData m_Crouch; //0x0128
    313. GunSwayCrouchProneData m_Prone; //0x01B8
    314. GunSwayStanceTransition m_ProneToCrouch; //0x0248
    315. GunSwayStanceTransition m_ProneToStand; //0x0264
    316. GunSwayStanceTransition m_CrouchToProne; //0x0280
    317. GunSwayStanceTransition m_CrouchToStand; //0x029C
    318. GunSwayStanceTransition m_StandToProne; //0x02B8
    319. GunSwayStanceTransition m_StandToCrouch; //0x02D4
    320. GunSwayStanceZoomModifierData m_SuppressionModifierUnzoomed; //0x02F0
    321. GunSwayStanceZoomModifierData m_SuppressionModifierZoomed; //0x0358
    322. //Array<GunSwayModifierUnlock> m_ModifierUnlocks; //0x03C0 -- dont need it
    323. char padx[8];
    324. float m_ShootingRecoilDecreaseScale; //0x03C8
    325. float m_FirstShotNoZoomDispersionMultiplier; //0x03CC
    326. float m_FirstShotZoomDispersionMultiplier; //0x03D0
    327. float m_FirstShotRecoilMultiplier; //0x03D4
    328. float m_PowerOfDispersionRandom; //0x03D8
    329. char _0x03DC[12];
    330. //CameraRecoilData* m_CameraRecoil; //0x03E0
    331. bool m_CameraRecoilWhenZoomed; //0x03E8
    332. char _0x03E9[7];
    333. };
    334. class WeaponSway
    335. {
    336. public:
    337. char pad_0000[8]; //0x0000
    338. GunSwayData* m_pSwayData; //0x0008
    339. char pad_0010[48]; //0x0010
    340. };
    341. class WeaponFiring
    342. {
    343. public:
    344. char pad_0000[80]; //0x0000
    345. WeaponSway* m_pSway; //0x0050
    346. char pad_0058[216]; //0x0058
    347. PrimaryFire* m_pPrimaryFire; //0x0130
    348. char pad_0138[3848]; //0x0138
    349. }; //Size=0x0808
    350. class ClientSoldierWeapon
    351. {
    352. public:
    353. char pad_0x0000[0x4A48]; //0x0000
    354. WeaponFiring* m_pPrimary; //0x4A48
    355. char pad_0x4A50[0x5F0]; //0x4A50
    356. };
    357. class ClientSoldierEntity {
    358. public:
    359. char pad_0000[464]; //0x0000
    360. HealthComponent* healthcomponent; //0x01D0
    361. char pad_01D8[696]; //0x01D8
    362. BoneCollisionComponent* bonecollisioncomponent; //0x0490
    363. char pad_0498[363]; //0x0498
    364. uint8_t N00000670; //0x0603
    365. float authorativeYaw; //0x0604
    366. char pad_0608[41]; //0x0608
    367. uint8_t N00000521; //0x0631
    368. char pad_0632[6]; //0x0632
    369. uint8_t poseType; //0x0638
    370. char pad_0639[95]; //0x0639
    371. ClientSoldierWeaponsComponent* clientsoldierweaponscomponent;//0x0698
    372. char pad_06A0[73]; //0x06A0
    373. uint8_t N00000538; //0x06E9
    374. uint8_t N0000022B; //0x06EA
    375. uint8_t occluded; //0x06EB
    376. char pad_06EC[669]; //0x06EC
    377. uint8_t N0000058C; //0x0989
    378. char pad_098A[6]; //0x098A
    379. Vector location; //0x0990
    380. char pad_099C[1712]; //0x099C
    381. bool IsValid() {
    382. return (this->healthcomponent->m_Health > 0.1f && this->healthcomponent->m_Health <= this->healthcomponent->m_MaxHealth);
    383. }
    384. bool IsDead() {
    385. return !(this->healthcomponent->m_Health > 0.1f);
    386. }
    387. bool IsVisible() {
    388. return (this->occluded == false);
    389. }
    390. AxisAlignedBox GetAABB() {
    391. AxisAlignedBox aabb = AxisAlignedBox();
    392. if (this->poseType == 0) // standing 站立
    393. {
    394. aabb.min = Vector(0.f, 0.f, 0.f);
    395. aabb.max = Vector(0.f, 1.700000f, 0.f);
    396. }
    397. if (this->poseType == 1) // crouching 蹲伏
    398. {
    399. aabb.min = Vector(0.f, 0.f, 0.f);
    400. aabb.max = Vector(0.f, 1.150000f, 0.f);
    401. }
    402. if (this->poseType == 2) // prone 俯卧
    403. {
    404. aabb.min = Vector(0.f, 0.f, 0.f);
    405. aabb.max = Vector(0.f, 0.400000f, 0.f);
    406. }
    407. return aabb;
    408. }
    409. bool GetBonePos(int BoneId, Vector& vOut);
    410. }; //Size: 0x104C
    411. class ClientPlayer {
    412. public:
    413. virtual~ClientPlayer();
    414. virtual DWORD_PTR GetCharacterEntity(); //=> ClientSoldierEntity + 0x268
    415. virtual DWORD_PTR GetCharacterUserData(); //=> PlayerCharacterUserData
    416. virtual class EntryComponent* GetEntryComponent();
    417. virtual bool InVehicle();
    418. virtual unsigned int getId();
    419. char _0x0008[16];
    420. char* name; //0x0018
    421. char pad_0020[32]; //0x0020
    422. char szName[8]; //0x0040
    423. char pad_0048[7144]; //0x0048
    424. uint8_t N00000393; //0x1C30
    425. uint8_t N0000042C; //0x1C31
    426. char pad_1C32[2]; //0x1C32
    427. uint8_t teamId; //0x1C34
    428. char pad_1C35[259]; //0x1C35
    429. ClientVehicleEntity* clientVehicleEntity; //0x1D38
    430. char pad_1D40[8]; //0x1D40
    431. ClientSoldierEntity* clientSoldierEntity; //0x1D48
    432. char pad_1D50[736]; //0x1D50
    433. };
    434. class RenderView {
    435. public:
    436. char pad_0x0000[0x320]; //0x0000
    437. Matrix4x4 m_viewMatrixInverse; //0x0320
    438. char pad_0x0360[0x100]; //0x0360
    439. Matrix4x4 viewProj; //0x0460
    440. char pad_0x04A0[0x28]; //0x04A0
    441. }; //Size: 0x05C0
    442. class GameRenderer {
    443. public:
    444. char pad_0000[96]; //0x0000
    445. class RenderView* renderView; //0x0060
    446. char pad_0068[4112]; //0x0068
    447. static GameRenderer* GetInstance() {
    448. return *(GameRenderer**)OFFSET_GAMERENDERER;
    449. }
    450. }; //Size: 0x0088
    451. enum BoneIds {
    452. BONE_Head = 0x35,
    453. BONE_Neck = 0x33,
    454. BONE_SPINE2 = 0x7,
    455. BONE_SPINE1 = 0x6,
    456. BONE_Spine = 0x5,
    457. BONE_LeftShoulder = 0x8,
    458. BONE_RightShoulder = 0xA3,
    459. BONE_LeftElbowRoll = 0xE,
    460. BONE_RightElbowRoll = 0xA9,
    461. BONE_LeftHand = 0x10,
    462. BONE_RightHand = 0xAB,
    463. BONE_RightKneeRoll = 0x11F,
    464. BONE_LeftKneeRoll = 0x12D,
    465. BONE_LeftFoot = 0x115,
    466. BONE_RightFoot = 0x123
    467. };
    468. class DxRenderer;
    469. class Screen;
    470. class DxRenderer {
    471. public:
    472. char pad_0x0000[0x810]; //0x0000
    473. __int32 m_frameCounter; //0x0810
    474. __int32 m_framesInProgress; //0x0814
    475. __int32 m_framesInProgress2; //0x0818
    476. unsigned char m_isActive; //0x081C
    477. char pad_0x081D[0x3]; //0x081D
    478. Screen* pScreen; //0x0820
    479. char pad_0x0828[0x78]; //0x0828
    480. ID3D11Device* m_pDevice; //0x08A0
    481. ID3D11DeviceContext* m_pContext; //0x08A8
    482. char pad_0x08B0[0x68]; //0x08B0
    483. char* m_AdapterName; //0x0918
    484. char pad_0x0920[0x28]; //0x0920
    485. static DxRenderer* GetInstance() {
    486. return *(DxRenderer**)(OFFSET_DXRENDERER);
    487. }
    488. };
    489. class Screen {
    490. public:
    491. char pad_0x0000[0x5F]; //0x0000
    492. unsigned char m_isTopWindow; //0x005F
    493. unsigned char m_isMinimized; //0x0060
    494. unsigned char m_isMaximized; //0x0061
    495. unsigned char m_isResizing; //0x0062
    496. char pad_0x0063[0x5]; //0x0063
    497. __int32 m_width; //0x0068
    498. __int32 m_height; //0x006C
    499. char pad_0x0070[0x210]; //0x0070
    500. IDXGISwapChain* m_swapChain; //0x0280
    501. char pad_0x0288[0xB8]; //0x0288
    502. }; //Size=0x0340