This commit is contained in:
parent
60ad317065
commit
4933751ac4
7 changed files with 312 additions and 91 deletions
|
|
@ -9823,7 +9823,7 @@ namespace Server
|
|||
|
||||
if( sendPublicStats || sendPrivateStats )
|
||||
{
|
||||
ourState.Send( new MobileStatusExtended( m ) );
|
||||
ourState.Send( new MobileStatusExtended( m, m_NetState ) );
|
||||
}
|
||||
else if( sendAll )
|
||||
{
|
||||
|
|
@ -10555,7 +10555,7 @@ namespace Server
|
|||
public virtual void OnStatsQuery( Mobile from )
|
||||
{
|
||||
if( from.Map == this.Map && Utility.InUpdateRange( this, from ) && from.CanSee( this ) )
|
||||
from.Send( new MobileStatus( from, this ) );
|
||||
from.Send( new MobileStatus( from, this, m_NetState ) );
|
||||
|
||||
if( from == this )
|
||||
Send( new StatLockInfo( this ) );
|
||||
|
|
|
|||
|
|
@ -2725,12 +2725,16 @@ namespace Server.Network
|
|||
|
||||
public sealed class MobileStatusExtended : Packet
|
||||
{
|
||||
public MobileStatusExtended( Mobile m ) : base( 0x11 )
|
||||
public MobileStatusExtended( Mobile m ) : this( m, m.NetState )
|
||||
{
|
||||
}
|
||||
|
||||
public MobileStatusExtended( Mobile m, NetState ns ) : base( 0x11 )
|
||||
{
|
||||
string name = m.Name;
|
||||
if ( name == null ) name = "";
|
||||
|
||||
bool sendMaxWeight = (Core.ML && m.NetState != null && m.NetState.SupportsExpansion( Expansion.ML ));
|
||||
bool sendMaxWeight = (Core.ML && ns != null && ns.SupportsExpansion( Expansion.ML ));
|
||||
|
||||
|
||||
this.EnsureCapacity( sendMaxWeight ? 91 :88 );
|
||||
|
|
@ -2797,12 +2801,16 @@ namespace Server.Network
|
|||
|
||||
public sealed class MobileStatus : Packet
|
||||
{
|
||||
public MobileStatus( Mobile beholder, Mobile beheld ) : base( 0x11 )
|
||||
public MobileStatus( Mobile beholder, Mobile beheld ) : this( beholder, beheld, beheld.NetState )
|
||||
{
|
||||
}
|
||||
|
||||
public MobileStatus( Mobile beholder, Mobile beheld, NetState ns ) : base( 0x11 )
|
||||
{
|
||||
string name = beheld.Name;
|
||||
if ( name == null ) name = "";
|
||||
|
||||
bool sendMaxWeight = (Core.ML && beheld.NetState != null && beheld.NetState.SupportsExpansion( Expansion.ML ));
|
||||
bool sendMaxWeight = (Core.ML && ns != null && ns.SupportsExpansion( Expansion.ML ));
|
||||
|
||||
this.EnsureCapacity( 43 + (beholder == beheld ? (sendMaxWeight ? 48 : 45) : 0) );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue