diff --git a/bin/json/game_global.json b/bin/json/game_global.json index e50cd7adb..2603442a8 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -560,6 +560,7 @@ "n": 1 }, "exemption_TemperatureCosNum": 50, + "smithy_MaxNpc": 2, "dispatch_freecheck": 1, "dispatch_checktime": 12, "dispatch_checkmoney": { diff --git a/bin/json/game_pandamasjs.json b/bin/json/game_pandamasjs.json index a18446144..71b225dc8 100644 --- a/bin/json/game_pandamasjs.json +++ b/bin/json/game_pandamasjs.json @@ -3,24 +3,24 @@ "id": 1, "unlock_condition": 20010, "unlock_conditiondes": { - "key": "完成任务“这是哪里”", - "text": "完成任务“这是哪里”" + "key": "完成任务“这是哪里”后解锁", + "text": "完成任务“这是哪里”后解锁" } }, { "id": 2, - "unlock_condition": 20011, + "unlock_condition": 20010, "unlock_conditiondes": { - "key": "通关主线1-2后解锁", - "text": "通关主线1-2后解锁" + "key": "完成任务“初来乍到”后解锁", + "text": "完成任务“初来乍到”后解锁" } }, { "id": 3, - "unlock_condition": 20012, + "unlock_condition": 20020, "unlock_conditiondes": { - "key": "通关主线1-3后解锁", - "text": "通关主线1-3后解锁" + "key": "完成任务“事件开端”后解锁", + "text": "完成任务“事件开端”后解锁" } } ] \ No newline at end of file diff --git a/bin/json/game_pandamastj.json b/bin/json/game_pandamastj.json index e6c57ecc6..923b0ffe6 100644 --- a/bin/json/game_pandamastj.json +++ b/bin/json/game_pandamastj.json @@ -7,11 +7,11 @@ "text": "Lv1木桩" }, "effect_text": { - "key": "wuguan_1", + "key": "xiaoguo_1", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_1", + "key": "tujian_1", "text": "图鉴信息描述" }, "icon": "wg_icon_mz01", @@ -25,11 +25,11 @@ "text": "Lv2木桩" }, "effect_text": { - "key": "wuguan_1", + "key": "xiaoguo_2", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_1", + "key": "tujian_2", "text": "图鉴信息描述" }, "icon": "wg_icon_mz03", @@ -43,11 +43,11 @@ "text": "Lv3木桩" }, "effect_text": { - "key": "wuguan_1", + "key": "xiaoguo_3", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_1", + "key": "tujian_3", "text": "图鉴信息描述" }, "icon": "wg_icon_mz02", @@ -61,11 +61,11 @@ "text": "Lv4木桩" }, "effect_text": { - "key": "wuguan_1", + "key": "xiaoguo_4", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_1", + "key": "tujian_4", "text": "图鉴信息描述" }, "icon": "wg_icon_mz04", @@ -79,11 +79,11 @@ "text": "Lv5木桩" }, "effect_text": { - "key": "wuguan_1", + "key": "xiaoguo_5", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_1", + "key": "tujian_5", "text": "图鉴信息描述" }, "icon": "wg_icon_mz05", @@ -97,11 +97,11 @@ "text": "食人鱼" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_6", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_6", "text": "图鉴信息描述" }, "icon": "ytx_js_13002", @@ -115,11 +115,11 @@ "text": "闪闪" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_7", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_7", "text": "图鉴信息描述" }, "icon": "ytx_js_13001", @@ -133,11 +133,11 @@ "text": "蛇先生" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_8", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_8", "text": "图鉴信息描述" }, "icon": "ytx_js_44002", @@ -151,11 +151,11 @@ "text": "金猴" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_9", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_9", "text": "图鉴信息描述" }, "icon": "ytx_js_24005", @@ -169,11 +169,11 @@ "text": "鹤大师" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_10", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_10", "text": "图鉴信息描述" }, "icon": "ytx_js_14005", @@ -187,11 +187,11 @@ "text": "悍娇虎" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_11", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_11", "text": "图鉴信息描述" }, "icon": "ytx_js_44006", @@ -205,11 +205,11 @@ "text": "盖" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_12", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_12", "text": "图鉴信息描述" }, "icon": "ytx_js_43001", @@ -223,11 +223,11 @@ "text": "希卡普" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_13", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_13", "text": "图鉴信息描述" }, "icon": "ytx_js_35002", @@ -241,11 +241,11 @@ "text": "穿靴猫" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_14", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_14", "text": "图鉴信息描述" }, "icon": "ytx_js_45004", @@ -259,11 +259,11 @@ "text": "师父" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_15", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_15", "text": "图鉴信息描述" }, "icon": "ytx_js_35001", @@ -277,11 +277,11 @@ "text": "阿宝" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_16", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_16", "text": "图鉴信息描述" }, "icon": "ytx_js_25001", @@ -295,11 +295,11 @@ "text": "乌龟大师" }, "effect_text": { - "key": "wuguan_2", + "key": "xiaoguo_17", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_2", + "key": "tujian_17", "text": "图鉴信息描述" }, "icon": "ytx_js_45001", @@ -313,11 +313,11 @@ "text": "石锁" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_18", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_18", "text": "图鉴信息描述" }, "icon": "wg_icon_ss", @@ -331,11 +331,11 @@ "text": "双头空竹" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_19", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_19", "text": "图鉴信息描述" }, "icon": "wg_icon_kz", @@ -349,11 +349,11 @@ "text": "木爬架" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_20", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_20", "text": "图鉴信息描述" }, "icon": "wg_icon_pj", @@ -367,11 +367,11 @@ "text": "不倒翁" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_21", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_21", "text": "图鉴信息描述" }, "icon": "wg_icon_bdw", @@ -385,11 +385,11 @@ "text": "棒槌" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_22", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_22", "text": "图鉴信息描述" }, "icon": "wg_icon_pc", @@ -403,11 +403,11 @@ "text": "铜铃" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_23", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_23", "text": "图鉴信息描述" }, "icon": "wg_icon_tl", @@ -421,11 +421,11 @@ "text": "尖刺吊环" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_24", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_24", "text": "图鉴信息描述" }, "icon": "wg_icon_dh", @@ -439,11 +439,11 @@ "text": "陀螺" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_25", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_25", "text": "图鉴信息描述" }, "icon": "wg_icon_tj01", @@ -457,11 +457,11 @@ "text": "大转轮" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_26", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_26", "text": "图鉴信息描述" }, "icon": "wg_icon_zl", @@ -475,11 +475,11 @@ "text": "木头牌" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_27", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_27", "text": "图鉴信息描述" }, "icon": "wg_icon_mp", @@ -493,11 +493,11 @@ "text": "双节棍" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_28", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_28", "text": "图鉴信息描述" }, "icon": "wg_icon_sjg", @@ -511,11 +511,11 @@ "text": "练功带" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_29", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_29", "text": "图鉴信息描述" }, "icon": "wg_icon_yd", @@ -529,11 +529,11 @@ "text": "七彩花棍" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_30", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_30", "text": "图鉴信息描述" }, "icon": "wg_icon_hl", @@ -547,11 +547,11 @@ "text": "流星飞镖" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_31", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_31", "text": "图鉴信息描述" }, "icon": "wg_icon_fb", @@ -565,11 +565,11 @@ "text": "冥想锣" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_32", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_32", "text": "图鉴信息描述" }, "icon": "wg_icon_mxl", @@ -583,11 +583,11 @@ "text": "彩条龙" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_33", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_33", "text": "图鉴信息描述" }, "icon": "wg_icon_ct", @@ -601,11 +601,11 @@ "text": "孔雀毛扇" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_34", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_34", "text": "图鉴信息描述" }, "icon": "wg_icon_kqms", @@ -619,11 +619,11 @@ "text": "平衡木" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_35", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_35", "text": "图鉴信息描述" }, "icon": "wg_icon_ph", @@ -637,11 +637,11 @@ "text": "铁环" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_36", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_36", "text": "图鉴信息描述" }, "icon": "wg_icon_th", @@ -655,11 +655,11 @@ "text": "太极球" }, "effect_text": { - "key": "wuguan_3", + "key": "xiaoguo_37", "text": "道具效果描述" }, "content_text": { - "key": "wuguan_3", + "key": "tujian_37", "text": "图鉴信息描述" }, "icon": "wg_icon_tj", diff --git a/bin/json/game_worldbattle.json b/bin/json/game_worldbattle.json index 3f87b44c3..517192d14 100644 --- a/bin/json/game_worldbattle.json +++ b/bin/json/game_worldbattle.json @@ -15,7 +15,7 @@ { "id": 102, "FormatList": [ - 700012 + 700011 ], "BattleReadyID": 100, "EventList": [], diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 9ef3f3813..4d976582e 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -12,8 +12,8 @@ "text": "1" }, "task_name": { - "key": "story_80", - "text": "1" + "key": "Mainline_Tasks_1", + "text": "初来乍到" }, "task_display": { "key": "story_80", @@ -32,7 +32,9 @@ "n": 100 } ], - "module": [] + "module": [ + "practice" + ] }, { "key": 20020, @@ -47,8 +49,8 @@ "text": "1" }, "task_name": { - "key": "story_80", - "text": "1" + "key": "Mainline_Tasks_2", + "text": "不测风云" }, "task_display": { "key": "story_80", @@ -67,7 +69,9 @@ "n": 101 } ], - "module": [] + "module": [ + "practice" + ] }, { "key": 20030, @@ -82,8 +86,8 @@ "text": "1" }, "task_name": { - "key": "story_80", - "text": "1" + "key": "Mainline_Tasks_3", + "text": "雨过天晴" }, "task_display": { "key": "story_80", @@ -318,7 +322,7 @@ "key": 20100, "lock": 1, "ontxe": 20090, - "id_after": 0, + "id_after": 30010, "group": 2, "des": 2, "icon": "", @@ -348,5 +352,275 @@ } ], "module": [] + }, + { + "key": 30010, + "lock": 1, + "ontxe": 20010, + "id_after": 0, + "group": 3, + "des": 3, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 70010, + "completetask": [ + 0 + ], + "deliver_npc": 0, + "auto_accept": 0, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 110 + } + ], + "module": [] + }, + { + "key": 40010, + "lock": 1, + "ontxe": 20020, + "id_after": 0, + "group": 4, + "des": 3, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [], + "deliver_npc": 0, + "auto_accept": 0, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 111 + } + ], + "module": [] + }, + { + "key": 50010, + "lock": 1, + "ontxe": 20030, + "id_after": 0, + "group": 5, + "des": 3, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [], + "deliver_npc": 0, + "auto_accept": 0, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 112 + } + ], + "module": [] + }, + { + "key": 60010, + "lock": 1, + "ontxe": 20040, + "id_after": 0, + "group": 6, + "des": 3, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [], + "deliver_npc": 0, + "auto_accept": 0, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 113 + } + ], + "module": [] + }, + { + "key": 70010, + "lock": 1, + "ontxe": 20050, + "id_after": 0, + "group": 7, + "des": 3, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [], + "deliver_npc": 0, + "auto_accept": 0, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 114 + } + ], + "module": [] + }, + { + "key": 80010, + "lock": 1, + "ontxe": 20060, + "id_after": 0, + "group": 8, + "des": 3, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [], + "deliver_npc": 0, + "auto_accept": 0, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 115 + } + ], + "module": [] + }, + { + "key": 400010, + "lock": 1, + "ontxe": 20050, + "id_after": 0, + "group": 100, + "des": 1, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [ + 114 + ], + "deliver_npc": 0, + "auto_accept": 1, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 999 + } + ], + "module": [] + }, + { + "key": 500010, + "lock": 1, + "ontxe": 20050, + "id_after": 0, + "group": 200, + "des": 4, + "icon": "", + "task_Tname": { + "key": "story_80", + "text": "1" + }, + "task_name": { + "key": "story_80", + "text": "1" + }, + "task_display": { + "key": "story_80", + "text": "1" + }, + "npc": 0, + "completetask": [ + 306 + ], + "deliver_npc": 0, + "auto_accept": 1, + "reword": [ + { + "a": "item", + "t": "110001", + "n": 888 + } + ], + "module": [] } ] \ No newline at end of file diff --git a/modules/dispatch/model_dispatch.go b/modules/dispatch/model_dispatch.go index 4302cc861..cb9abd112 100644 --- a/modules/dispatch/model_dispatch.go +++ b/modules/dispatch/model_dispatch.go @@ -122,7 +122,7 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task if n == 0 { //随机任务 - tasks = this.randomTask(dispatch, NOTICE_NUM) + tasks = this.randomTask(dispatch, noticeNum) } else { var randCount int for i := 0; i < len(dispatch.Nb.Tasks); i++ { @@ -399,8 +399,8 @@ func (this *modelDispatch) updateNotice(uid string, dispatch *pb.DBDispatch) err //刷新任务 count := len(dispatch.Nb.Tasks) - if count < NOTICE_NUM { - randCount = NOTICE_NUM - count + if count < noticeNum { + randCount = noticeNum - count dispatch.Nb.Tasks = append(dispatch.Nb.Tasks, this.addRandomTask(dispatch, randCount)...) } diff --git a/modules/dispatch/module.go b/modules/dispatch/module.go index 6469e9aac..c3bbbe703 100644 --- a/modules/dispatch/module.go +++ b/modules/dispatch/module.go @@ -7,7 +7,7 @@ import ( ) // 默认6条公告数量 -const NOTICE_NUM int = 6 +const noticeNum int = 6 // 派遣 type Dispatch struct { diff --git a/modules/equipment/module.go b/modules/equipment/module.go index 0bbed1fd2..f2545feee 100644 --- a/modules/equipment/module.go +++ b/modules/equipment/module.go @@ -4,7 +4,6 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/event" - "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" @@ -69,10 +68,7 @@ func (this *Equipment) OnInstallComp() { //Event------------------------------------------------------------------------------------------------------------ func (this *Equipment) EventUserOffline(uid, sessionid string) { - if err := this.modelEquipment.BatchDelLists(uid); err != nil { - this.Error("EventUserOffline", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()}) - } - + this.modelEquipment.BatchDelLists(uid) } //IEquipment------------------------------------------------------------------------------------------------------------------------------- diff --git a/modules/modulebase.go b/modules/modulebase.go index 45f1e3441..1d7b62cf7 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -311,14 +311,14 @@ func (this *ModuleBase) CheckRes(session comm.IUserSession, res []*cfg.Gameatn) for k, v := range attrs { if this.ModuleUser.QueryAttributeValue(session.GetUserId(), k) < int64(v) { code = pb.ErrorCode_ResNoEnough - this.Warnf("资源不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) + this.Warn("资源不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) return } } for k, v := range items { //校验消费资源是否充足 if int32(this.ModuleItems.QueryItemAmount(session.GetUserId(), k)) < v { code = pb.ErrorCode_ResNoEnough - this.Warnf("道具不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) + this.Warn("道具不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) return } } @@ -350,14 +350,14 @@ func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Gameatn for k, v := range attrs { if this.ModuleUser.QueryAttributeValue(session.GetUserId(), k) < -int64(v) { // -v 负负得正 code = pb.ErrorCode_ResNoEnough - this.Warnf("资源不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) + this.Warn("资源不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) return } } for k, v := range items { if int32(this.ModuleItems.QueryItemAmount(session.GetUserId(), k)) < -v { code = pb.ErrorCode_ResNoEnough - this.Warnf("道具不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) + this.Warn("道具不足", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "T", Value: k}, log.Field{Key: "N", Value: v}) return } } diff --git a/modules/practice/api_practice.go b/modules/practice/api_practice.go index 8fbb444b2..ce970cffd 100644 --- a/modules/practice/api_practice.go +++ b/modules/practice/api_practice.go @@ -60,9 +60,7 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic code = pb.ErrorCode_ConfigNoFound return } - if code = this.module.ModuleHero.KungFuHero(session, req.Hero, true, ""); code != pb.ErrorCode_Success { - return - } + if req.Teacher != "" { if room.Knapsack[req.Teacher] == 1 { //已经被使用 code = pb.ErrorCode_ReqParameterError @@ -90,7 +88,9 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic pillar.Prop = req.Prop } pillar.Hero = req.Hero - + if code = this.module.ModuleHero.KungFuHero(session, req.Hero, true, ""); code != pb.ErrorCode_Success { + return + } pillar.Start = configure.Now().Unix() if extra >= 0 { pillar.End = configure.Now().Add(time.Minute * (time.Duration(pillarconfigure.PlacementDuration))).Unix() diff --git a/modules/practice/api_upgrade.go b/modules/practice/api_upgrade.go index ab9ce6862..854c2640a 100644 --- a/modules/practice/api_upgrade.go +++ b/modules/practice/api_upgrade.go @@ -49,10 +49,11 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.PracticeUpgradeR code = pb.ErrorCode_ReqParameterError return } - if pillarconfigure, err = this.module.configure.getGamePandamasMz(pillar.Lv); err != nil { - code = pb.ErrorCode_ConfigNoFound + if pillarconfigure, err = this.module.configure.getGamePandamasMz(pillar.Lv); err != nil || len(pillarconfigure.UpLvConsume) == 0 { + code = pb.ErrorCode_PracticePillarMaxLv return } + if code = this.module.ConsumeRes(session, pillarconfigure.UpLvConsume, true); code != pb.ErrorCode_Success { return } @@ -62,16 +63,16 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.PracticeUpgradeR } switch pillar.Lv { case 2: - this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "1002") + this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100002") break case 3: - this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "1003") + this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100003") break case 4: - this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "1004") + this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100004") break case 5: - this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "1005") + this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100005") break } this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{ diff --git a/modules/practice/modelPandata.go b/modules/practice/modelPandata.go index 62267d837..71166eff6 100644 --- a/modules/practice/modelPandata.go +++ b/modules/practice/modelPandata.go @@ -59,7 +59,7 @@ func (this *modelPandata) queryUserMartialhall(uid string) (result *pb.DBPractic this.module.Errorln(err) return } - this.module.atlas.CheckActivatePandaAtlasCollect(uid, "1002") + this.module.atlas.CheckActivatePandaAtlasCollect(uid, "100001") } err = nil return diff --git a/modules/practice/module.go b/modules/practice/module.go index 8b765c1df..1d0dc5fb7 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -142,7 +142,7 @@ func (this *Practice) AddItems(session comm.IUserSession, items map[string]int32 this.Errorln(err) return } - this.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "1002") + this.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100001") } else { id = make([]string, 0) for k, _ := range items { diff --git a/modules/smithy/api_getCustomer.go b/modules/smithy/api_getCustomer.go index 85ac7508e..69c844f4e 100644 --- a/modules/smithy/api_getCustomer.go +++ b/modules/smithy/api_getCustomer.go @@ -9,14 +9,16 @@ import ( "google.golang.org/protobuf/proto" ) -// 3个顾客 -var customerCount int32 = 3 - func (this *apiComp) CustomerCheck(session comm.IUserSession, req *pb.SmithyCustomerReq) (code pb.ErrorCode) { return } func (this *apiComp) Customer(session comm.IUserSession, req *pb.SmithyCustomerReq) (code pb.ErrorCode, data proto.Message) { + customerCount := this.module.configure.GetGlobalConf().SmithyMaxNpc + if customerCount <= 0 { + code = pb.ErrorCode_ConfigNoFound + return + } cus, err := this.module.modelTrade.getDBCustomer(session.GetUserId()) if err != nil { if err == mongo.ErrNoDocuments { diff --git a/modules/worldtask/api_finish.go b/modules/worldtask/api_finish.go index 5772a883c..ff9900e83 100644 --- a/modules/worldtask/api_finish.go +++ b/modules/worldtask/api_finish.go @@ -103,23 +103,25 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe if mc := iwt.CheckCondi(uid, condiId); mc != pb.ErrorCode_Success { this.module.Debug("任务完成条件不满足", log.Field{Key: "uid", Value: uid}, - log.Field{Key: "taskId", Value: req.TaskId}, + log.Field{Key: "taskId", Value: nextTaskId}, log.Field{Key: "condiId", Value: condiId}, ) rsp.CondiId = condiId - rsp.TaskId = req.TaskId + rsp.TaskId = nextTaskId } else { - _, ok := userTask.CurrentTask[nextTaskConf.Group] + nwt, ok := userTask.CurrentTask[nextTaskConf.Group] if ok { - userTask.CurrentTask[nextTaskConf.Group].CondiIds = append(userTask.CurrentTask[req.GroupId].CondiIds, condiId) + nwt.CondiIds = append(nwt.CondiIds, condiId) } else { condiIds := []int32{condiId} - userTask.CurrentTask[nextTaskConf.Group].CondiIds = condiIds + nwt = &pb.Worldtask{ + TaskId: nextTaskId, + TaskType: nextTaskConf.Des, + CondiIds: condiIds, + } } + userTask.CurrentTask[nextTaskConf.Group] = nwt } - - userTask.CurrentTask[nextTaskConf.Group].TaskId = nextTaskId - userTask.CurrentTask[nextTaskConf.Group].TaskType = nextTaskConf.Des } } } diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index 267b92c9a..2d1e64a25 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -64,7 +64,7 @@ func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId in return err } - var groupId int32 + var groupId, taskId int32 // 检索condId是否是世界任务的完成条件 finishedTaskIds := make(map[int32]int32) //达成的任务条件 for _, c := range this.worldtaskConf.GetDataList() { @@ -72,6 +72,7 @@ func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId in if v == condId { finishedTaskIds[c.Group] = c.Key groupId = c.Group + taskId = c.Key break } } @@ -101,14 +102,12 @@ func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId in } this.modelWorldtask.Change(uid, update) - for k, v := range userTask.CurrentTask { - session.SendMsg(string(this.GetType()), "completecondis", &pb.WorldtaskCompletecondisPush{ - GroupId: k, - TaskId: v.TaskId, - CondiIds: wt.CondiIds, - }) - this.Debug("推送完成条件", log.Field{Key: "condiIds", Value: v.TaskId}) - } + session.SendMsg(string(this.GetType()), "completecondis", &pb.WorldtaskCompletecondisPush{ + GroupId: groupId, + TaskId: taskId, + CondiIds: wt.CondiIds, + }) + this.Debug("推送完成条件", log.Field{Key: "condiIds", Value: taskId}) return nil } diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 4a54a1ffe..2487e459a 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -340,7 +340,6 @@ const ( ErrorCode_SmithyNoActivateAtlas ErrorCode = 4113 // 没有图鉴更新数据 ErrorCode_SmithyLvToolsFailed ErrorCode = 4114 // ErrorCode_SmithyLvToolsPre ErrorCode = 4115 // 前置条件不足 - ErrorCode_SmithyAtlasTypeErr ErrorCode = 4116 //图鉴类型错误 // dispatch ErrorCode_DispatchHeroNoReached ErrorCode = 4201 //英雄条件未达标 ErrorCode_DispatchNoFree ErrorCode = 4202 //免费次数用尽 @@ -354,6 +353,7 @@ const ( ErrorCode_PracticeQiecuoing ErrorCode = 4301 //武馆切磋中 ErrorCode_PracticeSent ErrorCode = 4302 //邀请已发送 10秒内请勿重复邀请 ErrorCode_PracticeInviteTimeOut ErrorCode = 4303 //邀请超时 + ErrorCode_PracticePillarMaxLv ErrorCode = 4304 //木桩已到满级 ) // Enum value maps for ErrorCode. @@ -644,7 +644,6 @@ var ( 4113: "SmithyNoActivateAtlas", 4114: "SmithyLvToolsFailed", 4115: "SmithyLvToolsPre", - 4116: "SmithyAtlasTypeErr", 4201: "DispatchHeroNoReached", 4202: "DispatchNoFree", 4203: "DispatchTicketNoEnough", @@ -656,6 +655,7 @@ var ( 4301: "PracticeQiecuoing", 4302: "PracticeSent", 4303: "PracticeInviteTimeOut", + 4304: "PracticePillarMaxLv", } ErrorCode_value = map[string]int32{ "Success": 0, @@ -943,7 +943,6 @@ var ( "SmithyNoActivateAtlas": 4113, "SmithyLvToolsFailed": 4114, "SmithyLvToolsPre": 4115, - "SmithyAtlasTypeErr": 4116, "DispatchHeroNoReached": 4201, "DispatchNoFree": 4202, "DispatchTicketNoEnough": 4203, @@ -955,6 +954,7 @@ var ( "PracticeQiecuoing": 4301, "PracticeSent": 4302, "PracticeInviteTimeOut": 4303, + "PracticePillarMaxLv": 4304, } ) @@ -989,7 +989,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0xfe, 0x35, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xff, 0x35, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, @@ -1402,27 +1402,27 @@ var file_errorcode_proto_rawDesc = []byte{ 0x20, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4c, 0x76, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x92, 0x20, 0x12, 0x15, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4c, 0x76, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x50, 0x72, 0x65, 0x10, - 0x93, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x41, 0x74, 0x6c, 0x61, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0x94, 0x20, 0x12, 0x1a, 0x0a, 0x15, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x61, - 0x63, 0x68, 0x65, 0x64, 0x10, 0xe9, 0x20, 0x12, 0x13, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x4e, 0x6f, 0x46, 0x72, 0x65, 0x65, 0x10, 0xea, 0x20, 0x12, 0x1b, 0x0a, 0x16, - 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, - 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xeb, 0x20, 0x12, 0x19, 0x0a, 0x14, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x10, 0xec, 0x20, 0x12, 0x18, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0xed, 0x20, 0x12, 0x17, - 0x0a, 0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x4d, 0x61, 0x78, 0x10, 0xee, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xef, 0x20, + 0x93, 0x20, 0x12, 0x1a, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, + 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xe9, 0x20, 0x12, 0x13, + 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x6f, 0x46, 0x72, 0x65, 0x65, + 0x10, 0xea, 0x20, 0x12, 0x1b, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xeb, 0x20, 0x12, 0x19, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x72, 0x6f, - 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf0, 0x20, 0x12, 0x16, 0x0a, 0x11, 0x50, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x69, 0x6e, 0x67, - 0x10, 0xcd, 0x21, 0x12, 0x11, 0x0a, 0x0c, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x53, - 0x65, 0x6e, 0x74, 0x10, 0xce, 0x21, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x63, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x10, - 0xcf, 0x21, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x10, 0xec, 0x20, 0x12, 0x18, 0x0a, 0x13, 0x44, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x10, 0xed, 0x20, 0x12, 0x17, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4d, 0x61, 0x78, 0x10, 0xee, 0x20, 0x12, 0x17, + 0x0a, 0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x10, 0xef, 0x20, 0x12, 0x19, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, + 0xf0, 0x20, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, 0x69, + 0x65, 0x63, 0x75, 0x6f, 0x69, 0x6e, 0x67, 0x10, 0xcd, 0x21, 0x12, 0x11, 0x0a, 0x0c, 0x50, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x10, 0xce, 0x21, 0x12, 0x1a, 0x0a, + 0x15, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x10, 0xcf, 0x21, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x4d, 0x61, 0x78, 0x4c, 0x76, + 0x10, 0xd0, 0x21, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 0774b639b..ba43fd963 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -180,6 +180,7 @@ type GameGlobalData struct { RaiseTemperatureNum int32 ExemptionTemperatureCos *Gameatn ExemptionTemperatureCosNum int32 + SmithyMaxNpc int32 DispatchFreecheck int32 DispatchChecktime int32 DispatchCheckmoney *Gameatn @@ -779,6 +780,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["raise_temperatureNum"].(float64); !_ok_ { err = errors.New("raise_temperatureNum error"); return }; _v.RaiseTemperatureNum = int32(_tempNum_) } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["exemption_TemperatureCos"].(map[string]interface{}); !_ok_ { err = errors.New("exemption_TemperatureCos error"); return }; if _v.ExemptionTemperatureCos, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["exemption_TemperatureCosNum"].(float64); !_ok_ { err = errors.New("exemption_TemperatureCosNum error"); return }; _v.ExemptionTemperatureCosNum = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["smithy_MaxNpc"].(float64); !_ok_ { err = errors.New("smithy_MaxNpc error"); return }; _v.SmithyMaxNpc = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dispatch_freecheck"].(float64); !_ok_ { err = errors.New("dispatch_freecheck error"); return }; _v.DispatchFreecheck = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dispatch_checktime"].(float64); !_ok_ { err = errors.New("dispatch_checktime error"); return }; _v.DispatchChecktime = int32(_tempNum_) } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["dispatch_checkmoney"].(map[string]interface{}); !_ok_ { err = errors.New("dispatch_checkmoney error"); return }; if _v.DispatchCheckmoney, err = DeserializeGameatn(_x_); err != nil { return } }