From 5f79123811e6b898eddb07db626b7d7eac3ae011 Mon Sep 17 00:00:00 2001 From: liwei Date: Thu, 2 Mar 2023 18:50:30 +0800 Subject: [PATCH] Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev --- bin/json/game_mail.json | 20 ++++++++++++++++++++ modules/hero/configure_comp.go | 2 +- modules/hero/model_hero.go | 8 +++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/bin/json/game_mail.json b/bin/json/game_mail.json index ec4f70e0a..0f592e57a 100644 --- a/bin/json/game_mail.json +++ b/bin/json/game_mail.json @@ -178,5 +178,25 @@ "text": "商会管理员" }, "duration": 720 + }, + { + "id": "Drivethemail", + "title": { + "key": "MailTitle_Drivethemail", + "text": "好友木桩驱赶邮件" + }, + "recipient": { + "key": "MailRecipient_Drivethemail", + "text": "亲爱的玩家:" + }, + "content": { + "key": "MailContent_Drivethemail", + "text": "好友已将您的英雄遣送返回,特此告知" + }, + "sender": { + "key": "MailSender_Drivethemail", + "text": "系统" + }, + "duration": 720 } ] \ No newline at end of file diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index e29b9a1d1..666d19c98 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -84,7 +84,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp return } } else { - err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) + err = fmt.Errorf("%T no is *cfg.GameHeroAwaken", v) } }) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index b9570026e..a34d7d93d 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -817,12 +817,14 @@ func (this *ModelHero) createHero(session comm.IUserSession, heroCfgId string, c return } if this.moduleHero.IsCross() { - if dbModel, err := this.moduleHero.GetDBModuleByUid(uid, this.TableName, this.Expired); err != nil { - this.moduleHero.Errorln(err) - } else { + if dbModel, err1 := this.moduleHero.GetDBModuleByUid(uid, this.TableName, this.Expired); err1 == nil { if err = dbModel.GetList(uid, &heros); err != nil { this.moduleHero.Errorf("err:%v", err) + return } + } else { + this.moduleHero.Errorln(err) // 获取跨服对象失败 + return } } else { if err = this.GetList(uid, &heros); err != nil {