fix(core): Fixes OPL with stale header (#651)

- [X] FIxes stale header/header args

Closes #650 
Closes #607
This commit is contained in:
Kamron Batman 2021-06-11 23:44:05 -07:00 • committed by GitHub
parent 510d2e006b
commit 61c49b8faa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 11 deletions

View file

@ -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 = "";

View file

@ -58,6 +58,8 @@ namespace Server
_position = 15;
_hash = 0;
_strings = 0;
Header = 0;
HeaderArgs = null;
}
public void Flush()