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

Money exploit fix #163

Merged
merged 2 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ private async void HandleUpdateCharacterMessage(MsgUpdateCharacter message)

var curPrefs = prefsData.Prefs!;

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
Loading