Make the client validate character information (#3563)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -48,7 +48,6 @@ namespace Content.Server.Preferences
|
||||
HandleDeleteCharacterMessage);
|
||||
}
|
||||
|
||||
|
||||
private async void HandleSelectCharacterMessage(MsgSelectCharacter message)
|
||||
{
|
||||
var index = message.SelectedCharacterIndex;
|
||||
@@ -107,9 +106,11 @@ namespace Content.Server.Preferences
|
||||
|
||||
var curPrefs = prefsData.Prefs!;
|
||||
|
||||
profile.EnsureValid();
|
||||
|
||||
var profiles = new Dictionary<int, ICharacterProfile>(curPrefs.Characters)
|
||||
{
|
||||
[slot] = HumanoidCharacterProfile.EnsureValid((HumanoidCharacterProfile) profile, _protos)
|
||||
[slot] = profile
|
||||
};
|
||||
|
||||
prefsData.Prefs = new PlayerPreferences(profiles, slot, curPrefs.AdminOOCColor);
|
||||
|
||||
Reference in New Issue
Block a user