mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 21:25:42 +12:00
fix camel gear not being equipable by anyone
This commit is contained in:
parent
d837b3d8ea
commit
c58326ffba
2 changed files with 7 additions and 5 deletions
|
@ -43,7 +43,9 @@ namespace HISP.Game.Items
|
|||
|
||||
public int GetMiscFlag(int no)
|
||||
{
|
||||
if (MiscFlags.Length <= no)
|
||||
if (no < 0)
|
||||
return 0;
|
||||
if (no >= MiscFlags.Length)
|
||||
return 0;
|
||||
else
|
||||
return MiscFlags[no];
|
||||
|
|
|
@ -2512,14 +2512,14 @@ namespace HISP.Game
|
|||
|
||||
foreach(InventoryItem item in user.Inventory.GetItemList())
|
||||
{
|
||||
Item.ItemInformation itemInfo = item.ItemInstances[0].GetItemInfo();
|
||||
Item.ItemInformation itemInfo = Item.GetItemById(item.ItemId);
|
||||
if (itemInfo.Type == "TACK")
|
||||
{
|
||||
if (horse.Breed.Type == "camel" && itemInfo.GetMiscFlag(2) != 1)
|
||||
if (horse.Breed.Type == "camel" && itemInfo.GetMiscFlag(1) != 1)
|
||||
continue;
|
||||
else if (horse.Breed.Type == "llama" && itemInfo.GetMiscFlag(2) != 2)
|
||||
else if (horse.Breed.Type == "llama" && itemInfo.GetMiscFlag(1) != 2)
|
||||
continue;
|
||||
else if (itemInfo.GetMiscFlag(2) != 0)
|
||||
else if (itemInfo.GetMiscFlag(1) != 0)
|
||||
continue;
|
||||
message += Messages.FormatHorseEquip(itemInfo.IconId, item.ItemInstances.Length, itemInfo.Name, itemInfo.Id);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue