Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #163 from FireNameFN/MoneyCheatFix
Browse files Browse the repository at this point in the history
Money exploit fix
  • Loading branch information
Vonsant authored May 21, 2024
2 parents 2eda549 + 6f1331e commit 489e0cc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ private async void HandleUpdateCharacterMessage(MsgUpdateCharacter message)
var curPrefs = prefsData.Prefs!;
var session = _playerManager.GetSessionById(userId);

if (profile is HumanoidCharacterProfile humanoid)
if (curPrefs.Characters.TryGetValue(slot, out var storedProfile) && storedProfile is HumanoidCharacterProfile storedHumanoid)
{
if (humanoid.BankBalance != storedHumanoid.BankBalance)
return;
}
else if (humanoid.BankBalance != HumanoidCharacterProfile.DefaultBalance)
return;

// Corvax-Sponsors-Start: Ensure removing sponsor markings if client somehow bypassed client filtering
// WARN! It's not removing markings from DB!
var sponsorPrototypes = _sponsors != null && _sponsors.TryGetPrototypes(message.MsgChannel.UserId, out var prototypes)
Expand Down

0 comments on commit 489e0cc

Please sign in to comment.