public override bool DoesPotentialItemNeedID(uTank2.LootPlugins.GameItemInfo item) { try { // HACK check item.container = corpswithrareid // TODO add a public function DoesPotentialItemNeedID to alinco int result = mAlincoBase.GetLootDecision(item.Id, item.GetValueInt(IntValueKey.Container, 0), 1); if (result == 1) { return true; } switch (item.ObjectClass) { case ObjectClass.MissileWeapon: int t = item.GetValueInt(IntValueKey.MissileType, 0); if (t == 1 || t == 2 || t == 4) { return true; } break; case uTank2.LootPlugins.ObjectClass.Gem: case uTank2.LootPlugins.ObjectClass.Armor: case uTank2.LootPlugins.ObjectClass.Clothing: case uTank2.LootPlugins.ObjectClass.Jewelry: case uTank2.LootPlugins.ObjectClass.MeleeWeapon: case uTank2.LootPlugins.ObjectClass.MissileWeapon: case uTank2.LootPlugins.ObjectClass.WandStaffOrb: return true; } } catch (Exception ex) { } return false; }
public override bool DoesPotentialItemNeedID(uTank2.LootPlugins.GameItemInfo item) { try { int result = GFInstance.VTLinkDecision(item.Id, item.GetValueInt(IntValueKey.Container, 0), 1); if (result == 1) { return true; } switch (item.ObjectClass) { case uTank2.LootPlugins.ObjectClass.Gem: case uTank2.LootPlugins.ObjectClass.Armor: case uTank2.LootPlugins.ObjectClass.Clothing: case uTank2.LootPlugins.ObjectClass.Jewelry: case uTank2.LootPlugins.ObjectClass.MeleeWeapon: case uTank2.LootPlugins.ObjectClass.MissileWeapon: case uTank2.LootPlugins.ObjectClass.WandStaffOrb: case uTank2.LootPlugins.ObjectClass.Scroll: case uTank2.LootPlugins.ObjectClass.Misc: return true; } } catch (Exception ex) {GearFoundry.PluginCore.LogError(ex);} return false; }
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(GFInstance != null) {return GearFoundryRules(item.Id, 0, 0);} } catch (Exception ex) {GearFoundry.PluginCore.LogError(ex);} return uTank2.LootPlugins.LootAction.NoLoot; }
public override uTank2.LootPlugins.LootAction GetLootDecision(uTank2.LootPlugins.GameItemInfo item) { try { if (mAlincoLoaded) { // LogToFile("log.txt", "GetLootDecision1") return AlincoRules(item.Id, 0, 0); } } catch (Exception ex) { // LogToFile("log.txt", "Error GetLootDecision") } return uTank2.LootPlugins.LootAction.NoLoot; }
void uTankCallBack(int obj, uTank2.LootPlugins.LootAction result, bool getsuccess) { try { if (!getsuccess) return; for (int i = 0 ; i < itemsWaitingForCallback.Count ; i++) { ItemWaitingForCallback itemWaitingForCallback = itemsWaitingForCallback[i]; if (itemWaitingForCallback.ItemInfoIdentArgs.IdentifiedItem.Id == obj) { itemsWaitingForCallback.RemoveAt(i); itemWaitingForCallback.ItemInfoCallBack(itemWaitingForCallback.ItemInfoIdentArgs, !result.IsNoLoot, result.IsSalvage, result.RuleName); break; } } } catch (Exception ex) { Debug.LogException(ex); } }
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; }