### NPC ###### 添加NPC类 URL: /npc/class/ METHOD: POST URL Parameters|TYPE: JSON ``` { "name":"瑞哪", "intro":"队长的报表", "projectId":11, "npcClassAttrVos":[ { "name":"杀伤力", "value":"1000", }, { "name":"年龄", "value":"18" } ] } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"id":12}} ``` ###### 删除NPC分类 URL: /npc/class/{id}/ METHOD: DELETE URL Parameters|TYPE: Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 更新NPC分类 URL: /npc/class/{id}/ METHOD: PUT URL Parameters|TYPE: JSON ``` { "id": 12, "name": "瑞哪", "intro": "队长的报表", "projectId": 11, "npcClassAttrVos": [{ "id": 1, "name": "杀伤力", "value": "2000" }, { "id": 2, "name": "年龄", "value": "17" },{ "name":"身高", "value":"180" }] } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 查询NPC类 URL: /npc/class/{id}/ METHOD: GET URL Parameters|TYPE: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": { "id": 12, "name": "瑞哪", "intro": "队长的报表", "projectId": 11, "npcClassAttrVos": [{ "id": 1, "name": "杀伤力", "value": "1000" }, { "id": 2, "name": "年龄", "value": "18" }] } } ``` ###### 通过工程id查询所有NPC分类 URL: /npc/class/ METHOD: GET URL Parameters|TYPE:Param projectId Long 游戏工程id Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 7, "name": "商贩", "intro": "游走于大陆上的商人", "projectId": 11, "npcClassAttrVos": [] }, { "id": 10, "name": "飞机", "intro": "用来", "projectId": 11, "npcClassAttrVos": [] }, { "id": 13, "name": "瑞哪", "intro": "队长的报表", "projectId": 11, "npcClassAttrVos": [{ "id": 4, "name": "杀伤力", "value": "1000" }, { "id": 5, "name": "年龄", "value": "18" }] }] } ``` ###### 添加NPC instance URL: /npc/instance/ METHOD: POST URL Parameters|TYPE: JSON ``` { "name":"瑞哪", "intro":"队长的报表", "npcClassId":13, "placeId":12, "placeName":"中国", "npcInstanceAttrVos":[ { "npcClassAttrId":1, "name":"杀伤力", "value":"1000", }, { "npcClassAttrId":2, "name":"年龄", "value":"18" } ] } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"id":13}} ``` ###### 删除NPC URL: /npc/instance/{id}/ METHOD: DELETE URL Parameters|TYPE: Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ##### 改变NPC URL: /npc/instance/{id}/ METHOD: PUT URL Parameters|TYPE: JSON ``` { "id": 14, "name": "瑞哪", "intro": "队长的报表", "placeId": 12, "placeName": "深证", "npcInstanceAttrVos": [{ "id": 25, "name": "杀伤力", "value": "3000", "npcClassAttrId": 1 }, { "id": 26, "name": "年龄", "value": "17", "npcClassAttrId": 2 },{ "name": "体重", "value": "80", "npcClassAttrId": 2 }], "npcClassId": 13 } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 查询NPC instance URL: /npc/instance/{id}/ METHOD: GET URL Parameters|TYPE: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": { "id": 14, "name": "瑞哪", "intro": "队长的报表", "placeId": 12, "placeName": "中国", "npcInstanceAttrVos": [{ "id": 25, "name": "杀伤力", "value": "1000", "npcClassAttrId": 1 }, { "id": 26, "name": "年龄", "value": "18", "npcClassAttrId": 2 }], "npcClassId": 13 } } ``` ###### 通过分类查询所有NPC信息 URL: /npc/instance/ METHOD: GET URL Parameters|TYPE:Param npcClassId Long npc分类id Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 9, "name": "瑞哪", "intro": "队长的报表", "placeId": 12, "placeName": "中国", "npcInstanceAttrVos": [], "npcClassId": 13 }, { "id": 10, "name": "瑞哪", "intro": "队长的报表", "placeId": 12, "placeName": "中国", "npcInstanceAttrVos": [{ "id": 17, "name": "杀伤力", "value": "1000", "npcClassAttrId": 1 }, { "id": 18, "name": "年龄", "value": "18", "npcClassAttrId": 2 }], "npcClassId": 13 }, { "id": 11, "name": "瑞哪", "intro": "队长的报表", "placeId": 12, "placeName": "中国", "npcInstanceAttrVos": [{ "id": 19, "name": "杀伤力", "value": "1000", "npcClassAttrId": 1 }, { "id": 20, "name": "年龄", "value": "18", "npcClassAttrId": 2 }], "npcClassId": 13 }] } ``` ###### 搜索npc类 URL: /npc/class/search/ METHOD: POST URL Parameters|TYPE:Form Parameter | Type | Description | :----------- | :------: | ------------: | |projectId|Long|游戏工程id| |searchText|String|搜索的文本| content-type | application/x-www-form-urlencoded Result ``` { "code": 1, "msg": "成功", "data": [{ "id": 18, "name": "男性", "intro": "", "projectId": 35, "npcClassAttrVos": [{ "id": 10, "name": "", "value": "" }] }, { "id": 19, "name": "女性", "intro": "", "projectId": 35, "npcClassAttrVos": [{ "id": 11, "name": "", "value": "" }] }] } ``` ###### 搜索npc类 URL: /npc/class/search/ METHOD: POST URL Parameters|TYPE:Form Parameter | Type | Description | :----------- | :------: | ------------: | |projectId|Long|游戏工程id| |searchText|String|搜索的文本| content-type | application/x-www-form-urlencoded Result ``` { "code": 1, "msg": "成功", "data": [{ "id": 18, "name": "男性", "intro": "", "projectId": 35, "npcClassAttrVos": [{ "id": 10, "name": "", "value": "" }] }, { "id": 19, "name": "女性", "intro": "", "projectId": 35, "npcClassAttrVos": [{ "id": 11, "name": "", "value": "" }] }] } ``` ###### 搜索npc类 URL: /npc/instance/search/ METHOD: POST URL Parameters|TYPE:Form Parameter | Type | Description | :----------- | :------: | ------------: | |npcClassId|Long|npc类的id| |searchText|String|搜索的文本| content-type | application/x-www-form-urlencoded Result ``` { "code": 1, "msg": "成功", "data": [{ "id": 28, "name": "哈娜", "intro": "", "placeId": 45, "placeName": "", "npcInstanceAttrVos": [{ "id": 48, "name": "", "value": "", "npcClassAttrId": 16 }], "npcClassId": 21 }, { "id": 29, "name": "瑞娜", "intro": "", "placeId": 45, "placeName": "", "npcInstanceAttrVos": [{ "id": 49, "name": "", "value": "", "npcClassAttrId": 16 }], "npcClassId": 21 }] } ``` ###### 获得npc unknown text 数据 URL: /npc/instance/unknown_text/{projectId}/ METHOD: GET Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 32, "unknownText": "测试unknow text", "npcName": "瑞娜" }, { "id": 91, "unknownText": "测试unknow text", "npcName": "哈娜1" }, { "id": 33, "unknownText": "测试unknow text", "npcName": "上校" }, { "id": 92, "unknownText": "测试unknow text", "npcName": "玩家" }] } ``` ##### 改变NPC URL: /npc/instance/unknown_text/{projectId}/ METHOD: PUT URL Parameters|TYPE: JSON ``` [{ "id": 32, "unknownText": "测试unknow text", "npcName": "瑞娜" }, { "id": 91, "unknownText": "测试unknow text", "npcName": "哈娜1" }, { "id": 33, "unknownText": "测试unknow text", "npcName": "上校" }, { "id": 92, "unknownText": "测试unknow text", "npcName": "玩家" }] ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 通过分类查询所有NPC信息 URL: /instance_by_project_id/{projectId}/ METHOD: GET Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 32, "name": "瑞娜", "intro": "", "placeId": 35, "placeName": "山洞", "npcInstanceAttrVos": [{ "id": 53, "name": "友好度", "value": "100", "npcClassAttrId": 18 }, { "id": 54, "name": "专业度", "value": "90", "npcClassAttrId": 19 }, { "id": 116, "name": "友好度1", "value": "500", "npcClassAttrId": 71 }], "npcClassId": 23 }, { "id": 91, "name": "哈娜1", "intro": "", "placeId": 35, "placeName": "山洞", "npcInstanceAttrVos": [{ "id": 130, "name": "友好度", "value": "100", "npcClassAttrId": 18 }, { "id": 131, "name": "专业度", "value": "90", "npcClassAttrId": 19 }, { "id": 132, "name": "友好度1", "value": "500", "npcClassAttrId": 71 }], "npcClassId": 23 }, { "id": 33, "name": "上校", "intro": "", "placeId": 44, "placeName": "", "npcInstanceAttrVos": [{ "id": 55, "name": "离间度", "value": "90", "npcClassAttrId": 20 }], "npcClassId": 24 }, { "id": 92, "name": "玩家", "intro": "游戏的主角", "placeId": 35, "placeName": "山洞", "npcInstanceAttrVos": [{ "id": 133, "name": "地点", "value": "海边", "npcClassAttrId": 73 }], "npcClassId": 76 }, { "id": 282, "name": "旁白", "intro": "承担剧情、人物和地点的介绍!", "placeId": 0, "placeName": "地球", "npcInstanceAttrVos": [], "npcClassId": 259 }] } ```