skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Problem with m_flMagicalResistanceValue #40

Closed alankras closed 4 years ago

alankras commented 5 years ago

Hello,

I'm trying to get m_flMagicalResistanceValue from CDota_Unit and always see the default value=25.0

Could you please explain how to get updated values? (I use propertychange module)

spheenik commented 5 years ago

Did a quick check. The value simply is not updated in the replay, so it sets it to default and it stays there. I suppose the value is only the base resistance, and the server computes the actual resistance but does not propagate it to the client.

alankras commented 5 years ago

Thank you for your reply! If I open replay in the dota client, I can see the changes in magicResistance. And I don't understand that :(

vbashiri commented 4 years ago

I think client will calculate these kinds of things locally with considering your items, attributes, buff/debuff effects and so on. Movement speed and armor are the same. I'm not sure tho.