mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
Fix llamas and camel speciic stuff
This commit is contained in:
parent
177122cd83
commit
14f9a5b379
7 changed files with 93 additions and 75 deletions
|
@ -44,7 +44,7 @@ namespace HISP.Game.Horse
|
|||
Breed = breed;
|
||||
Color = breed.Colors[GameServer.RandomNumberGenerator.Next(0, breed.Colors.Length)];
|
||||
|
||||
BasicStats = new HorseInfo.BasicStats(this, 1000, 0, 1000, 1000, 500, 1000, 1000, 0);
|
||||
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);
|
||||
|
|
|
@ -103,6 +103,8 @@ namespace HISP.Game.Items
|
|||
toMuch = true;
|
||||
user.Hunger += effect.EffectAmount;
|
||||
break;
|
||||
case "MOOD":
|
||||
break;
|
||||
default:
|
||||
Logger.ErrorPrint("Unknown effect: " + effect.EffectsWhat);
|
||||
break;
|
||||
|
|
|
@ -678,6 +678,8 @@ namespace HISP.Game
|
|||
public static string HorseUnEquipSaddlePadFormat;
|
||||
public static string HorseUnEquipBridleFormat;
|
||||
public static string HorseTackInInventory;
|
||||
public static string HorseLlamaTackInInventory;
|
||||
public static string HorseCamelTackInInventory;
|
||||
public static string HorseEquipFormat;
|
||||
public static string BackToHorse;
|
||||
|
||||
|
|
|
@ -1966,7 +1966,10 @@ namespace HISP.Game
|
|||
foreach(InventoryItem item in user.Inventory.GetItemList())
|
||||
{
|
||||
Item.ItemInformation itemInfo = item.ItemInstances[0].GetItemInfo();
|
||||
if(itemInfo.Type == "HORSEFOOD")
|
||||
bool isHorseFood = false;
|
||||
if (itemInfo.Effects.Length >= 2)
|
||||
isHorseFood = (itemInfo.Effects[1].EffectsWhat == "MOOD" && itemInfo.Effects[0].EffectsWhat == "HUNGER");
|
||||
if (itemInfo.Type == "HORSEFOOD" || isHorseFood)
|
||||
{
|
||||
message += Messages.FormatHorseFeedEntry(itemInfo.IconId, item.ItemInstances.Count, itemInfo.Name, item.ItemInstances[0].RandomId);
|
||||
}
|
||||
|
@ -2243,12 +2246,24 @@ namespace HISP.Game
|
|||
message += Messages.FormatUnEquipSaddlePad(horse.Equipment.SaddlePad.IconId, horse.Equipment.SaddlePad.Name);
|
||||
if (horse.Equipment.Bridle != null)
|
||||
message += Messages.FormatUnEquipBridle(horse.Equipment.Bridle.IconId, horse.Equipment.Bridle.Name);
|
||||
message += Messages.HorseTackInInventory;
|
||||
if (horse.Breed.Type == "llama")
|
||||
message += Messages.HorseLlamaTackInInventory;
|
||||
else if (horse.Breed.Type == "camel")
|
||||
message += Messages.HorseCamelTackInInventory;
|
||||
else
|
||||
message += Messages.HorseTackInInventory;
|
||||
|
||||
foreach(InventoryItem item in user.Inventory.GetItemList())
|
||||
{
|
||||
Item.ItemInformation itemInfo = item.ItemInstances[0].GetItemInfo();
|
||||
if (itemInfo.Type == "TACK")
|
||||
{
|
||||
if (horse.Breed.Type == "camel" && itemInfo.GetMiscFlag(2) != 1)
|
||||
continue;
|
||||
else if (horse.Breed.Type == "llama" && itemInfo.GetMiscFlag(2) != 2)
|
||||
continue;
|
||||
else if (itemInfo.GetMiscFlag(2) != 0)
|
||||
continue;
|
||||
message += Messages.FormatHorseEquip(itemInfo.IconId, item.ItemInstances.Count, itemInfo.Name, itemInfo.Id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue