jimdroberts / FishMMO

FishNetworking MMO Template
MIT License
83 stars 16 forks source link

Don't allow adding removed characters as friends #29

Closed jeanke75 closed 4 months ago

jeanke75 commented 4 months ago

Reproduce: Character select > Delete >Select a different character > Connect Sever Select > Select a world > Connect Press 'J' (open friends list) > Add > Type in removed characters name > Add

Result: The removed character is added to the friends list

Expected result: Don't allow adding removed characters, either by removing them completely or only allow adding online players to the friends list.

Side notes:

jimdroberts commented 4 months ago

Characters are not completely deleted in the database unless specified. Most data persists just incase the need to reinstate the character arises. There is a Deleted field that is available to check if a character has been deleted or not. This field is was not checked when adding a friend to the database.

CharacterService.GetByName has been modified with a third field to force check if the character has been deleted or not.