Page 1 of 1

Bug with Currency in Ultimate Inventory System

Posted: Mon Sep 02, 2024 8:04 pm
by claudius_I
Hello Tony,

I’m always asking questions, so this time I wanted to contribute my bit. I found a bug where the concurrency is not counted when it's a condition to fulfill a mission node. I was looking into the code of UISCurrencyAmountQuestCondition.cs and found that m_currencyOwner was not assigned a value, so I made the change:


m_currencyOwner = UISUtility.GetCurrencyOwner(StringField.GetStringValue(currencyOwnerName));
This fixed one error, but it still wasn't updating in real time. The event was not properly defined:

Original:
Opsive.Shared.Events.EventHandler.RegisterEvent(EventNames.c_CurrencyCollection_OnUpdate, OnCurrencyChange);


Corrected:
Opsive.Shared.Events.EventHandler.RegisterEvent(m_currencyOwner, EventNames.c_CurrencyOwner_OnUpdate, OnCurrencyChange);


Best regards,
Claudio

Re: Bug with Currency in Ultimate Inventory System

Posted: Mon Sep 02, 2024 8:16 pm
by Tony Li
Hi Claudio,

Thank you! I'll make and test these changes, and then I'll send them off to Opsive to put on their download site.