Bug with Currency in Ultimate Inventory System

Announcements, support questions, and discussion for Quest Machine.
Post Reply
claudius_I
Posts: 33
Joined: Tue Aug 08, 2017 4:06 pm

Bug with Currency in Ultimate Inventory System

Post 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
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug with Currency in Ultimate Inventory System

Post 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.
Post Reply