v1.8.0.0 update
- fixed mod to work in v460
This commit is contained in:
parent
1fb7e162df
commit
f8418e36e3
13 changed files with 66 additions and 115 deletions
33
WBM/Data.cs
33
WBM/Data.cs
|
@ -11,19 +11,6 @@ namespace WBM
|
|||
Blue
|
||||
}
|
||||
|
||||
private enum QuestTypeEnum
|
||||
{
|
||||
Kill,
|
||||
Damage,
|
||||
Package,
|
||||
Missile,
|
||||
Capture,
|
||||
Play,
|
||||
Travel,
|
||||
Assist,
|
||||
Finish
|
||||
}
|
||||
|
||||
public struct PlayerStatsStruct
|
||||
{
|
||||
public int kills;
|
||||
|
@ -40,26 +27,6 @@ namespace WBM
|
|||
public int killsEloDelta;
|
||||
}
|
||||
|
||||
public enum GameModeEnum
|
||||
{
|
||||
DeathMatch,
|
||||
DemolitionDerby,
|
||||
ProtectLeader,
|
||||
ResourceCapture,
|
||||
Race,
|
||||
TankBattle,
|
||||
TankKing,
|
||||
CapturePoint,
|
||||
VehicleEscort,
|
||||
PackageDrop,
|
||||
ScudLaunch,
|
||||
BattleRoyale,
|
||||
Competitive,
|
||||
LobbyCompetitive,
|
||||
LobbyBR,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum GameStateEnum
|
||||
{
|
||||
WaitingOnPlayers,
|
||||
|
|
25
WBM/Util.cs
25
WBM/Util.cs
|
@ -45,34 +45,29 @@ namespace WBM
|
|||
return String.Format("{0:0.0}", number);
|
||||
}
|
||||
|
||||
public static float getGunZoom(NGNJNHEFLHB gun)
|
||||
public static float getGunZoom(CGMPHDEJMIG gun)
|
||||
{
|
||||
return gun.ADLGCCMDNED;
|
||||
return gun.EGDGNFIOIPO;
|
||||
}
|
||||
|
||||
public static float getGunFireTimer(NGNJNHEFLHB gun)
|
||||
public static float getGunFireTimer(CGMPHDEJMIG gun)
|
||||
{
|
||||
return gun.MAKBOBOAAHG;
|
||||
return gun.ALHAPEJFBMM;
|
||||
}
|
||||
|
||||
public static float getGunFireVelocity(NGNJNHEFLHB gun)
|
||||
public static float getGunFireVelocity(CGMPHDEJMIG gun)
|
||||
{
|
||||
return gun.HOIKHOJJBOG;
|
||||
return gun.CPKKPKBEDGG;
|
||||
}
|
||||
|
||||
public static float getGunFireRate(NGNJNHEFLHB gun)
|
||||
public static float getGunFireRate(CGMPHDEJMIG gun)
|
||||
{
|
||||
return gun.IHEEIAIOABG;
|
||||
return gun.DPACFNHLIKA;
|
||||
}
|
||||
|
||||
public static float getGunReloadTimer(NGNJNHEFLHB gun)
|
||||
public static float getGunReloadTimer(CGMPHDEJMIG gun)
|
||||
{
|
||||
return gun.NBLDKJAKFIB;
|
||||
}
|
||||
|
||||
public static float getGunCooldownTimer(NGNJNHEFLHB gun)
|
||||
{
|
||||
return gun.LBOBALHJBDM;
|
||||
return gun.PMLOOHEKAGB;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace WBM
|
|||
/// are event functions that gets called on specific stages of the component's lifecycle.
|
||||
/// More information can be found in the <see href="https://docs.unity3d.com/Manual/ExecutionOrder.html">unity's documentation page</see>.
|
||||
/// </summary>
|
||||
[BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.7.1.0")]
|
||||
[BepInPlugin("com.developomp.wbm", "War Brokers Mods", "1.8.0.0")]
|
||||
public partial class WBM : BaseUnityPlugin
|
||||
{
|
||||
/// This function is called as soon as the component becomes active.
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace WBM
|
|||
|
||||
private void setupClearChat()
|
||||
{
|
||||
this.drawChatMessageFuncRef = webguyType.GetMethod("EBDKFEJMEMB", bindFlags);
|
||||
this.drawChatMessageFuncRef = webguyType.GetMethod("MEDCOGOAHEN", bindFlags);
|
||||
this.clearChatShortcut = Config.Bind("Hotkeys", "clear chat", new KeyboardShortcut(KeyCode.Z, KeyCode.RightShift));
|
||||
}
|
||||
|
||||
|
|
|
@ -100,27 +100,27 @@ namespace WBM
|
|||
{
|
||||
get
|
||||
{
|
||||
PDEMAFHPNBD[] rawPlayerStatsArray = (PDEMAFHPNBD[])this.playerStatsArrayRef.GetValue(this.webguy);
|
||||
IACNKEGEEAG[] rawPlayerStatsArray = (IACNKEGEEAG[])this.playerStatsArrayRef.GetValue(this.webguy);
|
||||
Data.PlayerStatsStruct[] result = new Data.PlayerStatsStruct[rawPlayerStatsArray.Length];
|
||||
|
||||
for (int i = 0; i < rawPlayerStatsArray.Length; i++)
|
||||
{
|
||||
PDEMAFHPNBD currentlyParsing = rawPlayerStatsArray[i];
|
||||
IACNKEGEEAG currentlyParsing = rawPlayerStatsArray[i];
|
||||
|
||||
result[i] = new Data.PlayerStatsStruct
|
||||
{
|
||||
kills = currentlyParsing.CFMGCOGACPA,
|
||||
deaths = currentlyParsing.GABHLIIJHBJ,
|
||||
damage = currentlyParsing.CECNBFABADA,
|
||||
longestKill = currentlyParsing.GDFIBEEKMJA,
|
||||
points = currentlyParsing.HNHFAABONHO,
|
||||
headShots = currentlyParsing.GJLLOFLEHHD,
|
||||
vote = currentlyParsing.JCBAKMONPGC,
|
||||
mapVote = currentlyParsing.BOFANBBCNOH,
|
||||
gamesElo = currentlyParsing.IBHFIBAOKCB,
|
||||
gamesEloDelta = currentlyParsing.JMGOHGIGLPI,
|
||||
killsElo = currentlyParsing.GBIABKEEFOC,
|
||||
killsEloDelta = currentlyParsing.JAAKOCPIGJL,
|
||||
kills = currentlyParsing.IOOFDGPKMFK,
|
||||
deaths = currentlyParsing.FOKKPNMGKDP,
|
||||
damage = currentlyParsing.HABIHPNAEHO,
|
||||
longestKill = currentlyParsing.CEKBGCGKILN,
|
||||
points = currentlyParsing.FOBEJABPFJJ,
|
||||
headShots = currentlyParsing.NPMFKNDMOHB,
|
||||
vote = currentlyParsing.DGKDCINHCEA,
|
||||
mapVote = currentlyParsing.OCEJJALAMJI,
|
||||
gamesElo = currentlyParsing.EFMOAKCIAJP,
|
||||
gamesEloDelta = currentlyParsing.AAGINDPBBJJ,
|
||||
killsElo = currentlyParsing.FIEJIAFBDJP,
|
||||
killsEloDelta = currentlyParsing.MBJFMGKHFPM,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -132,15 +132,6 @@ namespace WBM
|
|||
private int prevKills = 0;
|
||||
private int killCountBeforeDeath = 0;
|
||||
|
||||
private FieldInfo currentAreaRef;
|
||||
private int currentAreaRaw
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.currentAreaRef.GetValue(this.webguy);
|
||||
}
|
||||
}
|
||||
|
||||
private FieldInfo teamListRef;
|
||||
private Data.TeamEnum[] teamListRaw
|
||||
{
|
||||
|
@ -162,14 +153,14 @@ namespace WBM
|
|||
}
|
||||
|
||||
private FieldInfo personGunRef;
|
||||
private NGNJNHEFLHB personGunRaw
|
||||
private CGMPHDEJMIG personGunRaw
|
||||
{
|
||||
get
|
||||
{
|
||||
return (NGNJNHEFLHB)this.personGunRef.GetValue(this.webguy);
|
||||
return (CGMPHDEJMIG)this.personGunRef.GetValue(this.webguy);
|
||||
}
|
||||
}
|
||||
private NGNJNHEFLHB personGun;
|
||||
private CGMPHDEJMIG personGun;
|
||||
|
||||
private FieldInfo nickListRef;
|
||||
private string[] nickListRaw
|
||||
|
@ -224,17 +215,16 @@ namespace WBM
|
|||
// References
|
||||
//
|
||||
|
||||
this.playerStatsArrayRef = webguyType.GetField("NAFCGDLLFJC", bindFlags);
|
||||
this.currentAreaRef = webguyType.GetField("FLJLJNLDFAM", bindFlags);
|
||||
this.teamListRef = webguyType.GetField("MNEJLPDLMBH", bindFlags);
|
||||
this.localPlayerIndexRef = webguyType.GetField("ALEJJPEPFOG", bindFlags);
|
||||
this.personGunRef = webguyType.GetField("IEGLIMLBDPH", bindFlags);
|
||||
this.nickListRef = webguyType.GetField("CLLDJOMEKIP", bindFlags);
|
||||
this.gameStateRef = webguyType.GetField("MCGMEPGBCKK", bindFlags);
|
||||
this.chatListRef = webguyType.GetField("MOOBJBOCANE", bindFlags);
|
||||
this.playerStatsArrayRef = webguyType.GetField("FLDPBAEABJG", bindFlags);
|
||||
this.teamListRef = webguyType.GetField("BFMPAFOBMKP", bindFlags);
|
||||
this.localPlayerIndexRef = webguyType.GetField("AEILDFPIIGG", bindFlags);
|
||||
this.personGunRef = webguyType.GetField("IDKKPOAJPMC", bindFlags);
|
||||
this.nickListRef = webguyType.GetField("MOOLDAMLJLO", bindFlags);
|
||||
this.gameStateRef = webguyType.GetField("NKADGEOAKKB", bindFlags);
|
||||
this.chatListRef = webguyType.GetField("PODNOOGFEFE", bindFlags);
|
||||
|
||||
this.addMessageFuncRef = webguyType.GetMethod("NBPKLIOLLEI", bindFlags);
|
||||
this.clearMessagesFuncRef = webguyType.GetMethod("IOCHBBACKFA", bindFlags);
|
||||
this.addMessageFuncRef = webguyType.GetMethod("NNLPKKPEBOF", bindFlags);
|
||||
this.clearMessagesFuncRef = webguyType.GetMethod("EIHHBPDPNDF", bindFlags);
|
||||
|
||||
//
|
||||
// Configurations
|
||||
|
|
|
@ -2,8 +2,6 @@ using BepInEx.Configuration;
|
|||
|
||||
using UnityEngine;
|
||||
|
||||
using System;
|
||||
|
||||
namespace WBM
|
||||
{
|
||||
partial class WBM
|
||||
|
@ -59,7 +57,7 @@ kill streak SFX: {this.killStreakSFX.Value} ({this.killStreakSFXShortcut.Value})
|
|||
new Rect(this.GUIOffsetX.Value, this.GUIOffsetY.Value, 220, 60),
|
||||
@"War Brokers Mods
|
||||
Made by [LP] POMP
|
||||
v1.7.1.0"
|
||||
v1.8.0.0"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@ using UnityEngine.UI;
|
|||
|
||||
namespace WBM
|
||||
{
|
||||
/// patch for onFPSChanged function
|
||||
[HarmonyPatch(typeof(webguy))]
|
||||
[HarmonyPatch("FHBMKCDMGII")]
|
||||
[HarmonyPatch("LIJHKNOLECJ")]
|
||||
class FPSSliderPatch
|
||||
{
|
||||
private static int defaultTargetFrameRate = -1;
|
||||
|
@ -14,21 +15,21 @@ namespace WBM
|
|||
|
||||
private static GameObject fpsSliderTextObj = GameObject.Find("fpsSlideFuckText");
|
||||
private static Slider slider = GameObject.Find("fpsSlider").GetComponent<Slider>();
|
||||
private static AccessTools.FieldRef<webguy, float> fpsValueRef = AccessTools.FieldRefAccess<webguy, float>("CLLNACDIPHE");
|
||||
private static AccessTools.FieldRef<webguy, float> fpsValueRef = AccessTools.FieldRefAccess<webguy, float>("KLAKEIFEFMH");
|
||||
|
||||
static bool Prefix(webguy __instance, float JKNNNLEEIAO)
|
||||
static bool Prefix(webguy __instance, float EJPANIOHKEC)
|
||||
{
|
||||
fpsValueRef(__instance) = JKNNNLEEIAO;
|
||||
int targetFrameRate = (int)(JKNNNLEEIAO * maxTargetFrameRate);
|
||||
fpsValueRef(__instance) = EJPANIOHKEC;
|
||||
int targetFrameRate = (int)(EJPANIOHKEC * maxTargetFrameRate);
|
||||
|
||||
if (targetFrameRate == 0)
|
||||
{
|
||||
((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, __instance.HNDAMJPNGAE("Disabled"));
|
||||
((InfernalBehaviour)__instance).NKANMPOLMOA(fpsSliderTextObj, __instance.HOLCODAHDKF("Disabled"));
|
||||
targetFrameRate = defaultTargetFrameRate;
|
||||
}
|
||||
else
|
||||
{
|
||||
((InfernalBehaviour)__instance).KKFJBNFGKEP(fpsSliderTextObj, targetFrameRate.ToString());
|
||||
((InfernalBehaviour)__instance).NKANMPOLMOA(fpsSliderTextObj, targetFrameRate.ToString());
|
||||
}
|
||||
|
||||
if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5;
|
||||
|
|
|
@ -16,17 +16,17 @@ namespace WBM
|
|||
{
|
||||
get
|
||||
{
|
||||
return ((LPJKBALIFCC)this.oldGunSoundRef.GetValue(this.webguy)).ADCOCHNNCHM;
|
||||
return ((HKPCKNFOBNA)this.oldGunSoundRef.GetValue(this.webguy)).DDKAHAAKKME;
|
||||
}
|
||||
}
|
||||
private AudioClip oldGunSound;
|
||||
|
||||
private FieldInfo AKSoundRef;
|
||||
private LPJKBALIFCC AKSoundRaw
|
||||
private HKPCKNFOBNA AKSoundRaw
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LPJKBALIFCC)this.AKSoundRef.GetValue(this.webguy);
|
||||
return (HKPCKNFOBNA)this.AKSoundRef.GetValue(this.webguy);
|
||||
}
|
||||
set
|
||||
{
|
||||
|
@ -36,11 +36,11 @@ namespace WBM
|
|||
private AudioClip newAKSound;
|
||||
|
||||
private FieldInfo SMGSoundRef;
|
||||
private LPJKBALIFCC SMGSoundRaw
|
||||
private HKPCKNFOBNA SMGSoundRaw
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LPJKBALIFCC)this.SMGSoundRef.GetValue(this.webguy);
|
||||
return (HKPCKNFOBNA)this.SMGSoundRef.GetValue(this.webguy);
|
||||
}
|
||||
set
|
||||
{
|
||||
|
@ -51,30 +51,30 @@ namespace WBM
|
|||
|
||||
private void setupOldGunSound()
|
||||
{
|
||||
this.oldGunSoundRef = webguyType.GetField("PINGEJAHHDI", bindFlags);
|
||||
this.AKSoundRef = webguyType.GetField("BJFBGCMEELH", bindFlags);
|
||||
this.SMGSoundRef = webguyType.GetField("HKDDIMFIHCE", bindFlags);
|
||||
this.oldGunSoundRef = webguyType.GetField("ICMCDLNEIAI", bindFlags);
|
||||
this.AKSoundRef = webguyType.GetField("DGEJAAPKEAD", bindFlags);
|
||||
this.SMGSoundRef = webguyType.GetField("OFAALIJFKEI", bindFlags);
|
||||
|
||||
this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true);
|
||||
this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange;
|
||||
this.onOldGunSoundChange(new object(), new EventArgs());
|
||||
|
||||
this.oldGunSound = this.oldGunSoundRaw;
|
||||
this.newAKSound = this.AKSoundRaw.ADCOCHNNCHM;
|
||||
this.newSMGSound = this.SMGSoundRaw.ADCOCHNNCHM;
|
||||
this.newAKSound = this.AKSoundRaw.DDKAHAAKKME;
|
||||
this.newSMGSound = this.SMGSoundRaw.DDKAHAAKKME;
|
||||
}
|
||||
|
||||
private void onOldGunSoundChange(object sender, EventArgs e)
|
||||
{
|
||||
if (this.useOldGunSoundConf.Value)
|
||||
{
|
||||
this.AKSoundRaw.ADCOCHNNCHM = this.oldGunSound;
|
||||
this.SMGSoundRaw.ADCOCHNNCHM = this.oldGunSound;
|
||||
this.AKSoundRaw.DDKAHAAKKME = this.oldGunSound;
|
||||
this.SMGSoundRaw.DDKAHAAKKME = this.oldGunSound;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AKSoundRaw.ADCOCHNNCHM = this.newAKSound;
|
||||
this.SMGSoundRaw.ADCOCHNNCHM = this.newSMGSound;
|
||||
this.AKSoundRaw.DDKAHAAKKME = this.newAKSound;
|
||||
this.SMGSoundRaw.DDKAHAAKKME = this.newSMGSound;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ namespace WBM
|
|||
|
||||
private void setCrouchState(bool crouchState)
|
||||
{
|
||||
OMOJPGNNKFN.NEELEHFDKBP.EGACOOOGDDC = crouchState;
|
||||
// CFPSGuy.inSt.isCrouching
|
||||
GENPAICHGGE.DMBBKHNIMOK.FHJOPAFOHLA = crouchState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace WBM
|
|||
|
||||
private void setupShowEloOnLeaderBoard()
|
||||
{
|
||||
this.showEloOnLeaderboardRef = webguyType.GetField("KDOBENAOLLF", bindFlags);
|
||||
this.showEloOnLeaderboardRef = webguyType.GetField("BCFHKALFBLB", bindFlags);
|
||||
|
||||
this.showEloOnLeaderboard = Config.Bind("Config", "show Elo on leaderboard", true);
|
||||
this.showEloOnLeaderboard.SettingChanged += this.onShowEloOnLeaderboardChange;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace WBM
|
|||
|
||||
private void setupShowSquadServer()
|
||||
{
|
||||
this.showSquadServerRef = webguyType.GetField("PHPIBBCFKFI", bindFlags);
|
||||
this.showSquadServerRef = webguyType.GetField("IKOJAEHBIJI", bindFlags);
|
||||
|
||||
this.showSquadServer = Config.Bind("Config", "show squad server", true);
|
||||
this.showSquadServer.SettingChanged += this.onShowSquadServerChange;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace WBM
|
|||
|
||||
private void setupShowTestingServer()
|
||||
{
|
||||
this.showTestingServerRef = webguyType.GetField("LHHEGFHLNJE", bindFlags);
|
||||
this.showTestingServerRef = webguyType.GetField("CCECDEDJELJ", bindFlags);
|
||||
|
||||
this.showTestingServer = Config.Bind("Config", "show testing server", true);
|
||||
this.showTestingServer.SettingChanged += this.onShowTestingServerChange;
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace WBM
|
|||
|
||||
fire Timer: {String.Format("{0:0.00}", Util.getGunFireTimer(this.personGun))}s (max: {String.Format("{0:0.00}", Util.getGunFireRate(this.personGun))}s)
|
||||
reload Timer: {Util.getGunReloadTimer(this.personGun)}
|
||||
cooldown Timer: {Util.getGunCooldownTimer(this.personGun)}
|
||||
speed: {Util.getGunFireVelocity(this.personGun)}
|
||||
zoom: {Util.getGunZoom(this.personGun)}"
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue