Created
January 25, 2016 13:17
-
-
Save pushedx/bdbe72ff2ffc90f2d37d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_taskManager.Add(new SellTask(NeedsToSell, SellingComplete, ShouldAcceptSellOffer, ShouldSellItem)); | |
private bool ShouldSellItem(Item item, object user) | |
{ | |
IItemFilter filter; | |
if (!ItemEvaluator.Match(item, EvaluationType.Save, out filter)) | |
{ | |
if (ItemEvaluator.Match(item, EvaluationType.Sell, out filter)) | |
{ | |
return true; | |
} | |
else | |
{ | |
} | |
} | |
else | |
{ | |
} | |
return false; | |
} | |
private bool NeedsToSell() | |
{ | |
if ( | |
LokiPoe.InGameState.InventoryPanel.Main.Where(i => i.Rarity != Rarity.Quest) | |
.Any(i => ShouldSellItem(i, null))) | |
{ | |
return true; | |
} | |
return false; | |
} | |
private bool ShouldAcceptSellOffer() | |
{ | |
Log.DebugFormat("[ShouldAcceptSellOffer] The npc is offering us:"); | |
foreach (var item in LokiPoe.InGameState.SellPanel.NpcOffer) | |
{ | |
Log.DebugFormat(" {1}x {0}", item.FullName, item.StackCount); | |
} | |
return true; | |
} | |
private void SellingComplete() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment