mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-13 08:29:49 +12:00
allow for 'view breeds' in libary.
This commit is contained in:
parent
595d5e9797
commit
b66fe013ba
5 changed files with 37 additions and 2 deletions
|
@ -136,7 +136,9 @@
|
||||||
"find_npc_results_header":"The following residents match closely:<BR>",
|
"find_npc_results_header":"The following residents match closely:<BR>",
|
||||||
"find_npc_results_format":"^T7%NPCNAME%, %NPCDESC%^B1M%MAPXY%^R1",
|
"find_npc_results_format":"^T7%NPCNAME%, %NPCDESC%^B1M%MAPXY%^R1",
|
||||||
"find_npc_no_results":"The following residents match closely:<BR>None were found by that name, try looking for a partial name.",
|
"find_npc_no_results":"The following residents match closely:<BR>None were found by that name, try looking for a partial name.",
|
||||||
"find_npc_limit5":"^L- Limited to 5 results. Try narrowing the search.^R1"
|
"find_npc_limit5":"^L- Limited to 5 results. Try narrowing the search.^R1",
|
||||||
|
"horse_breed_format":"^I252^T7Horse Breed %NAME%:^D4c%ID%|VIEW^R1",
|
||||||
|
"horse_relative_format":"^I252^T7A Horse Relative, the %NAME%:^D4c%ID%|VIEW^R1"
|
||||||
},
|
},
|
||||||
"multiroom":{
|
"multiroom":{
|
||||||
"other_players_participating":"<BR>^LThe following other players are participating:",
|
"other_players_participating":"<BR>^LThe following other players are participating:",
|
||||||
|
|
|
@ -83,6 +83,9 @@ namespace HISP.Game
|
||||||
public static string LibaryFindNpcSearchNoResults;
|
public static string LibaryFindNpcSearchNoResults;
|
||||||
public static string LibaryFindNpcLimit5;
|
public static string LibaryFindNpcLimit5;
|
||||||
|
|
||||||
|
public static string HorseBreedFormat;
|
||||||
|
public static string HorseRelativeFormat;
|
||||||
|
|
||||||
// Records
|
// Records
|
||||||
|
|
||||||
public static string ProfileSavedMessage;
|
public static string ProfileSavedMessage;
|
||||||
|
@ -347,6 +350,14 @@ namespace HISP.Game
|
||||||
// Click
|
// Click
|
||||||
public static string NothingInterestingHere;
|
public static string NothingInterestingHere;
|
||||||
|
|
||||||
|
public static string FormatHorseRelative(string name, int id)
|
||||||
|
{
|
||||||
|
return HorseRelativeFormat.Replace("%NAME%", name).Replace("%ID%", id.ToString());
|
||||||
|
}
|
||||||
|
public static string FormatHorseBreed(string name, int id)
|
||||||
|
{
|
||||||
|
return HorseBreedFormat.Replace("%NAME%", name).Replace("%ID%", id.ToString());
|
||||||
|
}
|
||||||
public static string FormatNpcSearchResult(string name, string desc,int x, int y)
|
public static string FormatNpcSearchResult(string name, string desc,int x, int y)
|
||||||
{
|
{
|
||||||
string mapXy = FormatMapLocation(x, y);
|
string mapXy = FormatMapLocation(x, y);
|
||||||
|
|
|
@ -620,6 +620,22 @@ namespace HISP.Game
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string BuildHorseList()
|
||||||
|
{
|
||||||
|
string message = "";
|
||||||
|
foreach(Horse.Breed breed in Horse.Breeds.OrderBy(o => o.Name).ToList())
|
||||||
|
{
|
||||||
|
if (breed.Type == "unicorn" || breed.Type == "pegasus")
|
||||||
|
continue;
|
||||||
|
if (breed.Type == "horse")
|
||||||
|
message += Messages.FormatHorseBreed(breed.Name, breed.Id);
|
||||||
|
else
|
||||||
|
message += Messages.FormatHorseRelative(breed.Name, breed.Id);
|
||||||
|
}
|
||||||
|
message += Messages.BackToMap;
|
||||||
|
message += Messages.MetaTerminator;
|
||||||
|
return message;
|
||||||
|
}
|
||||||
public static string BuildNpcSearch(string search)
|
public static string BuildNpcSearch(string search)
|
||||||
{
|
{
|
||||||
List<Npc.NpcEntry> foundNpcs = new List<Npc.NpcEntry>();
|
List<Npc.NpcEntry> foundNpcs = new List<Npc.NpcEntry>();
|
||||||
|
|
|
@ -594,6 +594,9 @@ namespace HISP.Server
|
||||||
Messages.LibaryFindNpcSearchNoResults = gameData.messages.meta.libary.find_npc_no_results;
|
Messages.LibaryFindNpcSearchNoResults = gameData.messages.meta.libary.find_npc_no_results;
|
||||||
Messages.LibaryFindNpcLimit5 = gameData.messages.meta.libary.find_npc_limit5;
|
Messages.LibaryFindNpcLimit5 = gameData.messages.meta.libary.find_npc_limit5;
|
||||||
|
|
||||||
|
Messages.HorseBreedFormat = gameData.messages.meta.libary.horse_breed_format;
|
||||||
|
Messages.HorseRelativeFormat = gameData.messages.meta.libary.horse_relative_format;
|
||||||
|
|
||||||
// Chat
|
// Chat
|
||||||
|
|
||||||
Messages.ChatViolationMessageFormat = gameData.messages.chat.violation_format;
|
Messages.ChatViolationMessageFormat = gameData.messages.chat.violation_format;
|
||||||
|
|
|
@ -356,7 +356,10 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case "31": // Find Ranch
|
case "31": // Find Ranch
|
||||||
break;
|
break;
|
||||||
case "4": // View Horse Breed
|
case "4": // View Horse Breeds
|
||||||
|
sender.LoggedinUser.MetaPriority = true;
|
||||||
|
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildHorseList());
|
||||||
|
sender.SendPacket(metaPacket);
|
||||||
break;
|
break;
|
||||||
case "9": // View Tack
|
case "9": // View Tack
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue