Tibialyzer.Hunt.DeleteCreatureWithThreshold C# (CSharp) Method

DeleteCreatureWithThreshold() public method

public DeleteCreatureWithThreshold ( int killThreshold ) : void
killThreshold int
return void
        public void DeleteCreatureWithThreshold(int killThreshold)
        {
            List<Creature> deleteList = new List<Creature>();
            lock (huntLock) {
                foreach (KeyValuePair<Creature, int> kvp in this.loot.killCount) {
                    if (kvp.Value < killThreshold) deleteList.Add(kvp.Key);
                }
            }
            foreach (Creature cr in deleteList) {
                this.DeleteCreature(cr);
            }
        }

Usage Example

Example #1
0
 public static void deleteCreatureWithThreshold(int killThreshold)
 {
     activeHunt.DeleteCreatureWithThreshold(killThreshold);
     LootDatabaseManager.UpdateLoot();
 }