mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
Add remove buddy
This commit is contained in:
parent
1772ceb037
commit
80be845824
7 changed files with 44 additions and 6 deletions
|
@ -17,6 +17,7 @@ namespace HISP.Game
|
|||
public static string AddBuddyPending;
|
||||
public static string AddBuddyOtherPendingFormat;
|
||||
public static string AddBuddyYourNowBuddiesFormat;
|
||||
public static string AddBuddyDeleteBuddyFormat;
|
||||
|
||||
// Tag
|
||||
public static string TagYourItFormat;
|
||||
|
@ -1030,6 +1031,10 @@ namespace HISP.Game
|
|||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatAddBuddyRemoveBuddy(string buddyName)
|
||||
{
|
||||
return AddBuddyDeleteBuddyFormat.Replace("%PLAYERNAME%", buddyName);
|
||||
}
|
||||
public static string FormatTagTotalBuddies(int count)
|
||||
{
|
||||
return TagOtherBuddiesOnlineFormat.Replace("%TOTALBUDDIESON%", count.ToString("N0", CultureInfo.InvariantCulture));
|
||||
|
|
|
@ -1210,14 +1210,14 @@ namespace HISP.Game
|
|||
}
|
||||
message += Messages.BuddyListOfflineBuddys;
|
||||
|
||||
|
||||
foreach (int id in user.Friends.List.ToArray())
|
||||
{
|
||||
if (GameServer.IsUserOnline(id))
|
||||
continue;
|
||||
|
||||
message += Messages.BuddyListOfflineBuddys;
|
||||
string username = Database.GetUsername(id);
|
||||
int minutes = Convert.ToInt32(Math.Round((Converters.UnixTimeStampToDateTime(Database.GetPlayerLastLogin(id)) - DateTime.UtcNow).TotalMinutes));
|
||||
int minutes = Convert.ToInt32(Math.Round(DateTime.UtcNow.Subtract(Converters.UnixTimeStampToDateTime(Database.GetPlayerLastLogin(id))).TotalMinutes));
|
||||
|
||||
message += Messages.FormatOfflineBuddyEntry(username, id, minutes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue