Fixes bug with props gump (#10)
This commit is contained in:
parent
647d6c0fd0
commit
82856df610
3 changed files with 19 additions and 57 deletions
|
|
@ -572,12 +572,14 @@ namespace Server.Gumps
|
|||
|
||||
if (baseType == typeofObject || baseType?.GetProperty(prop.Name, prop.PropertyType) == null)
|
||||
break;
|
||||
|
||||
|
||||
type = baseType;
|
||||
}
|
||||
|
||||
|
||||
if (type != null && !groups.ContainsKey(type))
|
||||
groups[type] = new List<PropertyInfo>{ prop };
|
||||
else
|
||||
groups[type].Add(prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -657,13 +659,13 @@ namespace Server.Gumps
|
|||
return 0;
|
||||
if (x == null)
|
||||
return -1;
|
||||
|
||||
|
||||
return y == null ? 1 : x.Name.CompareTo(x.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private class GroupComparer : IComparer<KeyValuePair<Type, List<PropertyInfo>>>
|
||||
{
|
||||
{
|
||||
private Type m_Start;
|
||||
|
||||
public GroupComparer(Type start)
|
||||
|
|
@ -689,4 +691,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,62 +281,22 @@ namespace Server
|
|||
|
||||
private static bool IsArmor(int itemID)
|
||||
{
|
||||
if (itemID >= 0x13BB && itemID <= 0x13E2)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13E5 && itemID <= 0x13F2)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x1408 && itemID <= 0x141A)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x144E && itemID <= 0x1457)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return itemID >= 0x13BB && itemID <= 0x13E2 || itemID >= 0x13E5 && itemID <= 0x13F2 ||
|
||||
itemID >= 0x1408 && itemID <= 0x141A || itemID >= 0x144E && itemID <= 0x1457;
|
||||
}
|
||||
|
||||
private static bool IsMetalWeapon(int itemID)
|
||||
{
|
||||
if (itemID >= 0xF43 && itemID <= 0xF4E)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0xF51 && itemID <= 0xF52)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0xF5C && itemID <= 0xF63)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13AF && itemID <= 0x13B0)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13B5 && itemID <= 0x13BA)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13FA && itemID <= 0x13FB)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13FE && itemID <= 0x1407)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x1438 && itemID <= 0x1443)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return itemID >= 0xF43 && itemID <= 0xF4E || itemID >= 0xF51 && itemID <= 0xF52 ||
|
||||
itemID >= 0xF5C && itemID <= 0xF63 || itemID >= 0x13AF && itemID <= 0x13B0 ||
|
||||
itemID >= 0x13B5 && itemID <= 0x13BA || itemID >= 0x13FA && itemID <= 0x13FB ||
|
||||
itemID >= 0x13FE && itemID <= 0x1407 || itemID >= 0x1438 && itemID <= 0x1443;
|
||||
}
|
||||
|
||||
private static bool IsArcheryWeapon(int itemID)
|
||||
{
|
||||
if (itemID >= 0xF4F && itemID <= 0xF50)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13B1 && itemID <= 0x13B2)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x13FC && itemID <= 0x13FD)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return itemID >= 0xF4F && itemID <= 0xF50 || itemID >= 0x13B1 && itemID <= 0x13B2 ||
|
||||
itemID >= 0x13FC && itemID <= 0x13FD;
|
||||
}
|
||||
|
||||
private static ShopFlags ProcessDisplayedItem(int itemID)
|
||||
|
|
@ -481,9 +441,9 @@ namespace Server
|
|||
floor.Add(p);
|
||||
|
||||
for (int xo = -1; xo <= 1; ++xo)
|
||||
for (int yo = -1; yo <= 1; ++yo)
|
||||
if ((xo != 0 || yo != 0) && IsFloor(map, x + xo, y + yo, false))
|
||||
RecurseFindFloor(map, x + xo, y + yo, floor);
|
||||
for (int yo = -1; yo <= 1; ++yo)
|
||||
if ((xo != 0 || yo != 0) && IsFloor(map, x + xo, y + yo, false))
|
||||
RecurseFindFloor(map, x + xo, y + yo, floor);
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace Server.Regions
|
|||
if (bc?.NoHouseRestrictions == true)
|
||||
{
|
||||
}
|
||||
else if (bc.IsHouseSummonable == true &&
|
||||
else if (bc?.IsHouseSummonable == true &&
|
||||
!(BaseCreature.Summoning || House.IsInside(oldLocation, 16)))
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue