Modernization Fixes & Updates to Default Values (#3)
This commit is contained in:
parent
445eddff68
commit
dcf64091b1
768 changed files with 10507 additions and 14196 deletions
|
|
@ -56,8 +56,9 @@ namespace Server.Engines.Quests.Hag
|
|||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is WitchApprenticeQuest)
|
||||
if (qs.FindObjective(typeof(FindIngredientObjective)) is FindIngredientObjective obj && !obj.Completed &&
|
||||
obj.Ingredient == Ingredient.Whiskey)
|
||||
{
|
||||
FindIngredientObjective obj = qs.FindObjective<FindIngredientObjective>();
|
||||
if (obj?.Completed == false && obj.Ingredient == Ingredient.Whiskey)
|
||||
{
|
||||
PlaySound(Utility.RandomBool() ? 0x42E : 0x43F);
|
||||
|
||||
|
|
@ -83,6 +84,7 @@ namespace Server.Engines.Quests.Hag
|
|||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PlaySound(0x42C);
|
||||
SayTo(player, 1055041); // The drunken pirate shakes his fist at you and goes back to drinking.
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ namespace Server.Engines.Quests.Hag
|
|||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(FindGrizeldaAboutMurderObjective));
|
||||
QuestObjective obj = qs.FindObjective<FindGrizeldaAboutMurderObjective>();
|
||||
|
||||
if (obj != null && !obj.Completed)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
PlaySound(0x420);
|
||||
PlaySound(0x20);
|
||||
|
|
@ -74,9 +74,9 @@ namespace Server.Engines.Quests.Hag
|
|||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(ReturnRecipeObjective));
|
||||
obj = qs.FindObjective<ReturnRecipeObjective>();
|
||||
|
||||
if (obj != null && !obj.Completed)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
PlaySound(0x258);
|
||||
PlaySound(0x41B);
|
||||
|
|
@ -90,9 +90,9 @@ namespace Server.Engines.Quests.Hag
|
|||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective(typeof(ReturnIngredientsObjective));
|
||||
obj = qs.FindObjective<ReturnIngredientsObjective>();
|
||||
|
||||
if (obj != null && !obj.Completed)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
|
|
@ -181,13 +181,12 @@ namespace Server.Engines.Quests.Hag
|
|||
else
|
||||
{
|
||||
QuestSystem newQuest = new WitchApprenticeQuest(player);
|
||||
bool inRestartPeriod = false;
|
||||
|
||||
if (qs != null)
|
||||
{
|
||||
newQuest.AddConversation(new DontOfferConversation());
|
||||
}
|
||||
else if (QuestSystem.CanOfferQuest(player, typeof(WitchApprenticeQuest), out inRestartPeriod))
|
||||
else if (QuestSystem.CanOfferQuest(player, typeof(WitchApprenticeQuest), out bool inRestartPeriod))
|
||||
{
|
||||
PlaySound(0x20);
|
||||
PlaySound(0x206);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue