mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
"Players Here" shows up, but doesnt do anything
This commit is contained in:
parent
bd18415bbf
commit
c3585b655a
7 changed files with 157 additions and 12 deletions
|
@ -29,6 +29,14 @@ namespace HISP.Player
|
|||
|
||||
}
|
||||
|
||||
public bool IsFriend(int friendUserId)
|
||||
{
|
||||
foreach (int userId in List)
|
||||
if (userId == friendUserId)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void RemoveFriend(int userid)
|
||||
{
|
||||
Database.RemoveBuddy(baseUser.Id, userid);
|
||||
|
@ -39,9 +47,10 @@ namespace HISP.Player
|
|||
|
||||
User removeFrom = GameServer.GetUserById(userid);
|
||||
removeFrom.Friends.List.Remove(baseUser.Id);
|
||||
|
||||
}
|
||||
catch (KeyNotFoundException) { /* User is ofline, remove from database is sufficent */ };
|
||||
|
||||
|
||||
|
||||
baseUser.Friends.List.Remove(userid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue