Exemplo n.º 1
0
 public WeaponData GetWeapon(int id)
 {
     if (!_weaponMap.TryGetValue(id, out var item))
     {
         _weaponMap.Add(id, null);
         _weaponMap[id] = item = WeaponData.Deserialize(_jsonDatabase.GetWeapon(id), this);
     }
     if (item == null)
     {
         throw new DatabaseException(CircularDependencyText + "Weapon_" + id);
     }
     return(item);
 }