mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
Fix inconsistancies- Add f12 shortcut,
This commit is contained in:
parent
72420c8e3c
commit
852b5f33ec
8 changed files with 176 additions and 47 deletions
|
@ -2,6 +2,7 @@
|
|||
using HISP.Server;
|
||||
using HISP.Game;
|
||||
using System.Collections.Generic;
|
||||
using HISP.Game.Inventory;
|
||||
|
||||
namespace HISP.Game.Items
|
||||
{
|
||||
|
@ -42,7 +43,7 @@ namespace HISP.Game.Items
|
|||
|
||||
public int GetMiscFlag(int no)
|
||||
{
|
||||
if(MiscFlags.Length <= no)
|
||||
if (MiscFlags.Length <= no)
|
||||
return 0;
|
||||
else
|
||||
return MiscFlags[no];
|
||||
|
@ -85,10 +86,50 @@ namespace HISP.Game.Items
|
|||
{
|
||||
get
|
||||
{
|
||||
return new int[4] { StallionTradingCard, MareTradingCard, ColtTradingCard, FillyTradingCard };
|
||||
return new int[4] { StallionTradingCard, MareTradingCard, ColtTradingCard, FillyTradingCard };
|
||||
}
|
||||
}
|
||||
|
||||
public static void UseItem(User user, ItemInstance item)
|
||||
{
|
||||
if (user.Inventory.HasItem(item.RandomId))
|
||||
{
|
||||
InventoryItem itm = user.Inventory.GetItemByRandomid(item.RandomId);
|
||||
if (itm.ItemId == Item.DorothyShoes)
|
||||
{
|
||||
if (World.InIsle(user.X, user.Y))
|
||||
{
|
||||
World.Isle isle = World.GetIsle(user.X, user.Y);
|
||||
if (isle.Name == "Prison Isle")
|
||||
{
|
||||
byte[] dontWorkHere = PacketBuilder.CreateChat(Messages.RanchDorothyShoesPrisonIsleMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
user.LoggedinClient.SendPacket(dontWorkHere);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (user.OwnedRanch == null) // How????
|
||||
{
|
||||
Logger.HackerPrint(user.Username + " Tried to use Dorothy Shoes when they did *NOT* own a ranch.");
|
||||
user.Inventory.Remove(itm.ItemInstances[0]);
|
||||
return;
|
||||
}
|
||||
byte[] noPlaceLIke127001 = PacketBuilder.CreateChat(Messages.RanchDorothyShoesMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
user.LoggedinClient.SendPacket(noPlaceLIke127001);
|
||||
|
||||
user.Teleport(user.OwnedRanch.X, user.OwnedRanch.Y);
|
||||
}
|
||||
else if (itm.ItemId == Item.Telescope)
|
||||
{
|
||||
byte[] birdMap = PacketBuilder.CreateBirdMap(user.X, user.Y);
|
||||
user.LoggedinClient.SendPacket(birdMap);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.ErrorPrint(user.Username + "Tried to use item with undefined action- ID: " + itm.ItemId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemInformation[] GetAllWishableItems()
|
||||
{
|
||||
List<ItemInformation> itemInfo = new List<ItemInformation>();
|
||||
|
|
|
@ -54,6 +54,9 @@ namespace HISP.Game
|
|||
public static string CantFindPlayerToPrivateMessage;
|
||||
public static string AdsOnlyOncePerMinute;
|
||||
public static string GlobalChatLimited;
|
||||
public static string GlobalChatTooLong;
|
||||
public static string AdsChatTooLong;
|
||||
|
||||
|
||||
// Auto Sell
|
||||
public static string AutoSellNotStandingInSamePlace;
|
||||
|
@ -396,12 +399,20 @@ namespace HISP.Game
|
|||
public static string RanchUnownedRanchClicked;
|
||||
public static string RanchClickMessageFormat;
|
||||
|
||||
public static string RanchNoDorothyShoesMessage;
|
||||
public static string RanchDorothyShoesMessage;
|
||||
public static string RanchDorothyShoesPrisonIsleMessage;
|
||||
|
||||
public static string RanchCantAffordRanch;
|
||||
public static string RanchRanchBroughtMessageFormat;
|
||||
|
||||
public static string RanchSavedRanchDescripton;
|
||||
public static string RanchSavedTitleTooLongError;
|
||||
public static string RanchSavedDescrptionTooLongError;
|
||||
public static string RanchSavedTitleViolationsError;
|
||||
public static string RanchSavedDescrptionViolationsErrorFormat;
|
||||
|
||||
|
||||
public static string RanchDefaultRanchTitle;
|
||||
|
||||
public static string RanchEditDescriptionMetaFormat;
|
||||
|
@ -659,6 +670,7 @@ namespace HISP.Game
|
|||
public static string GrabbedAllItemsMessage;
|
||||
public static string DroppedAnItemMessage;
|
||||
public static string DroppedItemTileIsFull;
|
||||
public static string DroppedItemCouldntPickup;
|
||||
public static string ItemInformationFormat;
|
||||
|
||||
// Pond
|
||||
|
@ -794,7 +806,15 @@ namespace HISP.Game
|
|||
public static string HorseOthers;
|
||||
|
||||
public static string HorseDescriptionEditFormat;
|
||||
|
||||
public static string HorseSavedProfileMessageFormat;
|
||||
public static string HorseProfileMessageTooLongError;
|
||||
public static string HorseNameTooLongError;
|
||||
public static string HorseNameViolationsError;
|
||||
public static string HorseProfileMessageProfileError;
|
||||
|
||||
|
||||
public static string HorseCatchTooManyHorsesMessage;
|
||||
public static string HorseEquipTackMessageFormat;
|
||||
public static string HorseUnEquipTackMessageFormat;
|
||||
public static string HorseStopRidingMessage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue