pixeltris / YgoMaster

Offline Yu-Gi-Oh! Master Duel
MIT License
881 stars 126 forks source link

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

Closed niceandneat closed 5 months ago

niceandneat commented 5 months 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 5 months 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 5 months ago

Thanks