update
This commit is contained in:
parent
d5b15ce0f7
commit
45633d0c6a
@ -153,8 +153,10 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
|||||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var flag bool
|
||||||
for _, v := range req.Format.Friendformat {
|
for _, v := range req.Format.Friendformat {
|
||||||
if v != "" {
|
if v != "" {
|
||||||
|
flag = true
|
||||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
||||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype108, 1))
|
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||||
break
|
break
|
||||||
@ -164,7 +166,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
|||||||
if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req); errdata != nil {
|
if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req); errdata != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if req.Format.Friendformat != nil {
|
if flag {
|
||||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype12, 1))
|
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -298,8 +300,10 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
|||||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var flag bool
|
||||||
for _, v := range req.Format.Friendformat {
|
for _, v := range req.Format.Friendformat {
|
||||||
if v != "" {
|
if v != "" {
|
||||||
|
flag = true
|
||||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
||||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype108, 1))
|
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||||
break
|
break
|
||||||
@ -309,7 +313,7 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
|||||||
if record, errdata = this.modelBattle.createlpve(session, conn, pb.BattleType_lpev, req); errdata != nil {
|
if record, errdata = this.modelBattle.createlpve(session, conn, pb.BattleType_lpev, req); errdata != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if req.Format.Friendformat != nil {
|
if flag {
|
||||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype12, 1))
|
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -459,5 +463,10 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
|
|||||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype157, int32(report.Info.Ptype), v)
|
// this.ModuleBuried.SendToRtask(session, comm.Rtype157, int32(report.Info.Ptype), v)
|
||||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype157, int32(report.Info.Ptype), v))
|
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype157, int32(report.Info.Ptype), v))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (report.WinSide == 1 && report.Info.RedCompId == session.GetUserId()) || (report.WinSide == 2 && report.Info.BlueCompId == session.GetUserId()) {
|
||||||
return nil, true
|
return nil, true
|
||||||
|
} else {
|
||||||
|
return nil, false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,8 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
|||||||
this.module.modelSign.UserSign(session)
|
this.module.modelSign.UserSign(session)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断昨日是否登录
|
||||||
|
|
||||||
rsp.Data = user
|
rsp.Data = user
|
||||||
|
|
||||||
// 查询玩家扩展数据
|
// 查询玩家扩展数据
|
||||||
|
@ -536,10 +536,12 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
change.Ps += add
|
||||||
|
} else {
|
||||||
|
if change.Ps+add > ggd.PsUl {
|
||||||
|
change.Ps = ggd.PsUl
|
||||||
} else {
|
} else {
|
||||||
change.Ps += add
|
change.Ps += add
|
||||||
if change.Ps > ggd.PsUl {
|
|
||||||
change.Ps = ggd.PsUl
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user