mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-12 07:59:48 +12:00
Weirest bug ever happened, it said "Item.ItemInformation" is higher protection level than Item.Tack even though both were public, i eventurally found that it was because Item was "class" where as "Item.Tack" was "public class" so i made everything be "public class"
This commit is contained in:
parent
6a620f4be5
commit
3c25795188
50 changed files with 186 additions and 60 deletions
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class AbuseReport
|
public class AbuseReport
|
||||||
{
|
{
|
||||||
public struct ReportReason
|
public struct ReportReason
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using HISP.Server;
|
||||||
|
|
||||||
namespace HISP.Game.Chat
|
namespace HISP.Game.Chat
|
||||||
{
|
{
|
||||||
class Chat
|
public class Chat
|
||||||
{
|
{
|
||||||
public struct Correction
|
public struct Correction
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game.Chat
|
namespace HISP.Game.Chat
|
||||||
{
|
{
|
||||||
class Command
|
public class Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public static bool Give(string message, string[] args, User user)
|
public static bool Give(string message, string[] args, User user)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
// Inventory
|
// Inventory
|
||||||
class InventoryException : Exception { };
|
public class InventoryException : Exception { };
|
||||||
class InventoryFullException : InventoryException { };
|
public class InventoryFullException : InventoryException { };
|
||||||
class InventoryMaxStackException : InventoryException { };
|
public class InventoryMaxStackException : InventoryException { };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game.Horse
|
namespace HISP.Game.Horse
|
||||||
{
|
{
|
||||||
class HorseInfo
|
public class HorseInfo
|
||||||
{
|
{
|
||||||
public enum StatType
|
public enum StatType
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using HISP.Server;
|
||||||
|
|
||||||
namespace HISP.Game.Horse
|
namespace HISP.Game.Horse
|
||||||
{
|
{
|
||||||
class HorseInstance
|
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)
|
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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||||
namespace HISP.Game.Horse
|
namespace HISP.Game.Horse
|
||||||
{
|
{
|
||||||
|
|
||||||
class WildHorse
|
public class WildHorse
|
||||||
{
|
{
|
||||||
|
|
||||||
public WildHorse(HorseInstance horse, int MapX = -1, int MapY = -1, int despawnTimeout=60, bool addToDatabase = true)
|
public WildHorse(HorseInstance horse, int MapX = -1, int MapY = -1, int despawnTimeout=60, bool addToDatabase = true)
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game.Inventory
|
namespace HISP.Game.Inventory
|
||||||
{
|
{
|
||||||
class HorseInventory
|
public class HorseInventory
|
||||||
{
|
{
|
||||||
private User baseUser;
|
private User baseUser;
|
||||||
private List<HorseInstance> horsesList = new List<HorseInstance>();
|
private List<HorseInstance> horsesList = new List<HorseInstance>();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Game.Inventory
|
namespace HISP.Game.Inventory
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Game.Inventory
|
namespace HISP.Game.Inventory
|
||||||
{
|
{
|
||||||
class InventoryItem
|
public class InventoryItem
|
||||||
{
|
{
|
||||||
public InventoryItem()
|
public InventoryItem()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Game.Inventory
|
namespace HISP.Game.Inventory
|
||||||
{
|
{
|
||||||
|
|
||||||
class PlayerInventory : IInventory
|
public class PlayerInventory : IInventory
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
using HISP.Game.Services;
|
using HISP.Game.Services;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace HISP.Game.Inventory
|
namespace HISP.Game.Inventory
|
||||||
{
|
{
|
||||||
class ShopInventory : IInventory
|
public class ShopInventory : IInventory
|
||||||
{
|
{
|
||||||
private Shop baseShop;
|
private Shop baseShop;
|
||||||
private List<InventoryItem> inventoryItems;
|
private List<InventoryItem> inventoryItems;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game.Items
|
||||||
{
|
{
|
||||||
class DroppedItems
|
public class DroppedItems
|
||||||
{
|
{
|
||||||
public struct DroppedItem
|
public struct DroppedItem
|
||||||
{
|
{
|
|
@ -1,10 +1,11 @@
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game.Items
|
||||||
{
|
{
|
||||||
class Item
|
public class Item
|
||||||
{
|
{
|
||||||
public struct Effects
|
public struct Effects
|
||||||
{
|
{
|
||||||
|
@ -138,7 +139,10 @@ namespace HISP.Game
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static void DoSpecialCases()
|
||||||
|
{
|
||||||
|
Tack.GenerateTackSets();
|
||||||
|
}
|
||||||
public static ItemInformation GetItemById(int id)
|
public static ItemInformation GetItemById(int id)
|
||||||
{
|
{
|
||||||
foreach(ItemInformation item in Items)
|
foreach(ItemInformation item in Items)
|
|
@ -1,7 +1,8 @@
|
||||||
using HISP.Security;
|
using HISP.Security;
|
||||||
namespace HISP.Game
|
using HISP.Game;
|
||||||
|
namespace HISP.Game.Items
|
||||||
{
|
{
|
||||||
class ItemInstance
|
public class ItemInstance
|
||||||
{
|
{
|
||||||
public int RandomId;
|
public int RandomId;
|
||||||
public int ItemId;
|
public int ItemId;
|
86
Horse Isle Server/HorseIsleServer/Game/Items/Tack.cs
Normal file
86
Horse Isle Server/HorseIsleServer/Game/Items/Tack.cs
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using HISP.Server;
|
||||||
|
|
||||||
|
namespace HISP.Game.Items
|
||||||
|
{
|
||||||
|
public class Tack
|
||||||
|
{
|
||||||
|
public class TackSet
|
||||||
|
{
|
||||||
|
public TackSet()
|
||||||
|
{
|
||||||
|
tackItems = new List<Item.ItemInformation>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string SetName;
|
||||||
|
private List<Item.ItemInformation> tackItems;
|
||||||
|
public void Add(Item.ItemInformation item)
|
||||||
|
{
|
||||||
|
Logger.DebugPrint("Added "+item.Name+" To Tack Set: "+this.SetName);
|
||||||
|
tackItems.Add(item);
|
||||||
|
}
|
||||||
|
public Item.ItemInformation[] TackItems
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return tackItems.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static string capitalizeFirstLetter(string str)
|
||||||
|
{
|
||||||
|
char firstChar = char.ToUpper(str[0]);
|
||||||
|
return firstChar + str.Substring(1);
|
||||||
|
}
|
||||||
|
private static List<TackSet> tackSets = new List<TackSet>();
|
||||||
|
public TackSet[] TackSets
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return tackSets.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static TackSet GetSetByName(string name)
|
||||||
|
{
|
||||||
|
foreach(TackSet set in tackSets)
|
||||||
|
{
|
||||||
|
if(set.SetName == name)
|
||||||
|
{
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new KeyNotFoundException("No TackSet with name: "+name+" was found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void GenerateTackSets()
|
||||||
|
{
|
||||||
|
foreach(Item.ItemInformation itemInfo in Item.Items)
|
||||||
|
{
|
||||||
|
if(itemInfo.Type == "TACK")
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TackSet set = GetSetByName(capitalizeFirstLetter(itemInfo.EmbedSwf));
|
||||||
|
set.Add(itemInfo);
|
||||||
|
}
|
||||||
|
catch(KeyNotFoundException)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TackSet tackSet = new TackSet();
|
||||||
|
tackSet.SetName = capitalizeFirstLetter(itemInfo.EmbedSwf);
|
||||||
|
tackSet.Add(itemInfo);
|
||||||
|
tackSets.Add(tackSet);
|
||||||
|
Logger.DebugPrint("Created Tack Set: "+tackSet.SetName);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ using HISP.Server;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class Map
|
public class Map
|
||||||
{
|
{
|
||||||
public struct TerrainTile
|
public struct TerrainTile
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Drawing;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class Messages
|
public class Messages
|
||||||
{
|
{
|
||||||
public static int RequiredChatViolations;
|
public static int RequiredChatViolations;
|
||||||
public static int DefaultInventoryMax;
|
public static int DefaultInventoryMax;
|
||||||
|
@ -517,7 +517,21 @@ namespace HISP.Game
|
||||||
|
|
||||||
// Click
|
// Click
|
||||||
public static string NothingInterestingHere;
|
public static string NothingInterestingHere;
|
||||||
|
|
||||||
|
public static string FormatTackBoost(string stat, int amount)
|
||||||
|
{
|
||||||
|
return TackBonusFormat.Replace("%BOOST%",amount.ToString("N0")).Replace("%STAT%",stat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FormatTackSetPeice(string itemName, string itemDescription, string bonus)
|
||||||
|
{
|
||||||
|
return TackSetPeiceFormat.Replace("%ITEMNAME%",itemName).Replace("%ITEMDESC%", itemDescription).Replace("%BONUS%",bonus);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FormatTackSetView(int iconId, string tackSetName, string swf)
|
||||||
|
{
|
||||||
|
return TackViewSetFormat.Replace("%ICONID%",iconId.ToString()).Replace("%SETNAME%", tackSetName).Replace("%SWF%",swf);
|
||||||
|
}
|
||||||
|
|
||||||
public static string FormatWhispererHorseFoundMeta(string mapXys)
|
public static string FormatWhispererHorseFoundMeta(string mapXys)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@ using HISP.Game.Inventory;
|
||||||
using HISP.Game.Services;
|
using HISP.Game.Services;
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -10,7 +11,7 @@ using System.Drawing;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class Meta
|
public class Meta
|
||||||
{
|
{
|
||||||
// Meta
|
// Meta
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class Npc
|
public class Npc
|
||||||
{
|
{
|
||||||
public struct NpcReply
|
public struct NpcReply
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,11 @@ using System.Linq;
|
||||||
using HISP.Game.Inventory;
|
using HISP.Game.Inventory;
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class Quest
|
public class Quest
|
||||||
{
|
{
|
||||||
public const string Shovel = "SHOVEL";
|
public const string Shovel = "SHOVEL";
|
||||||
public const string Binoculars = "BINOCS";
|
public const string Binoculars = "BINOCS";
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -7,7 +9,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace HISP.Game.Services
|
namespace HISP.Game.Services
|
||||||
{
|
{
|
||||||
class Inn
|
public class Inn
|
||||||
{
|
{
|
||||||
private static List<Inn> listInns = new List<Inn>();
|
private static List<Inn> listInns = new List<Inn>();
|
||||||
public static Inn[] Inns
|
public static Inn[] Inns
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
using HISP.Game.Inventory;
|
using HISP.Game.Inventory;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game.Services
|
namespace HISP.Game.Services
|
||||||
{
|
{
|
||||||
class Shop
|
public class Shop
|
||||||
{
|
{
|
||||||
public int Id;
|
public int Id;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace HISP.Game.Services
|
namespace HISP.Game.Services
|
||||||
{
|
{
|
||||||
class Transport
|
public class Transport
|
||||||
{
|
{
|
||||||
public struct TransportLocation
|
public struct TransportLocation
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace HISP.Game.Services
|
namespace HISP.Game.Services
|
||||||
{
|
{
|
||||||
class Vet
|
public class Vet
|
||||||
{
|
{
|
||||||
|
|
||||||
public static List<Vet> Vets = new List<Vet>();
|
public static List<Vet> Vets = new List<Vet>();
|
||||||
|
|
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace HISP.Game.SwfModules
|
namespace HISP.Game.SwfModules
|
||||||
{
|
{
|
||||||
class Brickpoet
|
public class Brickpoet
|
||||||
{
|
{
|
||||||
public struct PoetryEntry {
|
public struct PoetryEntry {
|
||||||
public int Id;
|
public int Id;
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
class Tracking
|
public class Tracking
|
||||||
{
|
{
|
||||||
public enum TrackableItem
|
public enum TrackableItem
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using HISP.Server;
|
||||||
namespace HISP.Game
|
namespace HISP.Game
|
||||||
{
|
{
|
||||||
|
|
||||||
class World
|
public class World
|
||||||
{
|
{
|
||||||
public struct Isle
|
public struct Isle
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Player
|
namespace HISP.Player
|
||||||
{
|
{
|
||||||
class Award
|
public class Award
|
||||||
{
|
{
|
||||||
public struct AwardEntry
|
public struct AwardEntry
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
using HISP.Game;
|
using HISP.Game;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Player.Equips
|
namespace HISP.Player.Equips
|
||||||
{
|
{
|
||||||
class CompetitionGear
|
public class CompetitionGear
|
||||||
{
|
{
|
||||||
public const int MISC_FLAG_HEAD = 1;
|
public const int MISC_FLAG_HEAD = 1;
|
||||||
public const int MISC_FLAG_BODY = 2;
|
public const int MISC_FLAG_BODY = 2;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
using HISP.Game;
|
using HISP.Game;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Player.Equips
|
namespace HISP.Player.Equips
|
||||||
{
|
{
|
||||||
class Jewelry
|
public class Jewelry
|
||||||
{
|
{
|
||||||
|
|
||||||
private int playerId;
|
private int playerId;
|
||||||
|
|
|
@ -3,7 +3,7 @@ using HISP.Server;
|
||||||
|
|
||||||
namespace HISP.Player
|
namespace HISP.Player
|
||||||
{
|
{
|
||||||
class Friends
|
public class Friends
|
||||||
{
|
{
|
||||||
private User baseUser;
|
private User baseUser;
|
||||||
public List<int> List;
|
public List<int> List;
|
||||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Player
|
namespace HISP.Player
|
||||||
{
|
{
|
||||||
class Highscore
|
public class Highscore
|
||||||
{
|
{
|
||||||
public class HighscoreTableEntry
|
public class HighscoreTableEntry
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace HISP.Player
|
namespace HISP.Player
|
||||||
{
|
{
|
||||||
class Mailbox
|
public class Mailbox
|
||||||
{
|
{
|
||||||
private User baseUser;
|
private User baseUser;
|
||||||
public int MailCount;
|
public int MailCount;
|
||||||
|
|
|
@ -3,7 +3,7 @@ using HISP.Server;
|
||||||
|
|
||||||
namespace HISP.Player
|
namespace HISP.Player
|
||||||
{
|
{
|
||||||
class PlayerQuests
|
public class PlayerQuests
|
||||||
{
|
{
|
||||||
private List<TrackedQuest> trackedQuests = new List<TrackedQuest>();
|
private List<TrackedQuest> trackedQuests = new List<TrackedQuest>();
|
||||||
public User BaseUser;
|
public User BaseUser;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
namespace HISP
|
namespace HISP
|
||||||
{
|
{
|
||||||
class TrackedQuest
|
public class TrackedQuest
|
||||||
{
|
{
|
||||||
public TrackedQuest(int playerID, int questID, int timesComplete)
|
public TrackedQuest(int playerID, int questID, int timesComplete)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@ using HISP.Game.Horse;
|
||||||
|
|
||||||
namespace HISP.Player
|
namespace HISP.Player
|
||||||
{
|
{
|
||||||
class User
|
public class User
|
||||||
{
|
{
|
||||||
|
|
||||||
public int Id;
|
public int Id;
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
using System;
|
using System;
|
||||||
using HISP.Game;
|
using HISP.Game;
|
||||||
|
using HISP.Game.Items;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
using HISP.Game.SwfModules;
|
using HISP.Game.SwfModules;
|
||||||
using HISP.Security;
|
using HISP.Security;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
|
|
||||||
namespace HISP
|
namespace HISP
|
||||||
{
|
{
|
||||||
class Program
|
public class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +22,7 @@ namespace HISP
|
||||||
DroppedItems.Init();
|
DroppedItems.Init();
|
||||||
WildHorse.Init();
|
WildHorse.Init();
|
||||||
Brickpoet.LoadPoetryRooms();
|
Brickpoet.LoadPoetryRooms();
|
||||||
|
Item.DoSpecialCases();
|
||||||
GameServer.StartServer();
|
GameServer.StartServer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,10 @@ namespace HISP.Properties {
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource public class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
// This public class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// public class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||||
|
@ -33,7 +33,7 @@ namespace HISP.Properties {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this public class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
@ -48,7 +48,7 @@ namespace HISP.Properties {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource public class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
|
|
@ -5,7 +5,7 @@ using HISP.Server;
|
||||||
|
|
||||||
namespace HISP.Security
|
namespace HISP.Security
|
||||||
{
|
{
|
||||||
class Authentication
|
public class Authentication
|
||||||
{
|
{
|
||||||
public static string DecryptLogin(string encpass)
|
public static string DecryptLogin(string encpass)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.IO;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
namespace HISP.Security
|
namespace HISP.Security
|
||||||
{
|
{
|
||||||
class CrossDomainPolicy
|
public class CrossDomainPolicy
|
||||||
{
|
{
|
||||||
public static byte[] GetPolicy()
|
public static byte[] GetPolicy()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
namespace HISP.Security
|
namespace HISP.Security
|
||||||
{
|
{
|
||||||
class RandomID
|
public class RandomID
|
||||||
{
|
{
|
||||||
private static int prevId = 0;
|
private static int prevId = 0;
|
||||||
public static int NextRandomId(int randomId=-1)
|
public static int NextRandomId(int randomId=-1)
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.IO;
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
|
|
||||||
class ConfigReader
|
public class ConfigReader
|
||||||
{
|
{
|
||||||
public static int Port;
|
public static int Port;
|
||||||
public static string BindIP;
|
public static string BindIP;
|
||||||
|
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class Converters
|
public class Converters
|
||||||
{
|
{
|
||||||
// Thanks Stackoverflow (https://stackoverflow.com/questions/321370/how-can-i-convert-a-hex-string-to-a-byte-array)
|
// Thanks Stackoverflow (https://stackoverflow.com/questions/321370/how-can-i-convert-a-hex-string-to-a-byte-array)
|
||||||
private static int getHexVal(char hex)
|
private static int getHexVal(char hex)
|
||||||
|
|
|
@ -5,10 +5,11 @@ using HISP.Game;
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
using HISP.Game.Inventory;
|
using HISP.Game.Inventory;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class Database
|
public class Database
|
||||||
{
|
{
|
||||||
public static string ConnectionString = "";
|
public static string ConnectionString = "";
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ using HISP.Game.Horse;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class GameClient
|
public class GameClient
|
||||||
{
|
{
|
||||||
public Socket ClientSocket;
|
public Socket ClientSocket;
|
||||||
public string RemoteIp;
|
public string RemoteIp;
|
||||||
|
|
|
@ -7,10 +7,11 @@ using HISP.Player;
|
||||||
using HISP.Game.Services;
|
using HISP.Game.Services;
|
||||||
using HISP.Game.SwfModules;
|
using HISP.Game.SwfModules;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class GameDataJson
|
public class GameDataJson
|
||||||
{
|
{
|
||||||
|
|
||||||
public static void ReadGamedata()
|
public static void ReadGamedata()
|
||||||
|
|
|
@ -16,10 +16,11 @@ using HISP.Game.Services;
|
||||||
using HISP.Game.Inventory;
|
using HISP.Game.Inventory;
|
||||||
using HISP.Game.SwfModules;
|
using HISP.Game.SwfModules;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
|
using HISP.Game.Items;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class GameServer
|
public class GameServer
|
||||||
{
|
{
|
||||||
|
|
||||||
public static Socket ServerSocket;
|
public static Socket ServerSocket;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class Logger
|
public class Logger
|
||||||
{
|
{
|
||||||
public static void HackerPrint(string text) // When someone is obviously cheating.
|
public static void HackerPrint(string text) // When someone is obviously cheating.
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ using HISP.Game.SwfModules;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
class PacketBuilder
|
public class PacketBuilder
|
||||||
{
|
{
|
||||||
|
|
||||||
public const byte PACKET_TERMINATOR = 0x00;
|
public const byte PACKET_TERMINATOR = 0x00;
|
||||||
|
|
Loading…
Add table
Reference in a new issue