mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
Fix treasures
This commit is contained in:
parent
c0a03641c8
commit
ff91d7bafb
11 changed files with 245 additions and 18 deletions
|
@ -6,7 +6,7 @@ namespace HISP.Game.Horse
|
|||
{
|
||||
public class HorseInstance
|
||||
{
|
||||
public HorseInstance(HorseInfo.Breed breed, int randomId = -1, string loadName=null, string loadDescription = "", int loadSpoiled=0, string loadCategory="KEEPER", int loadMagicUsed=0, int loadAutoSell=0, int leaseTimer=0)
|
||||
public HorseInstance(HorseInfo.Breed breed, int randomId = -1, string loadName=null, string loadDescription = "", int loadSpoiled=0, string loadCategory="KEEPER", int loadMagicUsed=0, int loadAutoSell=0, int leaseTimer=0, bool loadHidden=false)
|
||||
{
|
||||
RandomId = RandomID.NextRandomId(randomId);
|
||||
Owner = 0;
|
||||
|
@ -56,11 +56,25 @@ namespace HISP.Game.Horse
|
|||
spoiled = loadSpoiled;
|
||||
magicUsed = loadMagicUsed;
|
||||
leaseTime = leaseTimer;
|
||||
hidden = loadHidden;
|
||||
Leaser = 0;
|
||||
}
|
||||
public int Leaser;
|
||||
public int RandomId;
|
||||
public int Owner;
|
||||
|
||||
public bool Hidden
|
||||
{
|
||||
get
|
||||
{
|
||||
return hidden;
|
||||
}
|
||||
set
|
||||
{
|
||||
hidden = value;
|
||||
Database.SetHorseHidden(RandomId, value);
|
||||
}
|
||||
}
|
||||
public int LeaseTime
|
||||
{
|
||||
get
|
||||
|
@ -171,6 +185,7 @@ namespace HISP.Game.Horse
|
|||
private string description;
|
||||
private int spoiled;
|
||||
private int leaseTime;
|
||||
private bool hidden;
|
||||
private int magicUsed;
|
||||
private int autosell;
|
||||
private string category;
|
||||
|
|
|
@ -324,6 +324,8 @@ namespace HISP.Game
|
|||
public static string ModChatFormat;
|
||||
public static string AdminChatFormat;
|
||||
|
||||
public static string YouWereSentToPrisionIsle;
|
||||
|
||||
public static string AdminCommandFormat;
|
||||
public static string PlayerCommandFormat;
|
||||
|
||||
|
|
|
@ -1495,6 +1495,8 @@ namespace HISP.Game
|
|||
{
|
||||
string message = "";
|
||||
int totalPrice = 0;
|
||||
|
||||
|
||||
foreach (HorseInstance horse in user.HorseInventory.HorseList)
|
||||
{
|
||||
message += Messages.FormatVetServiceHorseMeta(horse.Name, horse.BasicStats.Health, 1000);
|
||||
|
@ -1510,7 +1512,8 @@ namespace HISP.Game
|
|||
}
|
||||
|
||||
}
|
||||
message += Messages.FormatVetApplyAllServiceMeta(totalPrice);
|
||||
if (user.HorseInventory.HorseList.Length > 0)
|
||||
message += Messages.FormatVetApplyAllServiceMeta(totalPrice);
|
||||
message += Messages.ExitThisPlace;
|
||||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
|
|
|
@ -136,6 +136,7 @@ namespace HISP.Game
|
|||
{
|
||||
|
||||
treasures.Remove(this);
|
||||
Database.DeleteTreasure(this.RandomId);
|
||||
GenerateTreasure();
|
||||
|
||||
byte[] MovementPacket = PacketBuilder.CreateMovementPacket(user.X, user.Y, user.CharacterId, user.Facing, PacketBuilder.DIRECTION_TELEPORT, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue