mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-10 07:05:41 +12:00
fix mail count
This commit is contained in:
parent
e5fa0caccd
commit
6ff3d91135
2 changed files with 6 additions and 3 deletions
|
@ -23,8 +23,12 @@ namespace HISP.Player
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (Mail mail in MailMessages)
|
foreach (Mail mail in MailMessages)
|
||||||
|
{
|
||||||
if (!mail.Read)
|
if (!mail.Read)
|
||||||
|
{
|
||||||
i++;
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,8 +86,7 @@ namespace HISP.Player
|
||||||
mails[i].Read = true;
|
mails[i].Read = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] BaseStatsPacketData = PacketBuilder.CreatePlayerData(baseUser.Money, GameServer.GetNumberOfPlayers(), this.UnreadMailCount);
|
GameServer.UpdatePlayer(baseUser.LoggedinClient);
|
||||||
baseUser.LoggedinClient.SendPacket(BaseStatsPacketData);
|
|
||||||
}
|
}
|
||||||
public void AddMail(Mail mailMessage)
|
public void AddMail(Mail mailMessage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7535,7 +7535,7 @@ namespace HISP.Server
|
||||||
Logger.ErrorPrint(forClient.RemoteIp + "tried to update player information when not logged in.");
|
Logger.ErrorPrint(forClient.RemoteIp + "tried to update player information when not logged in.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
byte[] PlayerData = PacketBuilder.CreatePlayerData(forClient.LoggedinUser.Money, GameServer.GetNumberOfPlayers(), forClient.LoggedinUser.MailBox.MailCount);
|
byte[] PlayerData = PacketBuilder.CreatePlayerData(forClient.LoggedinUser.Money, GameServer.GetNumberOfPlayers(), forClient.LoggedinUser.MailBox.UnreadMailCount);
|
||||||
forClient.SendPacket(PlayerData);
|
forClient.SendPacket(PlayerData);
|
||||||
}
|
}
|
||||||
public static void UpdateUserFacingAndLocation(User user)
|
public static void UpdateUserFacingAndLocation(User user)
|
||||||
|
|
Loading…
Add table
Reference in a new issue