mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 20:25:51 +12:00
Fix Training not showing in barns.
Fix Crash on invalid ranch loading Add "Player here" click message.
This commit is contained in:
parent
2d2d6235e3
commit
afc232352d
6 changed files with 34 additions and 2 deletions
|
@ -686,6 +686,9 @@ namespace HISP.Server
|
|||
Map.ModIsleX = gameData.messages.commands.mod_isle.x;
|
||||
Map.ModIsleY = gameData.messages.commands.mod_isle.y;
|
||||
|
||||
// Click
|
||||
Messages.PlayerHereFormat = gameData.messages.player_here;
|
||||
|
||||
// Ranch
|
||||
Messages.RanchUnownedRanchFormat = gameData.messages.meta.ranch.unowned_ranch;
|
||||
Messages.RanchYouCouldPurchaseThisRanch = gameData.messages.meta.ranch.you_could_purchase_this;
|
||||
|
|
|
@ -3618,7 +3618,7 @@ namespace HISP.Server
|
|||
if (tile.Title != null)
|
||||
returnedMsg = tile.Title;
|
||||
}
|
||||
if(Ranch.IsRanchHere(x, y))
|
||||
if(Ranch.IsRanchHere(x, y)) // Ranch here?
|
||||
{
|
||||
Ranch ranch = Ranch.GetRanchAt(x, y);
|
||||
if(ranch.OwnerId == -1)
|
||||
|
@ -3633,6 +3633,10 @@ namespace HISP.Server
|
|||
returnedMsg = Messages.FormatRanchClickMessage(Database.GetUsername(ranch.OwnerId), title);
|
||||
}
|
||||
}
|
||||
if(GetUsersAt(x,y, false, true).Length > 0) // Player here?
|
||||
{
|
||||
returnedMsg = Messages.FormatPlayerHereMessage(GetUsersAt(x, y, false, true)[0].Username);
|
||||
}
|
||||
|
||||
byte[] tileInfoPacket = PacketBuilder.CreateClickTileInfoPacket(returnedMsg);
|
||||
sender.SendPacket(tileInfoPacket);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue