mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
Fix stuffs
This commit is contained in:
parent
456cc2943b
commit
eb8ea14fa7
5 changed files with 19 additions and 8 deletions
|
@ -45,9 +45,9 @@ namespace HISP.Game.Horse
|
|||
|
||||
|
||||
BasicStats = new HorseInfo.BasicStats(this, 1000, 0, 1000, 1000, 500, 200, 1000, 0);
|
||||
int inteligence = (GameServer.RandomNumberGenerator.Next(breed.BaseStats.Inteligence, (breed.BaseStats.Inteligence * 2)) - breed.BaseStats.Inteligence);
|
||||
int personality = (GameServer.RandomNumberGenerator.Next(breed.BaseStats.Personality, (breed.BaseStats.Personality * 2)) - breed.BaseStats.Personality);
|
||||
int height = GameServer.RandomNumberGenerator.Next(breed.BaseStats.MinHeight, breed.BaseStats.MaxHeight);
|
||||
int inteligence = (GameServer.RandomNumberGenerator.Next(breed.BaseStats.Inteligence, ((breed.BaseStats.Inteligence * 2)) - breed.BaseStats.Inteligence) + 1);
|
||||
int personality = (GameServer.RandomNumberGenerator.Next(breed.BaseStats.Personality, ((breed.BaseStats.Personality * 2)) - breed.BaseStats.Personality) + 1);
|
||||
int height = GameServer.RandomNumberGenerator.Next(breed.BaseStats.MinHeight, breed.BaseStats.MaxHeight + 1);
|
||||
AdvancedStats = new HorseInfo.AdvancedStats(this, 0, 0, 0, 0, inteligence, 0, personality, height);
|
||||
|
||||
Equipment = new HorseInfo.HorseEquips();
|
||||
|
|
|
@ -72,8 +72,10 @@ namespace HISP.Game
|
|||
{
|
||||
|
||||
int rng = GameServer.RandomNumberGenerator.Next(0, Riddles.Length);
|
||||
if (Database.HasPlayerCompletedRiddle(rng, user.Id))
|
||||
if (Database.HasPlayerCompletedRiddle(Riddles[rng].Id, user.Id))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return Riddles[rng];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,11 +78,11 @@ namespace HISP.Player
|
|||
{
|
||||
ItemInstance mailMessageFromPlayer = new ItemInstance(Item.MailMessage, -1, mails[i].RandomId);
|
||||
baseUser.Inventory.AddIgnoringFull(mailMessageFromPlayer);
|
||||
mails[i].Read = true;
|
||||
}
|
||||
mails[i].Read = true;
|
||||
}
|
||||
|
||||
byte[] BaseStatsPacketData = PacketBuilder.CreatePlayerData(baseUser.Money, GameServer.GetNumberOfPlayers(), baseUser.MailBox.UnreadMailCount);
|
||||
byte[] BaseStatsPacketData = PacketBuilder.CreatePlayerData(baseUser.Money, GameServer.GetNumberOfPlayers(), this.UnreadMailCount);
|
||||
baseUser.LoggedinClient.SendPacket(BaseStatsPacketData);
|
||||
}
|
||||
public void AddMail(Mail mailMessage)
|
||||
|
|
|
@ -22,7 +22,11 @@ namespace HISP.Server
|
|||
{
|
||||
bool login = loggedIn;
|
||||
if (LoggedinUser == null)
|
||||
login = false;
|
||||
return false;
|
||||
if (LoggedinUser.LoggedinClient == null)
|
||||
return false;
|
||||
if (isDisconnecting)
|
||||
return false;
|
||||
return login;
|
||||
}
|
||||
set
|
||||
|
|
|
@ -1535,7 +1535,7 @@ namespace HISP.Server
|
|||
if(item.ItemId == Item.MagicBean)
|
||||
{
|
||||
double oldH = HorseInfo.CalculateHands(horseInstance.AdvancedStats.Height, false);
|
||||
int newHeight = RandomNumberGenerator.Next(horseInstance.Breed.BaseStats.MinHeight, horseInstance.Breed.BaseStats.MaxHeight);
|
||||
int newHeight = RandomNumberGenerator.Next(horseInstance.Breed.BaseStats.MinHeight, horseInstance.Breed.BaseStats.MaxHeight+1);
|
||||
double newH = HorseInfo.CalculateHands(newHeight, false);
|
||||
|
||||
horseInstance.AdvancedStats.Height = newHeight;
|
||||
|
@ -7563,6 +7563,11 @@ namespace HISP.Server
|
|||
|
||||
public static void UpdateArea(GameClient forClient)
|
||||
{
|
||||
if(forClient == null)
|
||||
{
|
||||
Logger.ErrorPrint(forClient.RemoteIp + "tried to update tile information when not connected.");
|
||||
return;
|
||||
}
|
||||
if (!forClient.LoggedIn)
|
||||
{
|
||||
Logger.ErrorPrint(forClient.RemoteIp + "tried to update tile information when not logged in.");
|
||||
|
|
Loading…
Add table
Reference in a new issue