public override bool DoesPotentialItemNeedID(uTank2.LootPlugins.GameItemInfo item)
        {
            try
            {
                if (item.HasIDData)
                {
                    return(false);
                }

                bool ret = LootRules.NeedsID(item);

#if DEBUGMSG
                if (ret)
                {
                    Host.AddChatText("Item " + item.GetValueString(StringValueKey.Name, "") + " will get ID.", 0);
                }
                else
                {
                    Host.AddChatText("Item " + item.GetValueString(StringValueKey.Name, "") + " does not need ID.", 6);
                }


                if (ret)
                {
                    neededid++;
                }
                else
                {
                    noid++;
                }

                if (((neededid + noid) % 20) == 0)
                {
                    Host.AddChatText((neededid + noid).ToString() + " items seen, ID rate " + Math.Round(100d * (double)(neededid) / (double)(neededid + noid), 1).ToString() + "%");
                }
#endif

                return(ret);
            }
            catch (Exception ex)
            {
                ExceptionHandler(ex);
            }

            return(true);
        }
        public override uTank2.LootPlugins.LootAction GetLootDecision(uTank2.LootPlugins.GameItemInfo item)
        {
            try
            {
                if (LootRules == null)
                {
                    return(uTank2.LootPlugins.LootAction.NoLoot);
                }

                string      matchedrulename;
                int         data1;
                eLootAction act      = LootRules.Classify(item, out matchedrulename, out data1);
                LootAction  vtaction = LootAction.NoLoot;
                switch (act)
                {
                case eLootAction.Keep:
                    vtaction = LootAction.Keep;
                    break;

                case eLootAction.NoLoot:
                    vtaction = LootAction.NoLoot;
                    break;

                case eLootAction.Salvage:
                    vtaction = LootAction.Salvage;
                    break;

                case eLootAction.KeepUpTo:
                    vtaction = LootAction.GetKeepUpTo(data1);
                    break;

                case eLootAction.Sell:
                    vtaction = LootAction.Sell;
                    break;
                }
                vtaction.RuleName = matchedrulename;
                return(vtaction);
            }
            catch (Exception ex)
            {
                ExceptionHandler(ex);
            }

            return(uTank2.LootPlugins.LootAction.NoLoot);
        }
 public abstract LootAction GetLootDecision(GameItemInfo item);
 public abstract bool DoesPotentialItemNeedID(GameItemInfo item);