Faction.ClearSkillLoss now returns true or false indicating if the player was actually under skill loss

Refactored some gump methods to account for the respective core changes
This commit is contained in:
krrios 2006-08-27 20:39:11 +00:00
parent 6095f152cf
commit 51345e02a0
4 changed files with 18 additions and 41 deletions

View file

@ -237,19 +237,13 @@ namespace Server.Items
{
NetState ns = toCheck.NetState;
if ( ns == null )
return false;
if ( ns != null ) {
foreach ( Gump gump in ns.Gumps ) {
RunebookGump bookGump = gump as RunebookGump;
List<Gump> gumps = ns.Gumps;
for ( int i = 0; i < gumps.Count; ++i )
{
if ( gumps[i] is RunebookGump )
{
RunebookGump gump = (RunebookGump)gumps[i];
if ( gump.Book == this )
if ( bookGump != null && bookGump.Book == this ) {
return true;
}
}
}