public static void ApplyLightTo(Item item)
{
if ((item.ItemData.Flags & TileFlag.LightSource) == 0)
return; // not a light source
int itemID = item.ItemID;
for (int i = 0; i < m_Entries.Length; ++i)
{
LightEntry entry = m_Entries[i];
int[] toMatch = entry.m_ItemIDs;
bool contains = false;
for (int j = 0; !contains && j < toMatch.Length; ++j)
contains = (itemID == toMatch[j]);
if (contains)
{
item.Light = entry.m_Light;
return;
}
}
}