Rickedb / OpenProtocolInterpreter

Converts the ugly ASCII package that came from Open Protocol to an object
MIT License
152 stars 71 forks source link

Mid0061 TighteningErrorStatus.Get doesn't return what has been Set #55

Closed IngeRuppio closed 3 years ago

IngeRuppio commented 3 years ago

I run into a problem, initializing TighteningErrorStatus in Mid0061:

this code doesn't work:

mid0061.TighteningErrorStatus = new TighteningErrorStatus();
mid0061.TighteningErrorStatus.Rehit = true;

this works:

TighteningErrorStatus tes = new TighteningErrorStatus();
tes.Rehit = true;
mid0061.TighteningErrorStatus = tes;

The property TighteningErrorStatus doesn't return on Get() what has been set with Set(). I do not know yet, if this is a local problem with TighteningErrorStatus or if other properties (in other Mids) are affected as well.

Rickedb commented 3 years ago

This is happening due to Get/Set, since you're just modifying a property, this does not trigger the Set, which when is triggered it sets the raw value inside of DataField base class.

Going to find a better approach for these cases, probably will switch to the same way we are handling Lists nowadays. And yes, this affects other Mids.