public static RemoveCount ( int id, int n, Hashtable ht ) : int | ||
id | int | |
n | int | |
ht | Hashtable | |
return | int |
public static int RemoveCount(int id, int n, Hashtable ht)
{
int count = GameHandler.GetCount(id, ht);
if(ht.ContainsKey(id))
{
ht.Remove(id);
}
count -= n;
if(count > 0)
{
ht.Add(id, count);
}
return count;
}