pixeltris / YgoMaster

Offline Yu-Gi-Oh! Master Duel
MIT License
770 stars 112 forks source link

Fix unlock_secret type to `List<object>` #410

Closed niceandneat closed 1 month ago

niceandneat commented 1 month ago

If the unlock_secret field type of chapter is an array like below, the Object must implement IConvertible. error occurs when Convert.ChangeType() is called.

{ "unlock_secret": [9001, 9002] }

I modified a type for type checking to make the array value pass the if (unlockSecretObj is List<object>) test.

tearight commented 1 month ago

In the existing code, unlockSecretObj is an object type when it is a single input, so it seems to be List(object) when it is multiple inputs.

pixeltris commented 1 month ago

Thanks