OnAttributeReachedDestinationValue not being invoked

Hi all,

So I came across a bug that was preventing the OnAttributeReachedDestinationValue event from being invoked. In the UpdateValue() method of the AttributeManager class, the class is being passed instead of the GameObject:

Code:
EventHandler.ExecuteEvent(this, "OnAttributeReachedDestinationValue");

So I changed it to this:

Code:
EventHandler.ExecuteEvent(m_GameObject, "OnAttributeReachedDestinationValue");

This seems to have fixed the problem.
 
The original code is correct. When you register for the event you'll want to register on the Attribute rather than GameObject. This will allow you to know what attribute is updating rather than with the GameObject version that does not include the actual Attribute updated.
 
The original code is correct. When you register for the event you'll want to register on the Attribute rather than GameObject. This will allow you to know what attribute is updating rather than with the GameObject version that does not include the actual Attribute updated.
Oh I see...
Because I was wondering how I would know which attribute reached its destination value without manually checking. So when I register the event, instead of passing the player GameObject as the first argument, I pass the attribute instead?
 
Top