* Initial plan * Add SerializableFieldDefault attributes for LeftSeeds and LeftResources This fixes the serialization bug where _leftSeeds and _leftResources were initialized to 8 in the constructor but didn't serialize when their value was 0. Upon deserialization, the constructor would run again and reset these values back to 8. The SerializableFieldDefault attributes tell the serialization system that the default value is 8, so it will properly serialize 0 values and maintain the correct state across server restarts. Co-authored-by: kamronbatman <3953314+kamronbatman@users.noreply.github.com> * Update ShouldSerialize methods to check against default value Changed ShouldSerializeLeftSeeds() and ShouldSerializeLeftResources() to check if the value is != 8 (the default) instead of != 0. This ensures that only non-default values are serialized, following the same pattern used in BaseWeapon.cs and other classes with SerializableFieldDefault attributes. Co-authored-by: kamronbatman <3953314+kamronbatman@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kamronbatman <3953314+kamronbatman@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| Application | ||
| Logger | ||
| Server | ||
| Server.Tests | ||
| UOContent | ||
| UOContent.Tests | ||