move stuckmenu methods from core mobile to PlayerMobile

take advantage of IEntity/Parent refactor in a few trivial places
This commit is contained in:
Mark Sturgill 2014-02-15 13:52:03 -07:00
parent 12826da7c4
commit 2f005966f9
5 changed files with 101 additions and 73 deletions

View file

@ -239,7 +239,7 @@ namespace Server.Engines.Help
{
from.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil.
}
else if ( from.CanUseStuckMenu() && from.Region.CanUseStuckMenu( from ) && !CheckCombat( from ) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5) )
else if ( from is PlayerMobile && ((PlayerMobile)from).CanUseStuckMenu() && from.Region.CanUseStuckMenu( from ) && !CheckCombat( from ) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5) )
{
StuckMenu menu = new StuckMenu( from, from, true );

View file

@ -1,4 +1,5 @@
using System;
using Server.Mobiles;
using Server.Network;
using Server.Gumps;
@ -203,7 +204,8 @@ namespace Server.Menus.Questions
new TeleportTimer( m_Mobile, entry, TimeSpan.FromSeconds( 10.0 + (Utility.RandomDouble() * 110.0) ) ).Start();
m_Mobile.UsedStuckMenu();
if (m_Mobile is PlayerMobile)
((PlayerMobile)m_Mobile).UsedStuckMenu();
}
else
{