Example #1
0
 private uint findLowestFreeId()
 {
     for (uint i = 1; i < uint.MaxValue; i++)
     {
         if (!NPCPool.ContainsKey(i))
         {
             return(i);
         }
     }
     throw new Exception("No free ids");
 }