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
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Hag;
|
||||
|
|
@ -808,24 +809,27 @@ namespace Server.Items
|
|||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is WitchApprenticeQuest)
|
||||
if (qs.FindObjective(typeof(FindIngredientObjective)) is FindIngredientObjective obj &&
|
||||
!obj.Completed && obj.Ingredient == Ingredient.SwampWater)
|
||||
if (!(qs is WitchApprenticeQuest))
|
||||
return;
|
||||
|
||||
FindIngredientObjective obj = qs.FindObjective<FindIngredientObjective>();
|
||||
|
||||
if (obj?.Completed == true && obj.Ingredient == Ingredient.SwampWater)
|
||||
{
|
||||
bool contains = false;
|
||||
|
||||
for (int i = 0; !contains && i < m_SwampTiles.Length; i += 2)
|
||||
contains = tileID >= m_SwampTiles[i] && tileID <= m_SwampTiles[i + 1];
|
||||
|
||||
if (contains)
|
||||
{
|
||||
bool contains = false;
|
||||
Delete();
|
||||
|
||||
for (int i = 0; !contains && i < m_SwampTiles.Length; i += 2)
|
||||
contains = tileID >= m_SwampTiles[i] && tileID <= m_SwampTiles[i + 1];
|
||||
|
||||
if (contains)
|
||||
{
|
||||
Delete();
|
||||
|
||||
player.SendLocalizedMessage(
|
||||
1055035); // You dip the container into the disgusting swamp water, collecting enough for the Hag's vile stew.
|
||||
obj.Complete();
|
||||
}
|
||||
player.SendLocalizedMessage(
|
||||
1055035); // You dip the container into the disgusting swamp water, collecting enough for the Hag's vile stew.
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -942,9 +946,9 @@ namespace Server.Items
|
|||
if (from is PlayerMobile player)
|
||||
if (player.Quest is SolenMatriarchQuest qs)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective(typeof(GatherWaterObjective));
|
||||
QuestObjective obj = qs.FindObjective<GatherWaterObjective>();
|
||||
|
||||
if (obj != null && !obj.Completed)
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
BaseAddon vat = component.Addon;
|
||||
|
||||
|
|
@ -1086,7 +1090,7 @@ namespace Server.Items
|
|||
|
||||
#region Effects of achohol
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -1102,7 +1106,7 @@ namespace Server.Items
|
|||
{
|
||||
if (from.BAC > 0 && from.Map != Map.Internal && !from.Deleted)
|
||||
{
|
||||
Timer t = (Timer)m_Table[from];
|
||||
Timer t = m_Table[from];
|
||||
|
||||
if (t == null)
|
||||
{
|
||||
|
|
@ -1117,7 +1121,7 @@ namespace Server.Items
|
|||
}
|
||||
else
|
||||
{
|
||||
Timer t = (Timer)m_Table[from];
|
||||
Timer t = m_Table[from];
|
||||
|
||||
if (t != null)
|
||||
{
|
||||
|
|
@ -1189,4 +1193,4 @@ namespace Server.Items
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace Server.Items
|
|||
|
||||
if (IsHeatSource(targeted))
|
||||
{
|
||||
if (from.BeginAction(typeof(CookableFood)))
|
||||
if (from.BeginAction<CookableFood>())
|
||||
{
|
||||
from.PlaySound(0x225);
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_From.EndAction(typeof(CookableFood));
|
||||
m_From.EndAction<CookableFood>();
|
||||
|
||||
if (m_From.Map != m_Map || m_Point != null && m_From.GetDistanceToSqrt(m_Point) > 3)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ namespace Server.Items
|
|||
}
|
||||
else if ( targeted is TribalBerry )
|
||||
{
|
||||
if ( from.Skills[SkillName.Cooking].Base >= 80.0 )
|
||||
if ( from.Skills.Cooking.Base >= 80.0 )
|
||||
{
|
||||
m_Item.Delete();
|
||||
((TribalBerry)targeted).Delete();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue