bug fixes

pets can no longer be renamed while in jail
This commit is contained in:
asayre 2006-08-14 07:41:26 +00:00
parent 8150706a3c
commit c26e081c58
12 changed files with 181 additions and 134 deletions

View file

@ -38,8 +38,17 @@ namespace Server.SkillHandlers
{
BaseArmor armor = m.Items[i] as BaseArmor;
if( armor != null && armor.ArmorAttributes.MageArmor == 0 )
ar += m_ArmorTable[(int)armor.MaterialType, (int)armor.BodyPosition];
if( armor == null )
continue;
int materialType = (int)armor.MaterialType;
int bodyPosition = (int)armor.BodyPosition;
if( materialType >= m_ArmorTable.GetLength( 0 ) || bodyPosition >= m_ArmorTable.GetLength( 1 ) )
continue;
if( armor.ArmorAttributes.MageArmor == 0 )
ar += m_ArmorTable[materialType, bodyPosition];
}
return ar;