mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 21:25:42 +12:00
Add horse breed db
This commit is contained in:
parent
cb497ef7d2
commit
595d5e9797
6 changed files with 5252 additions and 4 deletions
File diff suppressed because it is too large
Load diff
41
Horse Isle Server/Horse Isle Server/Game/Horse.cs
Normal file
41
Horse Isle Server/Horse Isle Server/Game/Horse.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HISP.Game
|
||||
{
|
||||
class Horse
|
||||
{
|
||||
public struct Stats
|
||||
{
|
||||
public int Speed;
|
||||
public int Strength;
|
||||
public int Conformation;
|
||||
public int Agility;
|
||||
public int Endurance;
|
||||
public int Inteligence;
|
||||
public int Personality;
|
||||
public int Height;
|
||||
public int MinHeight;
|
||||
public int MaxHeight;
|
||||
}
|
||||
|
||||
public struct Breed
|
||||
{
|
||||
public int Id;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public Stats BaseStats;
|
||||
public string[] Colors;
|
||||
public string SpawnOn;
|
||||
public string SpawnInArea;
|
||||
public string Swf;
|
||||
public string Type;
|
||||
}
|
||||
|
||||
public static List<Breed> Breeds = new List<Breed>();
|
||||
|
||||
}
|
||||
}
|
|
@ -347,10 +347,10 @@ namespace HISP.Game
|
|||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatNpcSearchResult(string name, int x, int y)
|
||||
public static string FormatNpcSearchResult(string name, string desc,int x, int y)
|
||||
{
|
||||
string mapXy = FormatMapLocation(x, y);
|
||||
return LibaryFindNpcSearchResultFormat.Replace("%NPCNAME%", name).Replace("%MAPXY%", mapXy);
|
||||
return LibaryFindNpcSearchResultFormat.Replace("%NPCNAME%", name).Replace("%MAPXY%", mapXy).Replace("%NPCDESC%", desc);
|
||||
}
|
||||
public static string FormatLastPoet(string name)
|
||||
{
|
||||
|
|
|
@ -649,7 +649,7 @@ namespace HISP.Game
|
|||
message = Messages.LibaryFindNpcSearchResultsHeader;
|
||||
foreach(Npc.NpcEntry npc in foundNpcs)
|
||||
{
|
||||
string searchResult = Messages.FormatNpcSearchResult(npc.Name, npc.X, npc.Y);
|
||||
string searchResult = Messages.FormatNpcSearchResult(npc.Name, npc.ShortDescription, npc.X, npc.Y);
|
||||
Logger.DebugPrint(searchResult);
|
||||
message += searchResult;
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<Compile Include="Game\AbuseReport.cs" />
|
||||
<Compile Include="Game\Chat\Command.cs" />
|
||||
<Compile Include="Game\GameExceptions.cs" />
|
||||
<Compile Include="Game\Horse.cs" />
|
||||
<Compile Include="Game\Inventory\InventoryItem.cs" />
|
||||
<Compile Include="Game\Quest.cs" />
|
||||
<Compile Include="Game\Services\Inn.cs" />
|
||||
|
|
|
@ -452,6 +452,37 @@ namespace HISP.Server
|
|||
Logger.DebugPrint("Registed poet: " + entry.Id.ToString() + " word: " + entry.Word + " in room " + entry.Room.ToString());
|
||||
}
|
||||
|
||||
// Register Horse Breeds
|
||||
int totalBreeds = gameData.horses.breeds.Count;
|
||||
for(int i = 0; i < totalBreeds; i++)
|
||||
{
|
||||
Horse.Breed horseBreed = new Horse.Breed();
|
||||
|
||||
horseBreed.Id = gameData.horses.breeds[i].id;
|
||||
horseBreed.Name = gameData.horses.breeds[i].name;
|
||||
horseBreed.Description = gameData.horses.breeds[i].description;
|
||||
|
||||
horseBreed.BaseStats = new Horse.Stats();
|
||||
horseBreed.BaseStats.Speed = gameData.horses.breeds[i].base_stats.speed;
|
||||
horseBreed.BaseStats.Strength = gameData.horses.breeds[i].base_stats.strength;
|
||||
horseBreed.BaseStats.Conformation = gameData.horses.breeds[i].base_stats.conformation;
|
||||
horseBreed.BaseStats.Agility = gameData.horses.breeds[i].base_stats.agility;
|
||||
horseBreed.BaseStats.Endurance = gameData.horses.breeds[i].base_stats.endurance;
|
||||
horseBreed.BaseStats.Inteligence = gameData.horses.breeds[i].base_stats.inteligence;
|
||||
horseBreed.BaseStats.Personality = gameData.horses.breeds[i].base_stats.personality;
|
||||
horseBreed.BaseStats.Height = gameData.horses.breeds[i].base_stats.height;
|
||||
horseBreed.BaseStats.MinHeight = gameData.horses.breeds[i].base_stats.min_height;
|
||||
horseBreed.BaseStats.MaxHeight = gameData.horses.breeds[i].base_stats.max_height;
|
||||
|
||||
horseBreed.Colors = gameData.horses.breeds[i].colors.ToObject<string[]>();
|
||||
horseBreed.SpawnOn = gameData.horses.breeds[i].spawn_on;
|
||||
horseBreed.SpawnInArea = gameData.horses.breeds[i].spawn_area;
|
||||
horseBreed.Swf = gameData.horses.breeds[i].swf;
|
||||
horseBreed.Type = gameData.horses.breeds[i].type;
|
||||
|
||||
Horse.Breeds.Add(horseBreed);
|
||||
Logger.DebugPrint("Reigistering Horse Breed: #" + horseBreed.Id + ": " + horseBreed.Name);
|
||||
}
|
||||
|
||||
|
||||
Item.Present = gameData.item.special.present;
|
||||
|
|
Loading…
Add table
Reference in a new issue