Stratz GraphQL API查询Dota2终极技能时isUltimate字段返回false且cooldown为null的问题咨询
Stratz GraphQL API查询Dota2终极技能时isUltimate字段返回false且cooldown为null的问题咨询
各位好,我最近在用Stratz的GraphQL API获取Dota2的技能常量数据时,遇到了一个特别困惑的问题。
比如我查询敌法师的大招Mana Void(技能ID 5006,对应内部名称antimage_mana_void),按照游戏内的设定,这毫无疑问是终极技能,而且明确有冷却时间,但API返回的结果里,isUltimate字段居然是false,cooldown字段直接返回了null,这和实际游戏情况完全不符。
以下是我使用的GraphQL查询语句:
query GetAbility { constants { ability(id: 5006) { id name language { displayName } stat { behavior dispellable isUltimate isInnate isGrantedByScepter isGrantedByShard hasScepterUpgrade hasShardUpgrade cooldown manaCost castRange castPoint channelTime duration charges chargeRestoreTime } } } }
对应的API返回结果:
{ "data": { "constants": { "ability": { "id": 5006, "name": "antimage_mana_void", "language": { "displayName": "Mana Void" }, "stat": { "behavior": 40, "dispellable": "NONE", "isUltimate": false, "isInnate": false, "isGrantedByScepter": false, "isGrantedByShard": false, "hasScepterUpgrade": false, "hasShardUpgrade": false, "cooldown": null, "manaCost": [ 100, 150, 200 ], "castRange": [ 600 ], "castPoint": [ 0.30000001192092896, 0.30000001192092896, 0.30000001192092896, 0.30000001192092896 ], "channelTime": null, "duration": "", "charges": "", "chargeRestoreTime": "" } } } } }
我反复核对了技能ID和查询字段,确认没有输入错误。想请教下有没有用过Stratz API的朋友遇到过类似问题?是我误解了isUltimate字段的定义,还是API本身的字段逻辑有特殊规则?有没有办法正确获取到终极技能的标记和对应的冷却时间数据呢?
麻烦大家帮忙解答,非常感谢!




