mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 05:05:53 +12:00
no message
This commit is contained in:
parent
75ca6a2a5c
commit
efc21b7b5b
6 changed files with 71 additions and 8 deletions
|
@ -7,8 +7,6 @@ namespace HISP.Game
|
|||
public static int RequiredChatViolations;
|
||||
public static int DefaultInventoryMax;
|
||||
|
||||
|
||||
|
||||
// Tools
|
||||
public static string BinocularsNothing;
|
||||
public static string MagnifyNothing;
|
||||
|
@ -57,6 +55,16 @@ namespace HISP.Game
|
|||
|
||||
public static string[] StatPlayerFormats;
|
||||
|
||||
// Quests Completed Page
|
||||
public static string QuestLogHeader;
|
||||
public static string QuestFormat;
|
||||
|
||||
public static string QuestNotCompleted;
|
||||
public static string QuestNotAvalible;
|
||||
public static string QuestCompleted;
|
||||
|
||||
public static string QuestFooterFormat;
|
||||
|
||||
// Announcements
|
||||
public static string NewUserMessage;
|
||||
public static string WelcomeFormat;
|
||||
|
@ -216,6 +224,16 @@ namespace HISP.Game
|
|||
|
||||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatQuestFooter(int totalQuestsComplete, int totalQuests, int questPoints, int totalQuestPoints)
|
||||
{
|
||||
return QuestFooterFormat.Replace("%TOTALCOMPLETED%", totalQuestsComplete.ToString("N0")).Replace("%TOTALQUESTS%", totalQuests.ToString("N0")).Replace("%TOTALPERCENT%", ((totalQuestsComplete / totalQuests) * 100).ToString()).Replace("%YOURQP%", questPoints.ToString("N0")).Replace("%YOURQP%", totalQuestPoints.ToString("N0")).Replace("%QPERCENT%", ((totalQuestsComplete / totalQuests) * 100).ToString());
|
||||
}
|
||||
public static string FormatQuestLogQuest(string questTitle, int questPoints, string difficulty, string completionStatus)
|
||||
{
|
||||
return QuestFormat.Replace("%TITLE%", questTitle).Replace("%QUESTPOINTS%", questPoints.ToString("N0")).Replace("%DIFFICULTY%", difficulty).Replace("%COMPLETION%", completionStatus);
|
||||
}
|
||||
|
||||
public static string FormatPrivateNotes(string privateNotes)
|
||||
{
|
||||
return PrivateNotesMetaFormat.Replace("%PRIVATENOTES%", privateNotes);
|
||||
|
|
|
@ -309,6 +309,15 @@ namespace HISP.Game
|
|||
|
||||
return message;
|
||||
}
|
||||
|
||||
public static string BuildQuestLog(User user)
|
||||
{
|
||||
string message = "";
|
||||
message += Messages.QuestLogHeader;
|
||||
Quest.QuestEntry[] questList = Quest.GetPublicQuestList();
|
||||
foreach (Quest.QuestEntry quest in questList)
|
||||
}
|
||||
|
||||
public static string BuildSpecialTileInfo(User user, World.SpecialTile specialTile)
|
||||
{
|
||||
string message = "";
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace HISP.Game
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using HISP.Player;
|
||||
using HISP.Server;
|
||||
|
||||
|
@ -60,6 +60,27 @@ namespace HISP.Game
|
|||
|
||||
public static List<QuestEntry> QuestList = new List<QuestEntry>();
|
||||
|
||||
public static int GetTotalQuestPoints()
|
||||
{
|
||||
int totalQp = 0;
|
||||
QuestEntry[] quests = GetPublicQuestList();
|
||||
foreach(QuestEntry quest in quests)
|
||||
{
|
||||
totalQp += quest.QuestPointsEarned;
|
||||
}
|
||||
return totalQp;
|
||||
}
|
||||
public static QuestEntry[] GetPublicQuestList()
|
||||
{
|
||||
List<QuestEntry> quests = QuestList.OrderBy(o => o.Title).ToList();
|
||||
foreach(QuestEntry quest in quests)
|
||||
{
|
||||
if (quest.Title == null)
|
||||
quests.Remove(quest);
|
||||
|
||||
}
|
||||
return quests.ToArray();
|
||||
}
|
||||
|
||||
public static bool ActivateQuest(User user, QuestEntry quest, bool npcActivation = false)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue