mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 20:25:51 +12:00
Add Magic Pellets and Droplets
This commit is contained in:
parent
160688bf2d
commit
375731ada9
9 changed files with 129 additions and 19 deletions
|
@ -238,7 +238,7 @@ namespace HISP.Game.Horse
|
|||
endurance = newEndurance;
|
||||
inteligence = newInteligence;
|
||||
personality = newPersonality;
|
||||
Height = newHeight;
|
||||
height = newHeight;
|
||||
}
|
||||
|
||||
|
||||
|
@ -342,7 +342,18 @@ namespace HISP.Game.Horse
|
|||
personality = value;
|
||||
}
|
||||
}
|
||||
public int Height;
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return height;
|
||||
}
|
||||
set
|
||||
{
|
||||
height = value;
|
||||
Database.SetHorseHeight(baseHorse.RandomId, value);
|
||||
}
|
||||
}
|
||||
public int MinHeight;
|
||||
public int MaxHeight;
|
||||
|
||||
|
@ -354,6 +365,7 @@ namespace HISP.Game.Horse
|
|||
private int endurance;
|
||||
private int inteligence;
|
||||
private int personality;
|
||||
private int height;
|
||||
}
|
||||
public class BasicStats
|
||||
{
|
||||
|
|
|
@ -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, bool loadHidden=false, int loadOwner=0)
|
||||
public HorseInstance(HorseInfo.Breed breed, int randomId = -1, string loadColor = null ,string loadName=null, string loadDescription = "", int loadSpoiled=0, string loadCategory="KEEPER", int loadMagicUsed=0, int loadAutoSell=0, int leaseTimer=0, bool loadHidden=false, int loadOwner=0)
|
||||
{
|
||||
RandomId = RandomID.NextRandomId(randomId);
|
||||
owner = loadOwner;
|
||||
|
@ -42,7 +42,7 @@ namespace HISP.Game.Horse
|
|||
|
||||
description = loadDescription;
|
||||
Breed = breed;
|
||||
Color = breed.Colors[GameServer.RandomNumberGenerator.Next(0, breed.Colors.Length)];
|
||||
|
||||
|
||||
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);
|
||||
|
@ -57,11 +57,14 @@ namespace HISP.Game.Horse
|
|||
magicUsed = loadMagicUsed;
|
||||
leaseTime = leaseTimer;
|
||||
hidden = loadHidden;
|
||||
if(color != null)
|
||||
color = loadColor;
|
||||
else
|
||||
color = breed.Colors[GameServer.RandomNumberGenerator.Next(0, breed.Colors.Length)];
|
||||
Leaser = 0;
|
||||
}
|
||||
public int Leaser;
|
||||
public int RandomId;
|
||||
public int owner;
|
||||
public int Owner
|
||||
{
|
||||
get
|
||||
|
@ -124,7 +127,18 @@ namespace HISP.Game.Horse
|
|||
}
|
||||
}
|
||||
public string Gender;
|
||||
public string Color;
|
||||
public string Color
|
||||
{
|
||||
get
|
||||
{
|
||||
return color;
|
||||
}
|
||||
set
|
||||
{
|
||||
color = value;
|
||||
Database.SetHorseColor(this.RandomId, color);
|
||||
}
|
||||
}
|
||||
public int TrainTimer
|
||||
{
|
||||
get
|
||||
|
@ -193,6 +207,8 @@ namespace HISP.Game.Horse
|
|||
}
|
||||
}
|
||||
|
||||
private string color;
|
||||
private int owner;
|
||||
private string name;
|
||||
private string description;
|
||||
private int spoiled;
|
||||
|
|
|
@ -60,9 +60,8 @@ namespace HISP.Game.Horse
|
|||
|
||||
public HorseInstance GenerateLeaseHorse()
|
||||
{
|
||||
HorseInstance instance = new HorseInstance(this.Breed, -1, null, "", 0, "LEASED", 0, 0, this.Minutes);
|
||||
HorseInstance instance = new HorseInstance(this.Breed, loadColor: this.Color, loadCategory: "LEASED", leaseTimer: this.Minutes);
|
||||
instance.Name = this.HorseName;
|
||||
instance.Color = this.Color;
|
||||
instance.Gender = this.Gender;
|
||||
instance.Leaser = this.LeaseId;
|
||||
|
||||
|
|
|
@ -72,7 +72,8 @@ namespace HISP.Game.Items
|
|||
public static int FishingPole;
|
||||
public static int Earthworm;
|
||||
public static int BirthdayToken;
|
||||
|
||||
public static int MagicBean;
|
||||
public static int MagicDroplet;
|
||||
public static ItemInformation[] GetAllWishableItems()
|
||||
{
|
||||
List<ItemInformation> itemInfo = new List<ItemInformation>();
|
||||
|
|
|
@ -810,6 +810,11 @@ namespace HISP.Game
|
|||
public static string HorseNeighsThanks;
|
||||
public static string HorseCouldNotFinish;
|
||||
|
||||
public static string HorseFeedPersonalityIncreased;
|
||||
public static string HorseFeedInteligenceIncreased;
|
||||
public static string HorseFeedMagicBeanFormat;
|
||||
public static string HorseFeedMagicDropletFormat;
|
||||
|
||||
// Tack horse menu
|
||||
public static string HorseTackedAsFollowsFormat;
|
||||
public static string HorseUnEquipSaddleFormat;
|
||||
|
@ -1132,6 +1137,7 @@ namespace HISP.Game
|
|||
|
||||
|
||||
|
||||
|
||||
// Throwables
|
||||
public static string FormatModSplatterBallAwardedOther(string username)
|
||||
{
|
||||
|
@ -1604,7 +1610,14 @@ namespace HISP.Game
|
|||
{
|
||||
return TrainedInStatFormat.Replace("%HORSENAME%", horseName).Replace("%STAT%", stat);
|
||||
}
|
||||
|
||||
public static string FormatHorseFeedMagicDropletUsed(string oldColor, string newColor)
|
||||
{
|
||||
return HorseFeedMagicDropletFormat.Replace("%PREVCOLOR%", oldColor).Replace("%NEWCOLOR%", newColor);
|
||||
}
|
||||
public static string FormatHorseFeedMagicBeanUsed(double oldH, double newH)
|
||||
{
|
||||
return HorseFeedMagicBeanFormat.Replace("%PREVHANDS%", oldH.ToString(CultureInfo.InvariantCulture)).Replace("%NEWHANDS%", newH.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
public static string FormatSantaOpenPresent(string itemName)
|
||||
{
|
||||
return SantaItemOpenedFormat.Replace("%ITEM%", itemName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue