fix(core): Fixes OPL with stale header (#651)
- [X] FIxes stale header/header args Closes #650 Closes #607
This commit is contained in:
parent
510d2e006b
commit
61c49b8faa
3 changed files with 10 additions and 11 deletions
|
|
@ -2986,8 +2986,8 @@ namespace Server
|
|||
}
|
||||
|
||||
const int cacheLength = OutgoingMobilePackets.MobileMovingPacketCacheByteLength;
|
||||
var width = OutgoingMobilePackets.MobileMovingPacketLength;
|
||||
var height = OutgoingMobilePackets.MobileMovingPacketCacheHeight;
|
||||
const int width = OutgoingMobilePackets.MobileMovingPacketLength;
|
||||
const int height = OutgoingMobilePackets.MobileMovingPacketCacheHeight;
|
||||
|
||||
var mobileMovingCache = stackalloc byte[cacheLength].AsSpan2D(height, width).InitializePackets();
|
||||
|
||||
|
|
@ -3463,7 +3463,7 @@ namespace Server
|
|||
|
||||
public virtual void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
var name = Name ?? string.Empty;
|
||||
var name = Name ?? "";
|
||||
|
||||
string prefix;
|
||||
|
||||
|
|
@ -8059,8 +8059,7 @@ namespace Server
|
|||
/// </summary>
|
||||
public virtual void OnSingleClick(Mobile from)
|
||||
{
|
||||
if (Deleted ||
|
||||
AccessLevel == AccessLevel.Player && DisableHiddenSelfClick && Hidden && from == this)
|
||||
if (Deleted || AccessLevel == AccessLevel.Player && DisableHiddenSelfClick && Hidden && from == this)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -8109,7 +8108,7 @@ namespace Server
|
|||
hue = Notoriety.GetHue(Notoriety.Compute(from, this));
|
||||
}
|
||||
|
||||
var name = Name ?? string.Empty;
|
||||
var name = Name ?? "";
|
||||
|
||||
var prefix = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ namespace Server
|
|||
_position = 15;
|
||||
_hash = 0;
|
||||
_strings = 0;
|
||||
Header = 0;
|
||||
HeaderArgs = null;
|
||||
}
|
||||
|
||||
public void Flush()
|
||||
|
|
|
|||
|
|
@ -38,9 +38,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
public static bool CheckMastery(Mobile tamer, BaseCreature creature) =>
|
||||
SummonFamiliarSpell.Table.TryGetValue(tamer, out var bc) && bc is DarkWolfFamiliar familiar &&
|
||||
!familiar.Deleted && (creature is DireWolf || creature is GreyWolf || creature is TimberWolf ||
|
||||
creature is WhiteWolf ||
|
||||
creature is BakeKitsune);
|
||||
!familiar.Deleted && creature is DireWolf or GreyWolf or TimberWolf or WhiteWolf or BakeKitsune;
|
||||
|
||||
public static bool MustBeSubdued(BaseCreature bc) =>
|
||||
bc.Owners.Count <= 0 && bc.SubdueBeforeTame && bc.Hits > bc.HitsMax / 10;
|
||||
|
|
@ -115,13 +113,13 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
from.RevealingAction();
|
||||
|
||||
if (!(targeted is Mobile mobile))
|
||||
if (targeted is not Mobile mobile)
|
||||
{
|
||||
from.SendLocalizedMessage(502801); // You can't tame that!
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(mobile is BaseCreature creature))
|
||||
if (mobile is not BaseCreature creature)
|
||||
{
|
||||
mobile.PrivateOverheadMessage(
|
||||
MessageType.Regular,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue