/
UEClasses.cs
1378 lines (1154 loc) · 47.1 KB
/
UEClasses.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace PUBGTEST
{
#region Enums
enum EMovementMode : byte
{
MOVE_None = 0,
MOVE_Walking = 1,
MOVE_NavWalking = 2,
MOVE_Falling = 3,
MOVE_Swimming = 4,
MOVE_Flying = 5,
MOVE_Custom = 6,
MOVE_MAX = 7
}
public enum EFiringMode : byte
{
Normal = 0,
Burst = 1,
FullAuto = 2,
EFiringMode_MAX = 3
}
public enum EWeaponReloadMethod : byte
{
Magazine = 0,
OneByOne = 1,
OneByOneAndClip = 2,
EWeaponReloadMethod_MAX = 3
}
public enum EWeaponGripLeftHand : byte
{
EWeaponGripLeftHand__NormalRifle = 0,
EWeaponGripLeftHand__Foregrip1 = 1,
EWeaponGripLeftHand__Foregrip2 = 2,
EWeaponGripLeftHand__Thompson = 3,
EWeaponGripLeftHand__EWeaponGripLeftHand_MAX = 4
}
public enum EWeaponClass : byte
{
Class_Pistol = 0,
Class_SMG = 1,
Class_Rifle = 2,
Class_Carbine = 3,
Class_Shotgun = 4,
Class_Sniper = 5,
Class_DMR = 6,
Class_LMG = 7,
Class_Melee = 8,
Class_Throwable = 9,
Class_MAX = 10
}
public enum EThrownWeaponType : byte
{
Thrown_Grenade = 0,
Thrown_Molotov = 1,
Thrown_Other = 2,
Thrown_MAX = 3
}
public enum EStanceMode : byte
{
STANCE_None = 0,
STANCE_Stand = 1,
STANCE_Crouch = 2,
STANCE_Prone = 3,
STANCE_MAX = 4
}
#endregion
#region Structs
[StructLayout(LayoutKind.Explicit)]
public struct UWorld
{
[FieldOffset(0x30)]
public IntPtr pPersistentLevel;
[FieldOffset(0x58)]
public IntPtr pNetworkManager;
[FieldOffset(0x140)]
public IntPtr pOwningGameInstance;
public AGameNetworkManager NetworkManager
{
get
{
return M.Read<AGameNetworkManager>(this.pNetworkManager);
}
}
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct AGameNetworkManager
{
private fixed byte pad0[0x0388];
public int AdjustedNetSpeed; // 0x0388(0x0004) (CPF_ZeroCo
public float LastNetSpeedUpdateTime; // 0x038C(0x0004) (CPF_ZeroCo
public int TotalNetBandwidth; // 0x0390(0x0004) (CPF_ZeroCo
public int MinDynamicBandwidth; // 0x0394(0x0004) (CPF_ZeroCo
public int MaxDynamicBandwidth; // 0x0398(0x0004) (CPF_ZeroCo
public byte bIsStandbyCheckingEnabled; // 0x039C(0x0001) (CPF_Config
public byte bHasStandbyCheatTriggered; // 0x039C(0x0001)
fixed byte UnknownData00[0x3]; // 0x039D(0x0003) MISSED OFFS
public float StandbyRxCheatTime; // 0x03A0(0x0004) (CPF_ZeroCo
public float StandbyTxCheatTime; // 0x03A4(0x0004) (CPF_ZeroCo
public int BadPingThreshold; // 0x03A8(0x0004) (CPF_ZeroCo
public float PercentMissingForRxStandby; // 0x03AC(0x0004) (CPF_ZeroCo
public float PercentMissingForTxStandby; // 0x03B0(0x0004) (CPF_ZeroCo
public float PercentForBadPing; // 0x03B4(0x0004) (CPF_ZeroCo
public float JoinInProgressStandbyWaitTime; // 0x03B8(0x0004) (CPF_ZeroCo
public float MoveRepSize; // 0x03BC(0x0004) (CPF_ZeroCo
public float MAXPOSITIONERRORSQUARED; // 0x03C0(0x0004) (CPF_ZeroCo
public float MAXNEARZEROVELOCITYSQUARED; // 0x03C4(0x0004) (CPF_ZeroCo
public float CLIENTADJUSTUPDATECOST; // 0x03C8(0x0004) (CPF_ZeroCo
public float MAXCLIENTUPDATEINTERVAL; // 0x03CC(0x0004) (CPF_ZeroCo
public float MaxMoveDeltaTime; // 0x03D0(0x0004) (CPF_ZeroCo
public byte ClientAuthorativePosition; // 0x03D4(0x0001) (CPF_ZeroCo
fixed byte UnknownData01[0x3]; // 0x03D5(0x0003) MISSED OFFS
public float ClientErrorUpdateRateLimit; // 0x03D8(0x0004) (CPF_ZeroCo
public byte bMovementTimeDiscrepancyDetection; // 0x03DC(0x0001) (CPF_ZeroCo
public byte bMovementTimeDiscrepancyResolution; // 0x03DD(0x0001) (CPF_ZeroCo
fixed byte UnknownData02[0x2]; // 0x03DE(0x0002) MISSED OFFS
public float MovementTimeDiscrepancyMaxTimeMargin; // 0x03E0(0x0004) (CPF_ZeroCo
public float MovementTimeDiscrepancyMinTimeMargin; // 0x03E4(0x0004) (CPF_ZeroCo
public float MovementTimeDiscrepancyResolutionRate; // 0x03E8(0x0004) (CPF_ZeroCo
public float MovementTimeDiscrepancyDriftAllowance; // 0x03EC(0x0004) (CPF_ZeroCo
public byte bMovementTimeDiscrepancyForceCorrectionsDuringResolution; // 0x03F0(0x0001)
public byte bUseDistanceBasedRelevancy; // 0x03F1(0x0001) (CPF_ZeroCo
}
[StructLayout(LayoutKind.Explicit)]
public struct ULevel
{
[FieldOffset(0xA0)]
public TArray<AActor> AActors;
}
[StructLayout(LayoutKind.Explicit)]
public struct AActor
{
[FieldOffset(0x0)]
public IntPtr BasePointer;
[FieldOffset(0x18)]
public int Id;
[FieldOffset(0x150)]
public IntPtr pPawn;
[FieldOffset(0x168)]
public IntPtr pRootComponent;
[FieldOffset(0x0394)]
public float BaseEyeHeight;
[FieldOffset(0x2C0)]
public TArray<pADroppedItem> DroppedItemArray;
[FieldOffset(0x03A8)]
public IntPtr pPlayerState;
[FieldOffset(0x03F0)]
public IntPtr pCharacterMovement;
[FieldOffset(0x0498)]
public float CrouchedEyeHeight;
[FieldOffset(0x0938)]
public IntPtr pWeaponProcessor;
[FieldOffset(0x0940)]
public byte CharacterState;
[FieldOffset(0x09A0)]
public float Punch_Damage;
[FieldOffset(0x09A4)]
public float HeavyPunch_Damage;
[FieldOffset(0x0A00)]
public float Sprint_MaxSpeed;
[FieldOffset(0x0A88)]
public float ReleasingParachuteAltitude;
[FieldOffset(0x0A8C)]
public float ForceReleasingParachuteAltitude;
[FieldOffset(0x0E54)]
public float Health;
[FieldOffset(0x0E58)]
public float HealthMax;
[FieldOffset(0x0C1C)]
public float TargetingSpeedModifier;
[FieldOffset(0x0C28)]
public float Stand_SprintingSpeedModifier;
[FieldOffset(0x0C2C)]
public float Stand_SprintingBigGunModifier;
[FieldOffset(0x0C30)]
public float Stand_SprintingRifleModifier;
[FieldOffset(0x0C34)]
public float Stand_SprintingSmallGunMOdifier;
[FieldOffset(0x0C38)]
public float Crouch_RunningSpeedModifier;
[FieldOffset(0x0C3C)]
public float Crouch_SprintingSpeedModifier;
[FieldOffset(0x0C40)]
public float Prone_RunningSpeedModifier;
[FieldOffset(0x0C44)]
public float Prone_SprintingSpeedModifier;
public bool IsPlayer
{
get
{
return this.Id >= 60700 && this.Id <= 60800;
}
}
public bool IsDroppedItemInteractionComponent
{
get
{
return this.Id == 6854;
}
}
public bool IsDroppedItemGroup
{
get
{
return this.Id == 6834;
}
}
public bool IsVehicle
{
get
{
switch (this.Id)
{
/*UAZ*/
case 76152:
case 76156:
case 76166:
case 76165:
case 76169:
return true;
/*Dacia*/
case 75657:
case 75653:
case 75665:
case 75679:
case 75675:
return true;
/*Buggy*/
case 75371:
case 75375:
case 75379:
case 75401:
return true;
/*Jeep*/
case 76157:
return true;
/*Boat*/
case 75301:
return true;
/*Motorbike*/
case 75820:
return true;
default:
return false;
}
//return this.Id >= 75000 && this.Id <= 77000;
}
}
public bool IsAlive
{
get
{
return this.Health > 0;
}
}
public USceneComponent RootComponent
{
get
{
return M.Read<USceneComponent>(this.pRootComponent);
}
}
public UCharacterMovementComponent CharacterMovement
{
get
{
return M.Read<UCharacterMovementComponent>(this.pCharacterMovement);
}
}
public AWeaponProcessor WeaponProcessor
{
get
{
return M.Read<AWeaponProcessor>(this.pWeaponProcessor);
}
}
public Vector3 Location
{
get
{
return this.RootComponent.RelativeLocation;
}
}
public Vector3 EyeLocation
{
get
{
var location = this.Location;
location.Z += this.BaseEyeHeight;
return location;
}
}
public static IntPtr g_pLocalPlayer = IntPtr.Zero;
public static AActor GetLocalPlayer()
{
if (g_pLocalPlayer != IntPtr.Zero)
{
var localplayer = M.Read<AActor>(g_pLocalPlayer);
localplayer.BasePointer = g_pLocalPlayer;
return localplayer;
}
g_pLocalPlayer = G.OwningGameInstance.LocalPlayer.PlayerController.pLocalPlayer;
return M.Read<AActor>(g_pLocalPlayer);
}
}
[StructLayout(LayoutKind.Explicit)]
public struct AWeaponProcessor
{
[FieldOffset(0x0398)]
public TArray<ATslWeapon> EquippedWeapons;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct pADroppedItem
{
public IntPtr pActor;
fixed byte pad0[0x8];
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FText
{
fixed byte pad0[0x28];
public FString fstring;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FString
{
fixed sbyte arrName[64];
public override string ToString()
{
fixed (sbyte* pName = arrName)
return new string(pName);
}
}
[StructLayout(LayoutKind.Explicit)]
public struct ATslWeapon
{
[FieldOffset(0x0)]
public IntPtr BasePointer;
[FieldOffset(0x0518)]
public FWeaponData WeaponConfig;
[FieldOffset(0x0780)]
public int AmmoPerClip;
[FieldOffset(0x0784)]
public int CurrentAmmoInClip;
[FieldOffset(0x07F8)]
public FWeaponGunData WeaponGunConfig;
[FieldOffset(0x08B8)]
public FWeaponGunAnim WeaponGunAnim;
[FieldOffset(0x0990)]
public float TrajectoryGravityZ;
[FieldOffset(0x0994)]
public float RecoilSpreadScale;
[FieldOffset(0x0998)]
public byte FireAtViewPoint;
[FieldOffset(0x099C)]
public float DefaultTimerFrequency;
[FieldOffset(0x09A0)]
public float CrouchSpreadModifier;
[FieldOffset(0x09A4)]
public float ProneSpreadModifier;
[FieldOffset(0x09A8)]
public float WalkSpread;
[FieldOffset(0x09AC)]
public float RunSpread;
[FieldOffset(0x09B0)]
public float JumpSpread;
[FieldOffset(0x0878)]
public FWeaponDeviationData WeaponDeviationConfig;
[FieldOffset(0x09B8)]
public FTrajectoryWeaponData TrajectoryConfig;
[FieldOffset(0x0A18)]
public FRecoilInfo RecoilInfo;
#region ATslWeapon_Melee Variables
[FieldOffset(0x0790)]
public float Melee_Damage;
[FieldOffset(0x0794)]
public float Melee_WeaponImpact;
[FieldOffset(0x07A4)]
public float Melee_AllowedHitRangeLeeway;
#endregion
public void SetAmmoInClip(int nAmmo)
{
M.Write<int>(nAmmo, this.BasePointer + 0x784/*CurrentAmmoInClip*/);
}
public void SetBulletGravity(float flTrajectoryGravityZ)
{
M.Write<float>(flTrajectoryGravityZ, this.BasePointer + 0x0990/*TrajectoryGravityZ*/);
}
public void SetRecoilSpreadScale(float flRecoilSpreadScale)
{
M.Write<float>(flRecoilSpreadScale, this.BasePointer + 0x0994/*RecoilSpreadScale*/);
}
public void SetWalkSpread(float flWalkSpread)
{
M.Write<float>(flWalkSpread, this.BasePointer + 0x09A8/*WalkSpread*/);
}
public void SetRunSpread(float flRunSpread)
{
M.Write<float>(flRunSpread, this.BasePointer + 0x09AC/*RunSpread*/);
}
public void SetJumpSpread(float flJumpSpread)
{
M.Write<float>(flJumpSpread, this.BasePointer + 0x09B0/*JumpSpread*/);
}
public void SetFiringMode(int nIndex, EFiringMode FiringMode) => this.WeaponGunConfig.FiringModes.SetValue((byte)FiringMode, nIndex, false);
public void WriteStruct(FRecoilInfo RecoilInfo)
{
M.Write(RecoilInfo, BasePointer + 0xA18);
}
public void WriteStruct(FTrajectoryWeaponData TrajectoryConfig)
{
M.Write(TrajectoryConfig, BasePointer + 0x9B8);
}
public void WriteStruct(FWeaponGunData WeaponGunData)
{
M.Write(WeaponGunData, BasePointer + 0x07F8);
}
public void WriteStruct(FWeaponData WeaponConfig)
{
M.Write(WeaponConfig, BasePointer + 0x0518);
}
public void WriteStruct(FWeaponGunAnim WeaponGunAnim)
{
M.Write(WeaponGunAnim, BasePointer + 0x08B8);
}
public void WriteStruct(FWeaponDeviationData WeaponDeviationConfig)
{
M.Write(WeaponDeviationConfig, BasePointer + 0x0878);
}
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FWeaponData
{
public float TargetingFOV;
public float HoldBreathFOV;
public IntPtr Rarity;
public Vector3 SocketOffset_Shoulder;
Vector3 SocketOffset_Hand;
byte bApplyGripPoseLeft;
EWeaponGripLeftHand WeaponGripLeft;
EWeaponClass WeaponClass;
byte bUseDefaultScoreMultiplier;
public float ScoreMultiplierByDamage;
public float ScoreMultiplierByKill;
public float SwayModifier_Pitch;
public float SwayModifier_YawOffset;
public float SwayModifier_Movement;
public float SwayModifier_Stand;
public float SwayModifier_Crouch;
public float SwayModifier_Prone;
public float CameraDOF_Range;
public float CameraDOF_NearRange;
public float CameraDOF_Power;
public byte bUseDynamicReverbAK;
private fixed byte UnknownData00[0x3];
public float CurrentWeaponZero;
public float MinWeaponZero;
public float MaxWeaponZero;
public float AnimationKick;
private fixed byte UnknownData01[0x4];
public IntPtr RecoilMontage;
public byte DestructibleDoor;
public EThrownWeaponType ThrownType;
private fixed byte UnknownData02[0x2];
public float WeaponEquipDuration;
public float WeaponReadyDuration;
public byte bForceFireAfterEquip;
private fixed byte UnknownData03[0x3];
public float PhysicalBodyHitImpactPower;
}
[StructLayout(LayoutKind.Sequential)]
public struct FWeaponDeviationData
{
public float DeviationBase;
public float DeviationBaseAim;
public float DeviationBaseADS;
public float DeviationRecoilGain;
public float DeviationRecoilGainAim;
public float DeviationRecoilGainADS;
public float DeviationMax;
public float DeviationMinMove;
public float DeviationMaxMove;
public float DeviationMoveMultiplier;
public float DeviationMoveMinReferenceVelocity;
public float DeviationMoveMaxReferenceVelocity;
public float DeviationStanceStand;
public float DeviationStanceCrouch;
public float DeviationStanceProne;
public float DeviationStanceJump;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FWeaponGunAnim
{
public IntPtr Fire; // 0x0000
public byte bLoopedFire; // 0x0008
private fixed byte UnknownData00[0x7]; // 0x0009
public IntPtr Reload; // 0x0010
public IntPtr CharacterGripBlendspace; // 0x0018
public IntPtr CharacterLHGripBlendspace; // 0x0020
public IntPtr CharacterFire; // 0x0028
public IntPtr CharacterFireCycle; // 0x0030
public IntPtr CharacterFireSelector; // 0x0038
public IntPtr CharacterReloadTactical; // 0x0040
public IntPtr CharacterReloadCharge; // 0x0048
public IntPtr CharacterReloadByOneStart; // 0x0050
public IntPtr CharacterReloadByOneStop; // 0x0058
public IntPtr CharacterReloadByOneSingle; // 0x0060
public IntPtr WeaponReloadTactical; // 0x0068
public IntPtr WeaponReloadCharge; // 0x0070
public float ReloadDurationTactical; // 0x0078
public float ReloadDurationCharge; // 0x007C
public float ReloadDurationStart; // 0x0080
public float ReloadDurationLoop; // 0x0084
public float ReloadDurationMagOut; // 0x0088
public float FireCycleDelay; // 0x008C
public float FireCycleDuration; // 0x0090
public byte bCycleAfterLastShot; // 0x0094
public byte bCycleDuringReload; // 0x0095
private fixed byte UnknownData01[0x2]; // 0x0096
public IntPtr ShotCameraShake; // 0x0098
public IntPtr ShotCameraShakeIronsight; // 0x00A0
public IntPtr ShotCameraShakeADS; // 0x00A8
public IntPtr CycleCameraAnim; // 0x00B0
public float RecoilKickADS; // 0x00B8
public Vector3 MagDropLinearVelocity; // 0x00BC
public Vector3 MagDropAngularVelocity; // 0x00C8
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FWeaponGunData
{
public IntPtr AmmoItemClass; // 0x0000(0x0008) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public IntPtr TracerClass; // 0x0008(0x0008) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public int AmmoPerClip; // 0x0010(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float TimeBetweenShots; // 0x0014(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_BlueprintReadOnly, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float NoAnimReloadDuration; // 0x0018(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_BlueprintReadOnly, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
private fixed byte UnknownData00[0x4]; // 0x001C(0x0004) MISSED OFFSET
public TArray<byte> FiringModes; // 0x0020(0x0010) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance)
public int BurstShots; // 0x0030(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float BurstDelay; // 0x0034(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public int BulletPerFiring; // 0x0038(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_BlueprintReadOnly, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float FiringBulletsSpread; // 0x003C(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public byte bIsArrowProjectile; // 0x0040(0x0001) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public byte bRotationFromBarrelWhenScoped; // 0x0041(0x0001) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public EWeaponReloadMethod ReloadMethod; // 0x0042(0x0001) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public byte UnknownData01; // 0x0043(0x0001) MISSED OFFSET
public float ReloadDurationByOneInitial; // 0x0044(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float ReloadDurationByOneLoop; // 0x0048(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float MovementModifierAim; // 0x004C(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float MovementModifierScope; // 0x0050(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float WeaponLength; // 0x0054(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float ShoulderLength; // 0x0058(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float WeaponSuppressorLength; // 0x005C(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float TraceRadius; // 0x0060(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public float TraceAdditiveZ; // 0x0064(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public byte DebugWeaponCollision; // 0x0068(0x0001) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
private fixed byte UnknownData02[0x3]; // 0x0069(0x0003) MISSED OFFSET
public Vector3 HandWeaponOffset; // 0x006C(0x000C) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
public byte bManualCycleAfterShot; // 0x0078(0x0001) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
private fixed byte UnknownData03[0x3]; // 0x0079(0x0003) MISSED OFFSET
public float LongTailDelay; // 0x007C(0x0004) (CPF_Edit, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData)
}
[StructLayout(LayoutKind.Sequential)]
public struct FTrajectoryWeaponData
{
public float WeaponSpread;
public float AimingSpreadModifier;
public float ScopingSpreadModifier;
public float FiringSpreadBase;
public float StandRecoveryTime;
public float CrouchRecoveryTime;
public float ProneRecoveryTime;
public float RecoveryInterval;
public float RecoilSpeed;
public float RecoilRecoverySpeed;
public float RecoilPatternScale;
public float InitialSpeed;
public int HitDamage;
public float RangeModifier;
public float ReferenceDistance;
public float TravelDistanceMax;
public byte IsPenetrable;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct FRecoilInfo
{
//[FieldOffset(0x50)]
//public IntPtr BasePointer;
public float VerticalRecoilMin;
public float VerticalRecoilMax;
public float VerticalRecoilVariation;
public float VerticalRecoveryModifier;
public float VerticalRecoveryClamp;
public float VerticalRecoveryMax;
public float LeftMax;
public float RightMax;
public float HorizontalTendency;
private fixed byte UnknownData00[0x4];
public IntPtr RecoilCurve;
public int BulletsPerSwitch;
public float TimePerSwitch;
public byte bSwitchOnTime;
private fixed byte UnknownData01[0x3];
public float RecoilSpeed_Vertical;
public float RecoilSpeed_Horizontal;
public float RecoverySpeed_Vertical;
public float RecoilValue_Climb;
public float RecoilValue_Fall;
public float RecoilModifier_Stand;
public float RecoilModifier_Crouch;
public float RecoilModifier_Prone;
}
[StructLayout(LayoutKind.Explicit)]
public struct UTslSettings
{
[FieldOffset(0x28)]
public float RepDistance_Item;
[FieldOffset(0x2C)]
public float RepDistance_ItemGroup;
[FieldOffset(0x30)]
public float RepDistance_Character;
[FieldOffset(0x34)]
public float RepDistance_Weapon;
[FieldOffset(0x38)]
public float RepDistance_Vehicle;
[FieldOffset(0x3C)]
public float RepDistance_Parachute;
[FieldOffset(0x40)]
public float RepDistance_Door;
[FieldOffset(0x44)]
public float RepDistance_Window;
[FieldOffset(0x48)]
public float RepFrequency_Character;
[FieldOffset(0x4C)]
public float RepFrequency_WheeledVehicle;
[FieldOffset(0x50)]
public float RepFrequency_FloatingVehicle;
[FieldOffset(0x54)]
public float RepFrequency_Parachute;
[FieldOffset(0x58)]
public float RepFrequency_Aircraft;
[FieldOffset(0x5C)]
public float RepFrequency_CarePackage;
[FieldOffset(0x7C)]
public bool bBattlEyeEnabled;
[FieldOffset(0x7D)]
public bool bBattlEyeEnabledInPIE;
[FieldOffset(0x80)]
public float BattlEyeReliablePacketIntervalOnClient;
[FieldOffset(0x84)]
public float BattlEyeReliablePacketIntervalOnServer;
[FieldOffset(0x88)]
public float GameStateLogInterval;
[FieldOffset(0x8C)]
public float ServerStatLogInterval;
[FieldOffset(0x90)]
public float CharacterPositionLogInterval;
[FieldOffset(0x94)]
public float DestructibleComponentMaxDrawDistance;
[FieldOffset(0xD0)]
public float StoppedVehicleSpeedThreshold;
[FieldOffset(0xD4)]
public float LastDriverDuration;
[FieldOffset(0xD8)]
public float InteractableDistanceToleranceOnDedicatedServer;
[FieldOffset(0xDC)]
public float InteractableDistance_ItemDefault;
[FieldOffset(0x108)]
public bool bPreventFinishMatchInPIE;
[FieldOffset(0x109)]
public bool bEnableInitialItemDonator;
[FieldOffset(0x10C)]
public float InventoryMaxSpaceDefault;
[FieldOffset(0x13C)]
public float GameTimeMultiplier;
[FieldOffset(0x140)]
public byte AimOffsetRayCast;
[FieldOffset(0x20C)]
public float ClientSideHitLeeway;
[FieldOffset(0x210)]
public float ClientSideOriginDistanceLeeway;
[FieldOffset(0x214)]
public float TravelDistanceLeeway;
[FieldOffset(0x218)]
public bool bUseForceItemActorSpawn;
}
[StructLayout(LayoutKind.Explicit)]
public struct UGameInstance
{
[FieldOffset(0x38)]
public IntPtr pULocalPlayer; // TArray<class ULocalPlayer*>, deref twice
public ULocalPlayer LocalPlayer
{
get
{
IntPtr pLocalPlayer = M.Read<IntPtr>(this.pULocalPlayer);
var result = M.Read<ULocalPlayer>(pLocalPlayer);
result.pBase = pLocalPlayer;
return result;
}
}
}
[StructLayout(LayoutKind.Explicit)]
public struct ULocalPlayer
{
[FieldOffset(0x00)]
public IntPtr pBase;
[FieldOffset(0x30)]
public IntPtr pPlayerController;
[FieldOffset(0x58)]
public IntPtr pViewportClient;
[FieldOffset(0x70)]
public Vector3 Location;
public void SetLocation(Vector3 vecLocation)
{
M.Write<Vector3>(vecLocation, pBase + 0x70/*Location*/);
}
public APlayerController PlayerController
{
get
{
return M.Read<APlayerController>(this.pPlayerController);
}
}
public UGameViewportClient ViewportClient
{
get
{
return M.Read<UGameViewportClient>(this.pViewportClient);
}
}
}
[StructLayout(LayoutKind.Explicit)]
public struct UGameViewportClient
{
[FieldOffset(0x80)]
public IntPtr pUWorld;
}
[StructLayout(LayoutKind.Explicit)]
public struct APlayerController
{
[FieldOffset(0x0390)]
public IntPtr pLocalPlayer;
[FieldOffset(0x03B8)]
public FRotator ControlRotation;
[FieldOffset(0x0420)]
public IntPtr pPlayerCameraManager;
public APlayerCameraManager PlayerCameraManager
{
get
{
return M.Read<APlayerCameraManager>(pPlayerCameraManager);
}
}
}
[StructLayout(LayoutKind.Explicit)]
public struct APlayerCameraManager
{
[FieldOffset(0x3A0)]
public float DefaultFOV;
[FieldOffset(0x3A8)]
public float DefaultOrthoWidth;
[FieldOffset(0x3B0)]
public float DefaultAspectRatio;
[FieldOffset(0x400)]
public FCameraCacheEntry CameraCache;
}
[StructLayout(LayoutKind.Explicit)]
public struct FCameraCacheEntry
{
[FieldOffset(0x10)]
public FMinimalViewInfo POV;
}
[StructLayout(LayoutKind.Sequential)]
public struct FMinimalViewInfo
{
public Vector3 Location; // 0x0000(0x000C) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public FRotator Rotation; // 0x000C(0x000C) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public float FOV; // 0x0018(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public float OrthoWidth; // 0x001C(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public float OrthoNearClipPlane; // 0x0020(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public float OrthoFarClipPlane; // 0x0024(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public float AspectRatio; // 0x0028(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_IsPlainOldData)
public byte bConstrainAspectRatio; // 0x002C(0x0001) (CPF_Edit, CPF_BlueprintVisible)
public byte bUseFieldOfViewForLOD; // 0x002C(0x0001) (CPF_Edit, CPF_BlueprintVisible)
}
[StructLayout(LayoutKind.Sequential)]
public struct FRotator
{
public float Pitch;
public float Yaw;
public float Roll;
public FRotator(float flPitch, float flYaw, float flRoll)
{
Pitch = flPitch;
Yaw = flYaw;
Roll = flRoll;
}
public double Length
{
get
{
return Math.Sqrt(this.Pitch * this.Pitch + this.Yaw * this.Yaw + this.Roll * this.Roll);
}
}
public FRotator Clamp()
{
var result = this;
if (result.Pitch > 180)
result.Pitch -= 360;
else if (result.Pitch < -180)
result.Pitch += 360;
if (result.Yaw > 180)
result.Yaw -= 360;
else if (result.Yaw < -180)
result.Yaw += 360;
if (result.Pitch < -89)
result.Pitch = -89;
if (result.Pitch > 89)
result.Pitch = 89;
while (result.Yaw < -180.0f)
result.Yaw += 360.0f;
while (result.Yaw > 180.0f)
result.Yaw -= 360.0f;
result.Roll = 0;
return result;
}
public void GetAxes(out Vector3 x, out Vector3 y, out Vector3 z)
{
var m = ToMatrix();
x = new Vector3(m.M11, m.M12, m.M13);
y = new Vector3(m.M21, m.M22, m.M23);
z = new Vector3(m.M31, m.M32, m.M33);
}
public Vector3 ToVector()
{
float radPitch = (float)(this.Pitch * Math.PI / 180f);
float radYaw = (float)(this.Yaw * Math.PI / 180f);
float SP = (float)Math.Sin(radPitch);
float CP = (float)Math.Cos(radPitch);
float SY = (float)Math.Sin(radYaw);
float CY = (float)Math.Cos(radYaw);
return new Vector3(CP * CY, CP * SY, SP);
}