Fixes dictionary uses (#7)
This commit is contained in:
parent
d4a52344f2
commit
916d404c51
161 changed files with 1211 additions and 1722 deletions
|
|
@ -392,9 +392,10 @@ namespace Server
|
|||
if (flags != ShopFlags.None)
|
||||
{
|
||||
Point2D p = new Point2D(x, y);
|
||||
ShopInfo si = m_ShopTable[p];
|
||||
|
||||
if (si == null)
|
||||
if (m_ShopTable.TryGetValue(p, out ShopInfo si))
|
||||
si.m_Flags |= flags;
|
||||
else
|
||||
{
|
||||
List<Point2D> floor = new List<Point2D>();
|
||||
|
||||
|
|
@ -409,10 +410,6 @@ namespace Server
|
|||
for (int i = 0; i < floor.Count; ++i)
|
||||
m_ShopTable[floor[i]] = si;
|
||||
}
|
||||
else
|
||||
{
|
||||
si.m_Flags |= flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue