Tibialyzer.Hunt.AddSkin C# (CSharp) Method

AddSkin() public method

public AddSkin ( string message, Tibialyzer.Creature cr, Item item, int count, string timestamp ) : void
message string
cr Tibialyzer.Creature
item Item
count int
timestamp string
return void
        public void AddSkin(string message, Creature cr, Item item, int count, string timestamp)
        {
            lock (huntLock) {
                if (!this.loot.logMessages.ContainsKey(timestamp)) this.loot.logMessages.Add(timestamp, new List<string>());
                this.loot.logMessages[timestamp].Add(message);
                if (!this.loot.creatureLoot.ContainsKey(cr)) {
                    this.loot.creatureLoot.Add(cr, new Dictionary<Item, int>());
                }
                foreach (Item i in this.loot.creatureLoot[cr].Keys) {
                    if (i.id == cr.skin.dropitemid) {
                        this.loot.creatureLoot[cr][i] += count;
                        return;
                    }
                }
                this.loot.creatureLoot[cr].Add(item, count);
            }
        }

Usage Example

Example #1
0
 public static void AddSkin(Hunt h, string message, Creature cr, Item item, int count, string timestamp)
 {
     h.AddSkin(message, cr, item, count, timestamp);
 }
All Usage Examples Of Tibialyzer.Hunt::AddSkin