Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
1f0af69c8d
@ -9,7 +9,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 102,
|
"id": 102,
|
||||||
@ -21,7 +22,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 103,
|
"id": 103,
|
||||||
@ -33,7 +35,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 104,
|
"id": 104,
|
||||||
@ -45,7 +48,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 105,
|
"id": 105,
|
||||||
@ -57,7 +61,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 106,
|
"id": 106,
|
||||||
@ -69,7 +74,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 107,
|
"id": 107,
|
||||||
@ -81,7 +87,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 108,
|
"id": 108,
|
||||||
@ -93,7 +100,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 109,
|
"id": 109,
|
||||||
@ -105,7 +113,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 110,
|
"id": 110,
|
||||||
@ -117,7 +126,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 111,
|
"id": 111,
|
||||||
@ -129,7 +139,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 112,
|
"id": 112,
|
||||||
@ -141,7 +152,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 113,
|
"id": 113,
|
||||||
@ -153,7 +165,8 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 114,
|
"id": 114,
|
||||||
@ -165,6 +178,7 @@
|
|||||||
"LockSlots": [],
|
"LockSlots": [],
|
||||||
"AssistTeam": 0,
|
"AssistTeam": 0,
|
||||||
"EventList": [],
|
"EventList": [],
|
||||||
"playexp": 1000
|
"playexp": 1000,
|
||||||
|
"NoMidwayExit": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
File diff suppressed because it is too large
Load Diff
@ -12,8 +12,8 @@ type Options struct {
|
|||||||
|
|
||||||
func DefaultOpts() *Options {
|
func DefaultOpts() *Options {
|
||||||
return &Options{
|
return &Options{
|
||||||
WsUrl: "ws://localhost:7891/gateway",
|
WsUrl: "ws://10.0.5.73:7891/gateway",
|
||||||
RegUrl: "http://localhost:8000/register",
|
RegUrl: "http://10.0.5.73:8000/register",
|
||||||
Create: false,
|
Create: false,
|
||||||
ServerId: "1",
|
ServerId: "1",
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ type (
|
|||||||
// 远程任务条件校验
|
// 远程任务条件校验
|
||||||
RemoteCheckCondi(uid string, condiId int32, rsp *pb.DBRtaskRecord) error
|
RemoteCheckCondi(uid string, condiId int32, rsp *pb.DBRtaskRecord) error
|
||||||
// 删除任务条件数据
|
// 删除任务条件数据
|
||||||
RemoveCondi(uid string ,condiId int32) error
|
RemoveCondi(uid string, condiId int32) error
|
||||||
//任务触发
|
//任务触发
|
||||||
SendToRtask(session IUserSession, rtaskType TaskType, params ...int32) (code pb.ErrorCode)
|
SendToRtask(session IUserSession, rtaskType TaskType, params ...int32) (code pb.ErrorCode)
|
||||||
// 初始化条件数据
|
// 初始化条件数据
|
||||||
@ -263,9 +263,9 @@ type (
|
|||||||
}
|
}
|
||||||
IPrivilege interface {
|
IPrivilege interface {
|
||||||
// 创建一个新的特权卡
|
// 创建一个新的特权卡
|
||||||
CreatePrivilegeCard(session IUserSession, cId string) (res []*pb.UserAssets, code pb.ErrorCode)
|
CreatePrivilegeCard(session IUserSession, cId string) (code pb.ErrorCode)
|
||||||
// 续费特权卡
|
// 续费特权卡
|
||||||
RenewPrivilegeCard(session IUserSession, cId string) (res []*pb.UserAssets, code pb.ErrorCode)
|
RenewPrivilegeCard(session IUserSession, cId string) (code pb.ErrorCode)
|
||||||
// 检查特权
|
// 检查特权
|
||||||
CheckPrivilege(session IUserSession, cId string) (privilege *pb.DBPrivilege)
|
CheckPrivilege(session IUserSession, cId string) (privilege *pb.DBPrivilege)
|
||||||
// 查询玩家当前所有特权 返回特权id
|
// 查询玩家当前所有特权 返回特权id
|
||||||
|
@ -1,12 +1,28 @@
|
|||||||
package battle
|
package battle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
//异步返回结构
|
//异步返回结构
|
||||||
type MessageCall struct {
|
type MessageCall struct {
|
||||||
Method string
|
Method string
|
||||||
Metadata map[string]string
|
Metadata map[string]string
|
||||||
ResMetadata map[string]string
|
ResMetadata map[string]string
|
||||||
Args interface{} //请求参数
|
Args proto.Message //请求参数
|
||||||
Reply interface{} //返回参数
|
Reply proto.Message //返回参数
|
||||||
Error error //错误信息
|
Error error //错误信息
|
||||||
Done chan *MessageCall
|
Done chan *MessageCall
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (call *MessageCall) done(log log.Ilogf) {
|
||||||
|
select {
|
||||||
|
case call.Done <- call:
|
||||||
|
// ok
|
||||||
|
default:
|
||||||
|
log.Debugf("rpc: discarding Call reply due to insufficient Done chan capacity")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
package battle
|
package battle
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
"google.golang.org/protobuf/types/known/anypb"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -15,10 +18,13 @@ import (
|
|||||||
*/
|
*/
|
||||||
type clientComp struct {
|
type clientComp struct {
|
||||||
modules.MCompGate
|
modules.MCompGate
|
||||||
options *Options
|
options *Options
|
||||||
service core.IService
|
service core.IService
|
||||||
module *Battle
|
module *Battle
|
||||||
conn *websocket.Conn
|
conn *websocket.Conn
|
||||||
|
seq uint64
|
||||||
|
pendingmutex sync.Mutex
|
||||||
|
pending map[uint64]*MessageCall //高并发回调
|
||||||
}
|
}
|
||||||
|
|
||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
@ -26,6 +32,7 @@ func (this *clientComp) Init(service core.IService, module core.IModule, comp co
|
|||||||
this.MCompGate.Init(service, module, comp, options)
|
this.MCompGate.Init(service, module, comp, options)
|
||||||
this.options = options.(*Options)
|
this.options = options.(*Options)
|
||||||
this.module = module.(*Battle)
|
this.module = module.(*Battle)
|
||||||
|
this.pending = make(map[uint64]*MessageCall)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,8 +44,43 @@ func (this *clientComp) Start() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//校验战斗过程
|
//校验战斗过程
|
||||||
func (this *clientComp) CheckBattle() {
|
func (this *clientComp) callBattle(ctx context.Context, method string, req proto.Message, reply proto.Message) (err error) {
|
||||||
|
call := new(MessageCall)
|
||||||
|
call.Done = make(chan *MessageCall, 10)
|
||||||
|
call.Args = req
|
||||||
|
call.Reply = reply
|
||||||
|
this.pendingmutex.Lock()
|
||||||
|
seq := this.seq
|
||||||
|
this.seq++
|
||||||
|
this.pending[seq] = call
|
||||||
|
this.pendingmutex.Unlock()
|
||||||
|
msg := &pb.BattleRpcMessage{
|
||||||
|
Rid: seq,
|
||||||
|
Method: method,
|
||||||
|
}
|
||||||
|
msg.Data, _ = anypb.New(req)
|
||||||
|
data, _ := proto.Marshal(msg)
|
||||||
|
if err = this.conn.WriteMessage(websocket.BinaryMessage, data); err != nil {
|
||||||
|
this.pendingmutex.Lock()
|
||||||
|
delete(this.pending, seq)
|
||||||
|
this.pendingmutex.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
case <-ctx.Done(): // cancel by context
|
||||||
|
this.pendingmutex.Lock()
|
||||||
|
call := this.pending[seq]
|
||||||
|
delete(this.pending, seq)
|
||||||
|
this.pendingmutex.Unlock()
|
||||||
|
if call != nil {
|
||||||
|
call.Error = ctx.Err()
|
||||||
|
call.done(this.options.Log)
|
||||||
|
}
|
||||||
|
return ctx.Err()
|
||||||
|
case call := <-call.Done:
|
||||||
|
err = call.Error
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *clientComp) run() {
|
func (this *clientComp) run() {
|
||||||
@ -57,5 +99,16 @@ locp:
|
|||||||
this.module.Errorf("client Unmarshal err:%v", err)
|
this.module.Errorf("client Unmarshal err:%v", err)
|
||||||
break locp
|
break locp
|
||||||
}
|
}
|
||||||
|
go this.handleresponse(msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *clientComp) handleresponse(resp *pb.BattleRpcMessage) {
|
||||||
|
var call *MessageCall
|
||||||
|
this.pendingmutex.Lock()
|
||||||
|
call = this.pending[resp.Rid]
|
||||||
|
delete(this.pending, resp.Rid)
|
||||||
|
this.pendingmutex.Unlock()
|
||||||
|
call.Error = resp.Data.UnmarshalTo(call.Reply)
|
||||||
|
call.done(this.options.Log)
|
||||||
|
}
|
||||||
|
@ -302,7 +302,7 @@ func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Gameatn
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.Debugf("消耗玩家资源: %v", attrs)
|
this.Debugf("消耗玩家资源: %v", attrs)
|
||||||
if count,ok:= attrs[comm.ResDiamond];ok{
|
if count, ok := attrs[comm.ResDiamond]; ok {
|
||||||
this.ModuleRtask.SendToRtask(session, comm.Rtype104, count)
|
this.ModuleRtask.SendToRtask(session, comm.Rtype104, count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -369,7 +369,7 @@ func (this *ModuleBase) DispenseRes(session comm.IUserSession, res []*cfg.Gameat
|
|||||||
}
|
}
|
||||||
if len(vip) > 0 { //卡片资源
|
if len(vip) > 0 { //卡片资源
|
||||||
for k := range vip {
|
for k := range vip {
|
||||||
_, code = this.ModulePrivilege.CreatePrivilegeCard(session, k)
|
code = this.ModulePrivilege.CreatePrivilegeCard(session, k)
|
||||||
this.Debugf("发放月卡资源: %v [%v]", k, code)
|
this.Debugf("发放月卡资源: %v [%v]", k, code)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,6 @@ func (this *apiComp) BuyYueka(session comm.IUserSession, req *pb.PrivilegeBuyYue
|
|||||||
if code = this.BuyYuekaCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.BuyYuekaCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, code = this.module.CreatePrivilegeCard(session, req.CID)
|
code = this.module.CreatePrivilegeCard(session, req.CID)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -64,21 +64,14 @@ func (this *Privilege) EventUserOffline(session comm.IUserSession) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 购买了一个新的特权
|
// 购买了一个新的特权
|
||||||
func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string) (res []*pb.UserAssets, code pb.ErrorCode) {
|
func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
data *pb.DBPrivilege
|
|
||||||
bFind bool
|
bFind bool
|
||||||
)
|
)
|
||||||
atn := &pb.UserAssets{
|
|
||||||
A: "vip",
|
|
||||||
T: "",
|
|
||||||
N: 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
conf, err := this.configure.GetPrivilegeCard(cId)
|
conf, err := this.configure.GetPrivilegeCard(cId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
return pb.ErrorCode_ConfigNoFound
|
||||||
return nil, code
|
|
||||||
}
|
}
|
||||||
// 是不是购买过
|
// 是不是购买过
|
||||||
list, err := this.modelPrivilege.getPrivilegeList(session.GetUserId())
|
list, err := this.modelPrivilege.getPrivilegeList(session.GetUserId())
|
||||||
@ -105,14 +98,13 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string
|
|||||||
this.Errorf("err:%v", err)
|
this.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data = v
|
|
||||||
bFind = true
|
bFind = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !bFind {
|
if !bFind {
|
||||||
|
|
||||||
data = &pb.DBPrivilege{
|
data := &pb.DBPrivilege{
|
||||||
Id: primitive.NewObjectID().Hex(),
|
Id: primitive.NewObjectID().Hex(),
|
||||||
Uid: session.GetUserId(),
|
Uid: session.GetUserId(),
|
||||||
CId: cId,
|
CId: cId,
|
||||||
@ -125,6 +117,7 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string
|
|||||||
for _, v := range conf.PrivilegeId {
|
for _, v := range conf.PrivilegeId {
|
||||||
data.PrivilegeID = append(data.PrivilegeID, v)
|
data.PrivilegeID = append(data.PrivilegeID, v)
|
||||||
}
|
}
|
||||||
|
list = append(list, data)
|
||||||
this.modelPrivilege.addNewPrivilegeData(session.GetUserId(), data)
|
this.modelPrivilege.addNewPrivilegeData(session.GetUserId(), data)
|
||||||
this.SendDailyMail(session, cId, 1, conf.PType)
|
this.SendDailyMail(session, cId, 1, conf.PType)
|
||||||
}
|
}
|
||||||
@ -132,29 +125,13 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string
|
|||||||
if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success {
|
if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
atn.T = conf.Id
|
|
||||||
res = append(res, atn) // 加资源
|
|
||||||
for _, v := range conf.DisposableReward {
|
|
||||||
res = append(res, &pb.UserAssets{
|
|
||||||
A: v.A,
|
|
||||||
T: v.T,
|
|
||||||
N: v.N,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 推送
|
// 推送
|
||||||
session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeGetListResp{Data: list})
|
session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeGetListResp{Data: list})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 续费特权
|
// 续费特权
|
||||||
func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string) (res []*pb.UserAssets, code pb.ErrorCode) {
|
func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string) (code pb.ErrorCode) {
|
||||||
|
|
||||||
atn := &pb.UserAssets{
|
|
||||||
A: "vip",
|
|
||||||
T: "",
|
|
||||||
N: 1, // 暂时只支持一次续费一次
|
|
||||||
}
|
|
||||||
list, err := this.modelPrivilege.getPrivilegeList(session.GetUserId())
|
list, err := this.modelPrivilege.getPrivilegeList(session.GetUserId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -163,8 +140,8 @@ func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string)
|
|||||||
if v.CId == cId {
|
if v.CId == cId {
|
||||||
conf, err := this.configure.GetPrivilegeCard(cId)
|
conf, err := this.configure.GetPrivilegeCard(cId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
return pb.ErrorCode_ConfigNoFound
|
||||||
return nil, code
|
|
||||||
}
|
}
|
||||||
if conf.RenewDay >= int32(configure.Now().Unix()-v.ETime)/(24*3600) {
|
if conf.RenewDay >= int32(configure.Now().Unix()-v.ETime)/(24*3600) {
|
||||||
v.ETime += int64(conf.AssertDay) * 24 * 3600
|
v.ETime += int64(conf.AssertDay) * 24 * 3600
|
||||||
@ -175,18 +152,7 @@ func (this *Privilege) RenewPrivilegeCard(session comm.IUserSession, cId string)
|
|||||||
if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success {
|
if code = this.DispenseRes(session, conf.DisposableReward, true); code != pb.ErrorCode_Success {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeGetListResp{Data: list})
|
session.SendMsg(string(this.GetType()), PrivilegeBuyYuekaResp, &pb.PrivilegeGetListResp{Data: list})
|
||||||
atn.T = conf.Id
|
|
||||||
res = append(res, atn) // 加资源
|
|
||||||
for _, v := range conf.DisposableReward {
|
|
||||||
res = append(res, &pb.UserAssets{
|
|
||||||
A: v.A,
|
|
||||||
T: v.T,
|
|
||||||
N: v.N,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_PrivilegeRenewTime
|
code = pb.ErrorCode_PrivilegeRenewTime
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user