This commit is contained in:
meixiongfeng 2024-02-04 11:54:49 +08:00
commit 5736a249c1
10 changed files with 1628 additions and 2748 deletions

File diff suppressed because it is too large Load Diff

View File

@ -515,27 +515,5 @@
},
"reword": [],
"duration": 720
},
{
"id": "PlunderRankingReward",
"title": {
"key": "mail_mail_title_24",
"text": "海岛排行奖励"
},
"postmark": "yj_icon_yc_mfjl",
"recipient": {
"key": "mail_mail_recipient_24",
"text": "亲爱的玩家:"
},
"content": {
"key": "mail_mail_content_8",
"text": "获得第{0}名,奖励请查收。"
},
"sender": {
"key": "mail_mail_sender_24",
"text": "系统"
},
"reword": [],
"duration": 720
}
]

View File

@ -6,7 +6,7 @@
"text": "驯龙篇--第一幕"
},
"name": {
"key": "A",
"key": "tipstxt_tipstxt_main_name_01",
"text": "拯救希卡普"
},
"txt": {

File diff suppressed because it is too large Load Diff

View File

@ -64,6 +64,17 @@ func (this *apiComp) DanReceive(session comm.IUserSession, req *pb.ArenaDanRecei
}
return
}
session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.ArenaDanReceiveResp{Dan: req.Dan, Award: atno})
if err = this.module.modelArena.Change(session.GetUserId(), map[string]interface{}{
"danaward": info.Danaward,
}); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "danreceive", &pb.ArenaDanReceiveResp{Dan: req.Dan, Award: atno})
return
}

View File

@ -107,14 +107,24 @@ locp:
}
func (this *client) handleresponse(resp *pb.BattleRpcMessage) {
var call *MessageCall
var (
call *MessageCall
ok bool
)
if resp.Rid != 0 {
this.pendingmutex.Lock()
call = this.pending[resp.Rid]
delete(this.pending, resp.Rid)
call, ok = this.pending[resp.Rid]
if ok {
delete(this.pending, resp.Rid)
}
this.pendingmutex.Unlock()
call.Error = resp.Data.UnmarshalTo(call.Reply)
call.done(this.log)
if ok {
call.Error = resp.Data.UnmarshalTo(call.Reply)
call.done(this.log)
} else {
this.log.Warnf("C# Reply ON Fiund Method:%s Rid:%s", resp.Method, resp.Rid)
}
} else {
switch resp.Method {
case "BattleOutCmd": //输出指令

View File

@ -696,8 +696,7 @@ func (this *Battle) RunServerBattle(session comm.IUserSession, req *pb.BattleRun
ctx context.Context
err error
)
// if this.options.OpenCheck {
if false {
if this.options.OpenCheck {
stime := time.Now()
ctx, _ = context.WithTimeout(context.Background(), time.Second*5)
if reply, err = this.clientmgr.RunBattle(ctx, req); err != nil {

View File

@ -28,12 +28,18 @@ type MPool struct {
func (this *MPool) join(req *pb.JoinMatchPoolReq) {
this.lock.Lock()
player := &MatchPlayer{
Uid: req.Uid,
Time: 0,
Data: req.Data,
if player, ok := this.Players[req.Uid]; ok {
player.Dan = req.Dan
player.Data = req.Data
} else {
player := &MatchPlayer{
Uid: req.Uid,
Dan: req.Dan,
Time: 0,
Data: req.Data,
}
this.Players[req.Uid] = player
}
this.Players[req.Uid] = player
this.lock.Unlock()
}

View File

@ -5,6 +5,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
@ -67,12 +68,17 @@ func (this *SCompMatch) SuccMatchNotice(ctx context.Context, args *pb.SuccMatchN
for k, v := range args.Players {
if msg, err = v.UnmarshalNew(); err != nil {
log.Errorf("[RPC:SuccMatchNotice] UnmarshalNew err:%s", err.Error())
return
}
player[k] = msg
}
//执行处理流
err = msghandle(player)
if err = msghandle(player); err != nil {
log.Errorf("[RPC:SuccMatchNotice] msghandle err:%s", err.Error())
}
} else {
log.Errorf("[RPC:SuccMatchNotice] on found args:%s", args.String())
}
return nil
}

View File

@ -0,0 +1,14 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
const (
TaskEShowMode_ALL = 0
TaskEShowMode_Single = 1
)