Mostly cleanup...
Removed canbeharmful check on reveal spell BallOfSummoning required to be in pack Cleaned up ban duration gump
This commit is contained in:
parent
521e728edd
commit
4718a4b911
12 changed files with 30 additions and 40 deletions
|
|
@ -225,27 +225,34 @@ namespace Server.Gumps
|
|||
default: return;
|
||||
}
|
||||
|
||||
if ( shouldSet )
|
||||
{
|
||||
string comment = ( c != null && c.Text.Trim().Length > 0 ) ? c.Text.Trim(): "No Comment";
|
||||
if ( shouldSet ) {
|
||||
string comment = null;
|
||||
|
||||
if ( c != null ) {
|
||||
comment = c.Text.Trim();
|
||||
|
||||
if ( comment.Length == 0 )
|
||||
comment = null;
|
||||
}
|
||||
|
||||
for ( int i = 0; i < m_List.Count; ++i )
|
||||
{
|
||||
Account a = (Account)m_List[i];
|
||||
|
||||
a.SetBanTags( from, DateTime.Now, duration );
|
||||
a.Comments.Add( new AccountComment( from.RawName, String.Format( "Ban of {0} duration: {1}", (( duration == TimeSpan.MaxValue )? "infinite" : duration.ToString()), comment ) ) );
|
||||
|
||||
if ( comment != null )
|
||||
a.Comments.Add( new AccountComment( from.RawName, String.Format( "Duration: {0}, Comment: {1}", (( duration == TimeSpan.MaxValue )? "Infinite" : duration.ToString()), comment ) ) );
|
||||
}
|
||||
|
||||
if ( duration == TimeSpan.MaxValue )
|
||||
from.SendMessage( "Duration is infinite." );
|
||||
from.SendMessage( "Ban Duration: Infinite" );
|
||||
else
|
||||
from.SendMessage( "Duration is {0}.", duration );
|
||||
from.SendMessage( "Ban Duration: {0}", duration );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "Values improperly formatted." );
|
||||
from.SendMessage( "Time values were improperly formatted." );
|
||||
from.SendGump( new BanDurationGump( m_List ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = states[i].Mobile;
|
||||
|
||||
if ( m != null && (m == owner ||!m.Hidden || owner.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) )
|
||||
if ( m != null && (m == owner ||!m.Hidden || owner.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) )
|
||||
{
|
||||
if ( filter != null && ( m.Name == null || m.Name.ToLower().IndexOf( filter ) < 0 ) )
|
||||
continue;
|
||||
|
|
@ -281,7 +281,7 @@ namespace Server.Gumps
|
|||
from.SendMessage( "That player is no longer online." );
|
||||
from.SendGump( new WhoGump( from, m_Mobiles, m_Page ) );
|
||||
}
|
||||
else if ( m == from || !m.Hidden || from.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( from )))
|
||||
else if ( m == from || !m.Hidden || from.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( from )))
|
||||
{
|
||||
from.SendGump( new ClientGump( from, m.NetState ) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue