fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350)

This commit is contained in:
Kamron Batman 2023-02-25 00:54:12 -08:00 • committed by GitHub
parent 22376cfc20
commit 42012538bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
177 changed files with 994 additions and 1262 deletions

View file

@ -1,5 +1,4 @@
using Server.Mobiles;
using Server.Network;
namespace Server.Factions
{

View file

@ -1,5 +1,4 @@
using Server.Mobiles;
using Server.Network;
namespace Server.Factions
{

View file

@ -1,5 +1,4 @@
using Server.Mobiles;
using Server.Network;
namespace Server.Factions
{

View file

@ -1,5 +1,4 @@
using Server.Factions;
using Server.Network;
namespace Server
{

View file

@ -2,7 +2,6 @@ using System;
using System.IO;
using Server.Factions;
using Server.Mobiles;
using Server.Network;
using Server.Utilities;
namespace Server

View file

@ -1,7 +1,6 @@
using Server.Factions;
using Server.Gumps;
using Server.Multis;
using Server.Network;
namespace Server
{

View file

@ -2,7 +2,6 @@ using System;
using Server.Factions.AI;
using Server.Items;
using Server.Mobiles;
using Server.Network;
namespace Server.Factions
{

View file

@ -106,7 +106,7 @@ namespace Server.Factions
private const int ManaReserve = 30;
private readonly BaseFactionGuard m_Guard;
private BandageContext m_Bandage;
private BandageContext _bandage;
private DateTime m_BandageStart;
private SpellCombo m_Combo;
@ -123,21 +123,21 @@ namespace Server.Factions
{
get
{
if (m_Bandage != null && m_Bandage.Timer == null)
if (_bandage != null && !_bandage.Running)
{
m_Bandage = null;
_bandage = null;
}
if (m_Bandage == null)
if (_bandage == null)
{
return TimeSpan.MaxValue;
}
var ts = m_BandageStart + m_Bandage.Timer.Delay - Core.Now;
var ts = m_BandageStart + _bandage.Delay - Core.Now;
if (ts < TimeSpan.FromSeconds(-1.0))
{
m_Bandage = null;
_bandage = null;
return TimeSpan.MaxValue;
}
@ -174,16 +174,15 @@ namespace Server.Factions
public bool StartBandage()
{
m_Bandage = null;
_bandage = null;
if (m_Guard.Backpack?.FindItemByType<Bandage>() == null)
if (m_Guard.Backpack?.FindItemByType<Bandage>() != null)
{
return false;
_bandage = BandageContext.BeginHeal(m_Guard, m_Guard);
m_BandageStart = Core.Now;
}
m_Bandage = BandageContext.BeginHeal(m_Guard, m_Guard);
m_BandageStart = Core.Now;
return m_Bandage != null;
return _bandage != null;
}
public bool UseItemByType(Type type)

View file

@ -1,7 +1,6 @@
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using Server.Network;
namespace Server.Factions
{