Make the client validate character information (#3563)

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
DrSmugleaf
2021-03-08 03:07:53 +01:00
committed by GitHub
parent c60547990e
commit f682833c8d
6 changed files with 127 additions and 95 deletions

View File

@@ -62,7 +62,7 @@ namespace Content.Client.UserInterface
private bool _isDirty;
public int CharacterSlot;
public HumanoidCharacterProfile Profile;
public event Action<HumanoidCharacterProfile> OnProfileChanged;
public event Action<HumanoidCharacterProfile, int> OnProfileChanged;
public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IPrototypeManager prototypeManager,
IEntityManager entityManager)
@@ -709,7 +709,7 @@ namespace Content.Client.UserInterface
{
IsDirty = false;
_preferencesManager.UpdateCharacter(Profile, CharacterSlot);
OnProfileChanged?.Invoke(Profile);
OnProfileChanged?.Invoke(Profile, CharacterSlot);
}
private bool IsDirty