7.0.9.x compat

updated spawner
This commit is contained in:
mark 2010-10-14 06:34:46 +00:00
parent e86794c4e6
commit 6441f12907
10 changed files with 367 additions and 88 deletions

View file

@ -16,7 +16,7 @@ namespace Server.Mobiles
AddPage( 0 );
AddBackground( 0, 0, 260, 371, 5054 );
AddBackground( 0, 0, 410, 371, 5054 );
AddLabel( 95, 1, 0, "Creatures List" );
@ -37,8 +37,8 @@ namespace Server.Mobiles
AddButton( 5, ( 22 * i ) + 20, 0xFA5, 0xFA7, 4 + (i * 2), GumpButtonType.Reply, 0 );
AddButton( 38, ( 22 * i ) + 20, 0xFA2, 0xFA4, 5 + (i * 2), GumpButtonType.Reply, 0 );
AddImageTiled( 71, ( 22 * i ) + 20, 159, 23, 0xA40 );
AddImageTiled( 72, ( 22 * i ) + 21, 157, 21, 0xBBC );
AddImageTiled( 71, ( 22 * i ) + 20, 309, 23, 0xA40 );
AddImageTiled( 72, ( 22 * i ) + 21, 307, 21, 0xBBC );
string str = "";
@ -47,10 +47,10 @@ namespace Server.Mobiles
str = (string)spawner.CreaturesName[i];
int count = m_Spawner.CountCreatures( str );
AddLabel( 232, ( 22 * i ) + 20, 0, count.ToString() );
AddLabel( 382, ( 22 * i ) + 20, 0, count.ToString() );
}
AddTextEntry( 75, ( 22 * i ) + 21, 154, 21, 0, i, str );
AddTextEntry( 75, ( 22 * i ) + 21, 304, 21, 0, i, str );
}
}
@ -70,12 +70,14 @@ namespace Server.Mobiles
{
str = str.Trim();
Type type = SpawnerType.GetType( str );
string t = Spawner.ParseType( str );
Type type = ScriptCompiler.FindTypeByName( t );
if ( type != null )
creaturesName.Add( str );
else
from.SendMessage( "{0} is not a valid type name.", str );
from.SendMessage( "{0} is not a valid type name.", t );
}
}
}