It seems like today's update may have broken or changed something with inventory manager. Before today, my code for using buff and poison potions worked just fine, but now it throws a ton of errors when loading the routine.
I've attached a log, and here's what the method actually looks like:
Which is called by:
If I take out the actual calls, the errors are not there anymore and the combat routine loads and works fine, but I think it's weird that it worked perfectly until today's update. Any assistance would be appreciated. Thanks.
I've attached a log, and here's what the method actually looks like:
Code:
public Composite UsePotion(string PotName, GameObject onTarget)
{
var pot = InventoryManager.FilledSlots.FirstOrDefault(a => a.Name.Equals(PotName) && a.IsHighQuality);
if(onTarget == Core.Me)
{
return new Decorator(r => pot != null && pot.IsValid && pot.CanUse(onTarget) && settings.UseBuffPotions && ((settings.UseOpenerPotion && Opener) || !settings.UseOpenerPotion), new Action(r => {
pot.UseItem(onTarget);
}));
}
else
{
return new Decorator(r => pot != null && pot.IsValid && pot.CanUse(onTarget) && settings.UsePoisonPotions, new Action(r => {
pot.UseItem(onTarget);
}));
}
}
Code:
UsePotion("X-Potion of Dexterity", Core.Me)
and
UsePotion("Potent Poisoning Potion", Core.Me.CurrentTarget)
If I take out the actual calls, the errors are not there anymore and the combat routine loads and works fine, but I think it's weird that it worked perfectly until today's update. Any assistance would be appreciated. Thanks.
Attachments
Last edited: