- Removed invisible items from the item insurance menu.
- Changed the new context menu packet to only be used when necessary, until assistants are patched. - Added a setting for disabling target ID validation for debugging purposes. (It is still enabled by default.)
This commit is contained in:
parent
ec8520f4e0
commit
1cfac83311
5 changed files with 29 additions and 3 deletions
|
|
@ -1882,7 +1882,7 @@ namespace Server.Mobiles
|
|||
|
||||
private bool DisplayInItemInsuranceGump( Item item )
|
||||
{
|
||||
return ( item.Insured || CanInsure( item ) );
|
||||
return ( ( item.Visible || AccessLevel >= AccessLevel.GameMaster ) && ( item.Insured || CanInsure( item ) ) );
|
||||
}
|
||||
|
||||
private class ItemInsuranceMenuGump : Gump
|
||||
|
|
|
|||
|
|
@ -94,5 +94,22 @@ namespace Server.ContextMenus
|
|||
m_Entries[i].Owner = this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this ContextMenu requires packet version 2.
|
||||
/// </summary>
|
||||
public bool RequiresNewPacket
|
||||
{
|
||||
get
|
||||
{
|
||||
for ( int i = 0; i < m_Entries.Length; ++i )
|
||||
{
|
||||
if ( m_Entries[i].Number < 3000000 || m_Entries[i].Number > 3032767 )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2786,7 +2786,8 @@ namespace Server
|
|||
|
||||
if ( m_ContextMenu != null && m_NetState != null )
|
||||
{
|
||||
if ( m_NetState.NewHaven )
|
||||
// Old packet is preferred until assistants catch up
|
||||
if ( m_NetState.NewHaven && m_ContextMenu.RequiresNewPacket )
|
||||
Send( new DisplayContextMenu( m_ContextMenu ) );
|
||||
else
|
||||
Send( new DisplayContextMenuOld( m_ContextMenu ) );
|
||||
|
|
|
|||
|
|
@ -1126,7 +1126,7 @@ namespace Server.Network
|
|||
// User pressed escape
|
||||
t.Cancel( from, TargetCancelType.Canceled );
|
||||
}
|
||||
else if ( t.TargetID != targetID )
|
||||
else if ( Target.TargetIDValidation && t.TargetID != targetID )
|
||||
{
|
||||
// Sanity, prevent fake target
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@ namespace Server.Targeting
|
|||
{
|
||||
private static int m_NextTargetID;
|
||||
|
||||
private static bool m_TargetIDValidation = true;
|
||||
|
||||
public static bool TargetIDValidation
|
||||
{
|
||||
get { return m_TargetIDValidation; }
|
||||
set { m_TargetIDValidation = value; }
|
||||
}
|
||||
|
||||
private int m_TargetID;
|
||||
private int m_Range;
|
||||
private bool m_AllowGround;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue