make it send first time welcome message to new players.

This commit is contained in:
SilicaAndPina 2020-12-31 14:28:46 +13:00
parent be56815996
commit 876eb69113
2 changed files with 9 additions and 0 deletions

View file

@ -374,6 +374,7 @@ namespace HISP.Player
{
Database.CreateUserExt(UserId);
NewPlayer = true;
}

View file

@ -279,6 +279,14 @@ namespace HISP.Server
byte[] WorldData = PacketBuilder.CreateWorldData(World.ServerTime.Minutes, World.ServerTime.Days, World.ServerTime.Years, World.GetWeather());
sender.SendPacket(WorldData);
// Send first time message;
if (sender.LoggedinUser.NewPlayer)
{
byte[] NewUserMessage = PacketBuilder.CreateChat(Messages.NewUserMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
sender.SendPacket(NewUserMessage);
}
byte[] SecCodePacket = PacketBuilder.CreateSecCode(user.SecCodeSeeds, user.SecCodeInc, user.Administrator, user.Moderator);
sender.SendPacket(SecCodePacket);