feat: Adds TextDefinition serialization support. (#1217)

This commit is contained in:
Kamron Batman 2022-10-30 01:42:48 -07:00 • committed by GitHub
parent 39e6f62ec9
commit d791feb583
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 301 additions and 267 deletions

View file

@ -96,7 +96,7 @@ namespace Server.Engines.MLQuests
public BaseObjectiveInstance[] Objectives { get; set; }
public bool SkipReportBack => TextDefinition.IsNullOrEmpty(Quest.CompletionMessage);
public bool SkipReportBack => Quest.CompletionMessage.IsNullOrEmpty();
private void Register()
{
@ -166,7 +166,7 @@ namespace Server.Engines.MLQuests
obj.OnQuestCompleted();
}
TextDefinition.SendMessageTo(Player, Quest.CompletionNotice, 0x23);
Quest.CompletionNotice.SendMessageTo(Player, 0x23);
/*
* Advance to the ClaimReward=true stage if this quest has no
@ -176,8 +176,8 @@ namespace Server.Engines.MLQuests
* For quests that require collections, this is done later when
* the player double clicks the quester.
*/
if (!Removed && SkipReportBack && !Quest.RequiresCollection
) // An OnQuestCompleted can potentially have removed this instance already
// An OnQuestCompleted can potentially have removed this instance already
if (!Removed && SkipReportBack && !Quest.RequiresCollection)
{
ContinueReportBack(false);
}