Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -39,8 +39,6 @@ namespace Server.Targeting
CheckLOS = true;
}
public static bool TargetIDValidation{ get; set; } = true;
public DateTime TimeoutTime{ get; private set; }
public bool CheckLOS{ get; set; }
@ -59,13 +57,8 @@ namespace Server.Targeting
public static void Cancel(Mobile m)
{
NetState ns = m.NetState;
ns?.Send(CancelTarget.Instance);
Target targ = m.Target;
targ?.OnTargetCancel(m, TargetCancelType.Canceled);
m.NetState?.Send(CancelTarget.Instance);
m.Target?.OnTargetCancel(m, TargetCancelType.Canceled);
}
public void BeginTimeout(Mobile from, TimeSpan delay)
@ -81,7 +74,6 @@ namespace Server.Targeting
public void CancelTimeout()
{
m_TimeoutTimer?.Stop();
m_TimeoutTimer = null;
}
@ -204,11 +196,11 @@ namespace Server.Targeting
OnTargetOutOfLOS(from, targeted);
else if (item?.InSecureTrade == true)
OnTargetInSecureTrade(from, targeted);
else if (item?.IsAccessibleTo(from) == true)
else if (item?.IsAccessibleTo(from) == false)
OnTargetNotAccessible(from, targeted);
else if (item?.CheckTarget(from, this, targeted) == true)
else if (item?.CheckTarget(from, this, targeted) == false)
OnTargetUntargetable(from, targeted);
else if (mobile?.CheckTarget(from, this, mobile) != true)
else if (mobile?.CheckTarget(from, this, mobile) == false)
OnTargetUntargetable(from, mobile);
else if (from.Region.OnTarget(from, this, targeted))
OnTarget(from, targeted);

View file

@ -18,8 +18,11 @@
*
***************************************************************************/
using System;
namespace Server.Targeting
{
[Flags]
public enum TargetFlags : byte
{
None = 0x00,