public void OnHammerRepair(CM_HAMMER_REPAIR p) { if (map.Campfires[p.CampfireID] is ActorMapObj campfire) { Dictionary <Common.Item.Item, ushort> items = new Dictionary <Common.Item.Item, ushort>(); Common.Item.Item add; ushort total = 0; foreach (KeyValuePair <ushort, ushort> i in p.ExchangeItems) { add = Character.Inventory.Container[Containers.Inventory][i.Key]; if (add != null) { if (add.Count >= i.Value && add.BaseData.ItemType == ItemType.RepairKit)//TODO: Find which Repair Kits go with which items { items.Add(add, i.Value); total += i.Value; } else { break; } } } if (total == 1) { Repair repair = new Repair(); SkillArg arg = new SkillArg() { Caster = chara, Target = campfire }; repair.HandleSkillActivate(arg, items); } } }