兑换商城自提,优化道具使用日志
This commit is contained in:
parent
1de1383383
commit
edd992aecd
|
@ -316,6 +316,10 @@ const (
|
|||
GainWay_WeekCardAward = 65 //65.周卡每日奖励
|
||||
GainWay_PigrankTakeCoin = 66 //66.存钱罐领取耗费钻石
|
||||
GainWay_PigrankGainCoin = 67 //66.存钱罐打开获取金币
|
||||
GainWay_ItemMove = 68 //68.道具赠送
|
||||
GainWay_RoleUpgrade = 69 //69.角色升级
|
||||
GainWay_PetUpgrade = 70 //70.宠物升级
|
||||
GainWay_Game = 71 //71.玩游戏获得
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
|
|
@ -97,12 +97,18 @@ func (svc *BagSvc) AddBagItem(args *model.BagInfo, ret *bool) error {
|
|||
}
|
||||
for id, v := range args.BagItem {
|
||||
if item, exist := bag.BagItem[id]; !exist {
|
||||
if v.ItemNum <= 0 {
|
||||
continue
|
||||
}
|
||||
bag.BagItem[id] = &model.Item{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
ObtainTime: time.Now().Unix(),
|
||||
}
|
||||
} else {
|
||||
if v.ItemNum < 0 && -v.ItemNum > item.ItemNum {
|
||||
v.ItemNum = -item.ItemNum
|
||||
}
|
||||
item.ItemNum += v.ItemNum
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2161,7 +2161,18 @@ func (this *Scene) TryBillExGameDrop(p *Player) {
|
|||
itemData := srvdata.PBDB_GameItemMgr.GetData(id)
|
||||
if itemData != nil {
|
||||
//logType 0获得 1消耗
|
||||
log := model.NewItemLogEx(p.Platform, p.SnId, 0, itemData.Id, itemData.Name, int64(num), "tienlen游戏掉落")
|
||||
log := model.NewItemLogEx(model.ItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
LogType: 0,
|
||||
ItemId: itemData.Id,
|
||||
ItemName: itemData.Name,
|
||||
Count: int64(num),
|
||||
Remark: "tienlen游戏掉落",
|
||||
TypeId: common.GainWay_Interact,
|
||||
GameId: int64(this.GameId),
|
||||
GameFreeId: int64(this.GetGameFreeId()),
|
||||
})
|
||||
if log != nil {
|
||||
logger.Logger.Trace("WriteLog: ", log)
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
|
@ -2197,7 +2208,18 @@ func (this *Scene) DropCollectBox(p *Player) {
|
|||
pack.Items = map[int32]int32{itemData.Id: 1}
|
||||
remark := fmt.Sprintf("游戏掉落%v", itemData.Id)
|
||||
//logType 0获得 1消耗
|
||||
log := model.NewItemLogEx(p.Platform, p.SnId, 0, itemData.Id, itemData.Name, 1, remark)
|
||||
log := model.NewItemLogEx(model.ItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
LogType: 0,
|
||||
ItemId: itemData.Id,
|
||||
ItemName: itemData.Name,
|
||||
Count: 1,
|
||||
Remark: remark,
|
||||
TypeId: common.GainWay_Game,
|
||||
GameId: int64(this.GameId),
|
||||
GameFreeId: int64(this.GetGameFreeId()),
|
||||
})
|
||||
if log != nil {
|
||||
logger.Logger.Trace("WriteLog: ", log)
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
|
|
|
@ -12,30 +12,47 @@ var (
|
|||
)
|
||||
|
||||
type ItemLog struct {
|
||||
LogId bson.ObjectId `bson:"_id"`
|
||||
Platform string //平台
|
||||
SnId int32 //玩家id
|
||||
LogType int32 //记录类型 0.获取 1.消耗
|
||||
ItemId int32 //道具id
|
||||
ItemName string //道具名称
|
||||
Count int64 //个数
|
||||
CreateTs int64 //记录时间
|
||||
Remark string //备注
|
||||
LogId bson.ObjectId `bson:"_id"`
|
||||
Platform string //平台
|
||||
SnId int32 //玩家id
|
||||
LogType int32 //记录类型 0.获取 1.消耗
|
||||
ItemId int32 //道具id
|
||||
ItemName string //道具名称
|
||||
Count int64 //个数
|
||||
CreateTs int64 //记录时间
|
||||
Remark string //备注
|
||||
TypeId int32 // 变化类型
|
||||
GameId int32 // 游戏id,游戏中获得时有值
|
||||
GameFreeId int32 // 场次id,游戏中获得时有值
|
||||
}
|
||||
|
||||
func NewItemLog() *ItemLog {
|
||||
log := &ItemLog{LogId: bson.NewObjectId()}
|
||||
return log
|
||||
}
|
||||
func NewItemLogEx(platform string, snId, logType, itemId int32, itemName string, count int64, remark string) *ItemLog {
|
||||
|
||||
type ItemParam struct {
|
||||
Platform string // 平台
|
||||
SnId int32 // 玩家id
|
||||
LogType int32 // 记录类型 0.获取 1.消耗
|
||||
ItemId int32 // 道具id
|
||||
ItemName string // 道具名称
|
||||
Count int64 // 个数
|
||||
Remark string // 备注
|
||||
TypeId int32 // 变化类型
|
||||
GameId int64 // 游戏id,游戏中获得时有值
|
||||
GameFreeId int64 // 场次id,游戏中获得时有值
|
||||
}
|
||||
|
||||
func NewItemLogEx(param ItemParam) *ItemLog {
|
||||
itemLog := NewItemLog()
|
||||
itemLog.Platform = platform
|
||||
itemLog.SnId = snId
|
||||
itemLog.LogType = logType
|
||||
itemLog.ItemId = itemId
|
||||
itemLog.ItemName = itemName
|
||||
itemLog.Count = count
|
||||
itemLog.Platform = param.Platform
|
||||
itemLog.SnId = param.SnId
|
||||
itemLog.LogType = param.LogType
|
||||
itemLog.ItemId = param.ItemId
|
||||
itemLog.ItemName = param.ItemName
|
||||
itemLog.Count = param.Count
|
||||
itemLog.CreateTs = time.Now().Unix()
|
||||
itemLog.Remark = remark
|
||||
itemLog.Remark = param.Remark
|
||||
return itemLog
|
||||
}
|
||||
|
|
|
@ -6063,6 +6063,7 @@ type ASCreateExchangeOrder struct {
|
|||
Cash int32 `protobuf:"varint,11,opt,name=Cash,proto3" json:"Cash,omitempty"` //消耗现金
|
||||
Amount int32 `protobuf:"varint,12,opt,name=Amount,proto3" json:"Amount,omitempty"` //兑换数量
|
||||
ExchangeType int32 `protobuf:"varint,13,opt,name=ExchangeType,proto3" json:"ExchangeType,omitempty"`
|
||||
GiveType int32 `protobuf:"varint,14,opt,name=GiveType,proto3" json:"GiveType,omitempty"` // 领取方式 1自提
|
||||
}
|
||||
|
||||
func (x *ASCreateExchangeOrder) Reset() {
|
||||
|
@ -6188,6 +6189,13 @@ func (x *ASCreateExchangeOrder) GetExchangeType() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ASCreateExchangeOrder) GetGiveType() int32 {
|
||||
if x != nil {
|
||||
return x.GiveType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SACreateExchangeOrder struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -9137,7 +9145,7 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x2f, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x43, 0x50, 0x4f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x52, 0x09, 0x52,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x22, 0xdf, 0x02, 0x0a, 0x15, 0x41, 0x53, 0x43,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x22, 0xfb, 0x02, 0x0a, 0x15, 0x41, 0x53, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
|
@ -9159,253 +9167,255 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x15, 0x53, 0x41,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x2f, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x43, 0x50, 0x4f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x52, 0x09, 0x52, 0x65,
|
||||
0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x22, 0x58, 0x0a, 0x12, 0x41, 0x53, 0x47, 0x65, 0x74,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69,
|
||||
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67,
|
||||
0x65, 0x22, 0x99, 0x02, 0x0a, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x79,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x50, 0x61,
|
||||
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x58, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x45, 0x58, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xdc, 0x01,
|
||||
0x0a, 0x12, 0x53, 0x41, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x43, 0x75, 0x72, 0x50, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x43, 0x75, 0x72, 0x50, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x4c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65,
|
||||
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xd0, 0x01, 0x0a,
|
||||
0x12, 0x41, 0x53, 0x55, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x47,
|
||||
0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f,
|
||||
0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x65, 0x65,
|
||||
0x64, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4e, 0x65, 0x65, 0x64,
|
||||
0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x4a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x4a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43,
|
||||
0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x61, 0x73, 0x68, 0x22,
|
||||
0x49, 0x0a, 0x12, 0x53, 0x41, 0x55, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x43, 0x0a, 0x11, 0x41, 0x53,
|
||||
0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53,
|
||||
0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x22,
|
||||
0x60, 0x0a, 0x11, 0x53, 0x41, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x28, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x04, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x22, 0x57, 0x0a, 0x0d, 0x53, 0x41, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x45, 0x0a, 0x0d, 0x41, 0x53,
|
||||
0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x54,
|
||||
0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72,
|
||||
0x6c, 0x22, 0x42, 0x0a, 0x10, 0x53, 0x41, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x4f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x4e, 0x0a, 0x10, 0x41, 0x53, 0x52, 0x6f, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x61, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x41,
|
||||
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x67, 0x0a, 0x15, 0x41, 0x53, 0x54, 0x68, 0x64, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x42, 0x61, 0x73, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0a, 0x42, 0x61, 0x73, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x4c,
|
||||
0x0a, 0x15, 0x53, 0x41, 0x54, 0x68, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61,
|
||||
0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0xbd, 0x03, 0x0a,
|
||||
0x0d, 0x53, 0x41, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
|
||||
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x69,
|
||||
0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x47, 0x69,
|
||||
0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x15, 0x53, 0x41, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12,
|
||||
0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54,
|
||||
0x61, 0x67, 0x12, 0x2f, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x50, 0x4f, 0x52, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x43, 0x50, 0x4f, 0x22, 0x58, 0x0a, 0x12, 0x41, 0x53, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0x99, 0x02,
|
||||
0x0a, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52,
|
||||
0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x50, 0x61, 0x79, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4e,
|
||||
0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x58, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x45, 0x58, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x12, 0x53, 0x41,
|
||||
0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03,
|
||||
0x54, 0x61, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x75, 0x72,
|
||||
0x50, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x43, 0x75, 0x72, 0x50,
|
||||
0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69,
|
||||
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12,
|
||||
0x37, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x12, 0x41, 0x53, 0x55,
|
||||
0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x65, 0x65, 0x64, 0x4e, 0x75, 0x6d,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4e, 0x65, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x4a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x4a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x68, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x61, 0x73, 0x68, 0x22, 0x49, 0x0a, 0x12, 0x53,
|
||||
0x41, 0x55, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
|
||||
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x43, 0x0a, 0x11, 0x41, 0x53, 0x47, 0x65, 0x74, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x50,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x60, 0x0a, 0x11, 0x53,
|
||||
0x41, 0x47, 0x65, 0x74, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x70,
|
||||
0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03,
|
||||
0x54, 0x61, 0x67, 0x12, 0x28, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x14, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x57, 0x0a,
|
||||
0x0d, 0x53, 0x41, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||
0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x61, 0x63, 0x6b,
|
||||
0x61, 0x67, 0x65, 0x54, 0x61, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x73, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x4f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52,
|
||||
0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
|
||||
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x44, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0c, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x0d,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x54, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0f, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x45, 0x0a, 0x0d,
|
||||
0x41, 0x53, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x55, 0x72, 0x6c, 0x22, 0x54, 0x0a, 0x12, 0x53, 0x41, 0x57, 0x65, 0x62, 0x41, 0x50, 0x49, 0x53,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x12, 0x16, 0x0a, 0x06, 0x43, 0x42, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x43, 0x42, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x54, 0x73, 0x22, 0x66, 0x0a, 0x12, 0x41, 0x53, 0x57,
|
||||
0x65, 0x62, 0x41, 0x50, 0x49, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x45, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x45,
|
||||
0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x5f, 0x0a, 0x11, 0x41, 0x53, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x22, 0x48, 0x0a, 0x11, 0x53, 0x41, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,
|
||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x45, 0x0a, 0x0d, 0x41, 0x53, 0x52, 0x6f, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x55,
|
||||
0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x22, 0x42, 0x0a,
|
||||
0x10, 0x53, 0x41, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x75,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x22, 0x4e, 0x0a, 0x10, 0x41, 0x53, 0x52, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x4f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x22, 0x67, 0x0a, 0x15, 0x41, 0x53, 0x54, 0x68, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x61,
|
||||
0x73, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
|
||||
0x42, 0x61, 0x73, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x4c, 0x0a, 0x15, 0x53, 0x41,
|
||||
0x54, 0x68, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43,
|
||||
0x6f, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0xbd, 0x03, 0x0a, 0x0d, 0x53, 0x41, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x61, 0x67,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54,
|
||||
0x61, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
||||
0x4f, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x08, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41,
|
||||
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x44, 0x6f, 0x6c, 0x6c, 0x61, 0x72,
|
||||
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x44, 0x6f,
|
||||
0x6c, 0x6c, 0x61, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x02, 0x54, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x45, 0x0a, 0x0d, 0x41, 0x53, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x61, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d,
|
||||
0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x22,
|
||||
0x54, 0x0a, 0x12, 0x53, 0x41, 0x57, 0x65, 0x62, 0x41, 0x50, 0x49, 0x53, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x50, 0x61, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x43, 0x42, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x43,
|
||||
0x42, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x54, 0x73, 0x22, 0x66, 0x0a, 0x12, 0x41, 0x53, 0x57, 0x65, 0x62, 0x41, 0x50,
|
||||
0x49, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4f,
|
||||
0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
|
||||
0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x72, 0x72,
|
||||
0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x45, 0x72, 0x72, 0x4d, 0x73,
|
||||
0x67, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a,
|
||||
0x11, 0x41, 0x53, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x48,
|
||||
0x0a, 0x11, 0x53, 0x41, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x1e, 0x0a, 0x0a, 0x41, 0x53, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x41, 0x0a, 0x0a, 0x53, 0x41, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x7d, 0x0a, 0x09, 0x41,
|
||||
0x53, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f,
|
||||
0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x44, 0x22, 0x40, 0x0a, 0x09, 0x53, 0x41,
|
||||
0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61,
|
||||
0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x1e, 0x0a, 0x0a,
|
||||
0x41, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x41, 0x0a, 0x0a,
|
||||
0x53, 0x41, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61,
|
||||
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x85, 0x01, 0x0a,
|
||||
0x13, 0x41, 0x53, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
|
||||
0x53, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x44, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x4d, 0x6f, 0x6e,
|
||||
0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x54, 0x65, 0x6c, 0x22, 0x74, 0x0a, 0x13, 0x53, 0x41, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54,
|
||||
0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x4f, 0x0a, 0x0b, 0x41, 0x53,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x22, 0x42, 0x0a, 0x0b, 0x53,
|
||||
0x41, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61,
|
||||
0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22,
|
||||
0x7d, 0x0a, 0x09, 0x41, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x44,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x44, 0x22, 0x40,
|
||||
0x0a, 0x09, 0x53, 0x41, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x03, 0x54,
|
||||
0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67,
|
||||
0x22, 0x85, 0x01, 0x0a, 0x13, 0x41, 0x53, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x44,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x22, 0x74, 0x0a, 0x13, 0x53, 0x41, 0x47, 0x65,
|
||||
0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54,
|
||||
0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x4f,
|
||||
0x0a, 0x0b, 0x41, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x54, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x22,
|
||||
0x42, 0x0a, 0x0b, 0x53, 0x41, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x12, 0x21,
|
||||
0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65,
|
||||
0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61,
|
||||
0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x4d, 0x73, 0x67, 0x22, 0x22, 0x0a, 0x0e, 0x41, 0x53, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x67, 0x56,
|
||||
0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x22, 0x77, 0x0a, 0x0e, 0x53, 0x41, 0x47, 0x65, 0x74,
|
||||
0x49, 0x6d, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67,
|
||||
0x22, 0x40, 0x0a, 0x0e, 0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x22, 0x45, 0x0a, 0x0e, 0x53, 0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x44, 0x0a, 0x12, 0x41, 0x53, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53,
|
||||
0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22,
|
||||
0x5d, 0x0a, 0x12, 0x53, 0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74,
|
||||
0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x22, 0x0a, 0x0e, 0x41, 0x53, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x54, 0x65, 0x6c, 0x22, 0x77, 0x0a, 0x0e, 0x53, 0x41, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x67, 0x56,
|
||||
0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x2a, 0xce,
|
||||
0x01, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e,
|
||||
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45,
|
||||
0x53, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45,
|
||||
0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x44, 0x41,
|
||||
0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59,
|
||||
0x42, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10,
|
||||
0x07, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08,
|
||||
0x54, 0x65, 0x6c, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x4e, 0x6f, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x0b, 0x42,
|
||||
0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67,
|
||||
0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x40, 0x0a, 0x0e,
|
||||
0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x45,
|
||||
0x0a, 0x0e, 0x53, 0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03,
|
||||
0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x44, 0x0a, 0x12, 0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x12, 0x53,
|
||||
0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
|
||||
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x2a, 0xce, 0x01, 0x0a, 0x07, 0x54,
|
||||
0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
|
||||
0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01,
|
||||
0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a,
|
||||
0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52,
|
||||
0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45,
|
||||
0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x43, 0x4f,
|
||||
0x44, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x6c,
|
||||
0x61, 0x79, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x65, 0x6c, 0x45,
|
||||
0x78, 0x69, 0x73, 0x74, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54,
|
||||
0x65, 0x6c, 0x4e, 0x6f, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x0b, 0x42, 0x26, 0x5a, 0x24, 0x6d,
|
||||
0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67,
|
||||
0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -684,6 +684,7 @@ message ASCreateExchangeOrder {
|
|||
int32 Cash =11;//消耗现金
|
||||
int32 Amount = 12;//兑换数量
|
||||
int32 ExchangeType = 13;
|
||||
int32 GiveType = 14; // 领取方式 1自提
|
||||
}
|
||||
|
||||
message SACreateExchangeOrder {
|
||||
|
|
|
@ -74,10 +74,7 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
ItemId: msg.ItemId,
|
||||
ItemNum: int64(msg.ItemNum),
|
||||
}}
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_AddBag, "system", "测试")
|
||||
for _, v := range items {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, v.Name, v.ItemNum, "测试")
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_AddBag, "system", "测试", 0, 0, false)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -117,8 +114,7 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
var useFunc func()
|
||||
saleFunc := func() {
|
||||
// 使用道具,减少道具
|
||||
BagMgrSingleton.SalePlayerItem(p, item, int64(msg.ItemNum))
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(msg.ItemNum), "道具使用")
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-msg.ItemNum), 0, common.GainWay_ItemUse, "player", "道具使用", 0, 0, false)
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
pack.NowItemId = item.ItemId
|
||||
pack.NowItemNum = item.ItemNum
|
||||
|
@ -132,13 +128,8 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
for _, v := range items {
|
||||
itemArr = append(itemArr, v)
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, itemArr, 0, common.GainWay_ItemUse, "player", "道具使用")
|
||||
BagMgrSingleton.AddItems(p, itemArr, 0, common.GainWay_ItemUse, "player", "道具使用", 0, 0, false)
|
||||
for _, v := range itemArr {
|
||||
data := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if data != nil {
|
||||
// 背包变更记录
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, data.Name, v.ItemNum, "碎片礼盒获得")
|
||||
}
|
||||
pack.Infos = append(pack.Infos, &bag.ItemInfo{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
|
@ -225,11 +216,11 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
logger.Logger.Trace("道具赠送", msg.ItemId)
|
||||
acceptPlayer := PlayerMgrSington.GetPlatformPlayerBySnId(p.Platform, msg.AcceptSnId)
|
||||
if acceptPlayer != nil {
|
||||
BagMgrSingleton.AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []int32{msg.ItemId, msg.ItemNum})
|
||||
BagMgrSingleton.SalePlayerItem(p, item, int64(msg.ItemNum))
|
||||
remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId)
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(msg.ItemNum), remark)
|
||||
logger.Logger.Trace("道具赠送成功", msg.ItemId)
|
||||
remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId)
|
||||
BagMgrSingleton.AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []int32{msg.ItemId, msg.ItemNum})
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-msg.ItemNum), 0, common.GainWay_ItemMove,
|
||||
"player", remark, 0, 0, false)
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
pack.NowItemId = msg.ItemId
|
||||
pack.NowItemNum = item.ItemNum
|
||||
|
@ -239,11 +230,11 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
aPlayer := data.(*model.PlayerBaseInfo)
|
||||
if data != nil && aPlayer != nil {
|
||||
BagMgrSingleton.AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []int32{msg.ItemId, msg.ItemNum})
|
||||
BagMgrSingleton.SalePlayerItem(p, item, int64(msg.ItemNum))
|
||||
remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId)
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(msg.ItemNum), remark)
|
||||
logger.Logger.Trace("道具赠送成功", msg.ItemId)
|
||||
remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId)
|
||||
BagMgrSingleton.AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []int32{msg.ItemId, msg.ItemNum})
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-msg.ItemNum), 0, common.GainWay_ItemMove,
|
||||
"player", remark, 0, 0, false)
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
pack.NowItemId = msg.ItemId
|
||||
pack.NowItemNum = item.ItemNum
|
||||
|
@ -258,20 +249,17 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
case ItemCanSell:
|
||||
logger.Logger.Trace("道具出售", msg.ItemId)
|
||||
if msg.ItemNum > 0 {
|
||||
isF := BagMgrSingleton.SaleItem(p, msg.ItemId, int64(msg.ItemNum))
|
||||
remark := "道具出售" + fmt.Sprintf("%v-%v", msg.ItemId, msg.ItemNum)
|
||||
_, _, isF := BagMgrSingleton.AddItem(p, int64(msg.ItemId), int64(-msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark, 0, 0, false)
|
||||
if isF {
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
if item.SaleGold > 0 {
|
||||
if item.SaleType == 1 {
|
||||
remark := "道具出售" + fmt.Sprintf("%v-%v", msg.ItemId, msg.ItemNum)
|
||||
p.AddCoin(int64(item.SaleGold*msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark)
|
||||
pack.Coin = int64(item.SaleGold * msg.ItemNum)
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(msg.ItemNum), "道具出售")
|
||||
} else if item.SaleType == 2 {
|
||||
remark := "道具出售" + fmt.Sprintf("%v-%v", msg.ItemId, msg.ItemNum)
|
||||
p.AddDiamond(int64(item.SaleGold*msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark)
|
||||
pack.Diamond = int64(item.SaleGold * msg.ItemNum)
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(msg.ItemNum), "道具出售")
|
||||
}
|
||||
}
|
||||
pack.NowItemId = item.ItemId
|
||||
|
@ -385,13 +373,11 @@ func CSPropExchange(s *netlib.Session, packetid int, data interface{}, sid int64
|
|||
}
|
||||
// 扣除背包物品
|
||||
for _, item := range costItems {
|
||||
BagMgrSingleton.SaleItemV2(p, item.ItemId, item.ItemNum, common.GainWay_Collect, "system", "集卡活动兑换")
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, item.ItemNum, "集卡活动兑换使用")
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWay_Collect, "system", "集卡活动兑换", 0, 0, false)
|
||||
}
|
||||
// 增加背包物品
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_Collect, "system", "集卡活动兑换")
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_Collect, "system", "集卡活动兑换", 0, 0, false)
|
||||
for _, v := range items {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, v.Name, v.ItemNum, "集卡活动兑换获得")
|
||||
pack.Items = append(pack.Items, &bag.PropInfo{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
|
|
|
@ -142,17 +142,15 @@ func (this *CSRisingStarHandler) Process(s *netlib.Session, packetid int, data i
|
|||
if item != nil {
|
||||
// item.ItemNum -= role.Amount
|
||||
role.HaveAmount -= role.Amount
|
||||
BagMgrSingleton.SalePlayerItem(p, item, int64(role.Amount))
|
||||
remark := role.Name + "升星"
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-role.Amount), 0, common.GainWay_RoleUpgrade,
|
||||
"player", remark, 0, 0, false)
|
||||
//人物模型状态处理
|
||||
p.Roles.ModUnlock[msg.RisingModId]++
|
||||
FriendMgrSington.UpdateInfo(p.Platform, p.SnId)
|
||||
p.dirty = true
|
||||
//人物
|
||||
SendInfoRole(pets.OpResultCode_OPRC_Sucess, PetMgrSington.GetRoleInfo(p, msg.RisingModId))
|
||||
remark := role.Name + "升星"
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(role.Amount), remark)
|
||||
|
||||
// BagMgrSingleton.SyncBagData(p, item.ItemId)
|
||||
}
|
||||
} else if msg.RisingType == 1 {
|
||||
petInfo := PetMgrSington.GetIntroductionByModId(msg.RisingModId)
|
||||
|
@ -178,18 +176,15 @@ func (this *CSRisingStarHandler) Process(s *netlib.Session, packetid int, data i
|
|||
if item != nil {
|
||||
// item.ItemNum -= pet.Amount
|
||||
pet.HaveAmount -= pet.Amount
|
||||
|
||||
BagMgrSingleton.SalePlayerItem(p, item, int64(pet.Amount))
|
||||
remark := pet.Name + "升星"
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-pet.Amount), 0, common.GainWay_PetUpgrade,
|
||||
"player", remark, 0, 0, false)
|
||||
|
||||
p.Pets.ModUnlock[msg.RisingModId]++
|
||||
FriendMgrSington.UpdateInfo(p.Platform, p.SnId)
|
||||
p.dirty = true
|
||||
//宠物
|
||||
SendInfoPet(pets.OpResultCode_OPRC_Sucess, PetMgrSington.GetPetInfo(p, msg.RisingModId))
|
||||
remark := pet.Name + "升星"
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(pet.Amount), remark)
|
||||
|
||||
//BagMgrSingleton.SyncBagData(p, item.ItemId)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,14 +294,15 @@ func (this *CSRolePetUnlockHandler) Process(s *netlib.Session, packetid int, dat
|
|||
if roleInfo != nil {
|
||||
item := BagMgrSingleton.GetItem(p.SnId, roleInfo.Fragment)
|
||||
if item != nil && item.ItemNum >= int64(roleInfo.Amount) {
|
||||
item.ItemNum -= int64(roleInfo.Amount)
|
||||
remark := roleInfo.Name + "解锁"
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-roleInfo.Amount), 0, common.GainWay_RoleUpgrade,
|
||||
"player", remark, 0, 0, false)
|
||||
|
||||
p.Roles.ModUnlock[msg.UseModId] = 1
|
||||
FriendMgrSington.UpdateInfo(p.Platform, p.SnId)
|
||||
p.dirty = true
|
||||
logger.Logger.Trace("解锁人物", msg.UseModId)
|
||||
SendMsg(pets.OpResultCode_OPRC_Sucess, PetMgrSington.GetRoleInfo(p, msg.UseModId), nil)
|
||||
remark := roleInfo.Name + "解锁"
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(roleInfo.Amount), remark)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -317,14 +313,15 @@ func (this *CSRolePetUnlockHandler) Process(s *netlib.Session, packetid int, dat
|
|||
if petInfo != nil {
|
||||
item := BagMgrSingleton.GetItem(p.SnId, petInfo.Fragment)
|
||||
if item != nil && item.ItemNum >= int64(petInfo.Amount) {
|
||||
item.ItemNum -= int64(petInfo.Amount)
|
||||
remark := petInfo.Name + "解锁"
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-petInfo.Amount), 0, common.GainWay_PetUpgrade,
|
||||
"player", remark, 0, 0, false)
|
||||
|
||||
p.Pets.ModUnlock[msg.UseModId] = 1
|
||||
FriendMgrSington.UpdateInfo(p.Platform, p.SnId)
|
||||
p.dirty = true
|
||||
logger.Logger.Trace("解锁宠物", msg.UseModId)
|
||||
SendMsg(pets.OpResultCode_OPRC_Sucess, nil, PetMgrSington.GetPetInfo(p, msg.UseModId))
|
||||
remark := petInfo.Name + "解锁"
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, int64(petInfo.Amount), remark)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ func (this *CSPhoneLotteryHandler) Process(s *netlib.Session, packetid int, data
|
|||
}
|
||||
}
|
||||
//增加到玩家背包
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_PhoneScore, "system", "玩游戏积分")
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_PhoneScore, "system", "玩游戏积分", 0, 0, false)
|
||||
pack.Count = p.LotteryCount
|
||||
pack.PhoneScore = p.PhoneScore
|
||||
logger.Logger.Tracef("获取玩家抽奖权重 score = %d,抽奖获得的物品:%v", p.PhoneScore, pack)
|
||||
|
|
|
@ -254,11 +254,7 @@ func CSRMAward(s *netlib.Session, packetId int, data interface{}, sid int64) err
|
|||
ItemId: v.Id,
|
||||
ItemNum: int64(v.Num),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_RankReward, "system", "段位奖励")
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, item.ItemId, itemData.Name, int64(item.ItemNum), "段位奖励")
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, common.GainWay_RankReward, "system", "段位奖励", 0, 0, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
if diffItems != nil && len(diffItems) != 0 {
|
||||
BagMgrSingleton.AddJybBagInfo(p, diffItems, 0, 0, "", "")
|
||||
BagMgrSingleton.AddItems(p, diffItems, 0, 0, "", "", 0, 0, true)
|
||||
}
|
||||
|
||||
//对账点同步
|
||||
|
|
|
@ -292,21 +292,22 @@ func (this *CSShopExchangeHandler) Process(s *netlib.Session, packetid int, data
|
|||
ItemNum: 1, // 数量
|
||||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_Exchange, "system", "商城兑换")
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_Exchange, "system", "商城兑换", 0, 0, false)
|
||||
default:
|
||||
_, f := BlackListMgrSington.CheckExchange(p.PlayerData)
|
||||
if !f {
|
||||
pack := &shop.SCShopExchange{
|
||||
RetCode: shop.OpResultCode_OPRC_ExchangeLimitAcc,
|
||||
}
|
||||
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
|
||||
return nil
|
||||
}
|
||||
if msg.Amount <= 0 || msg.Amount > 100 {
|
||||
return nil
|
||||
}
|
||||
ShopMgrSington.Exchange(p, msg.GoodsId, msg.UserName, msg.Mobile, msg.Comment, msg.Id, msg.Amount)
|
||||
}
|
||||
|
||||
_, f := BlackListMgrSington.CheckExchange(p.PlayerData)
|
||||
if !f {
|
||||
pack := &shop.SCShopExchange{
|
||||
RetCode: shop.OpResultCode_OPRC_ExchangeLimitAcc,
|
||||
}
|
||||
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
|
||||
return nil
|
||||
}
|
||||
if msg.Amount <= 0 || msg.Amount > 100 {
|
||||
return nil
|
||||
}
|
||||
ShopMgrSington.Exchange(p, msg.GoodsId, msg.UserName, msg.Mobile, msg.Comment, msg.Id, msg.Amount, msg.ExchangeType)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -79,13 +79,7 @@ func SendReward(p *Player, m map[int64]int64) {
|
|||
ItemNum: v,
|
||||
})
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_TaskReward, "system", "任务奖励")
|
||||
for _, v := range items {
|
||||
data := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if data != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, data.Name, v.ItemNum, "任务获得")
|
||||
}
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_TaskReward, "system", "任务奖励", 0, 0, false)
|
||||
}
|
||||
|
||||
func CSTaskList(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
|
|
|
@ -383,11 +383,7 @@ func (this *CSTMSeasonAwardHandler) Process(s *netlib.Session, packetid int, dat
|
|||
ItemId: v.AwardId1,
|
||||
ItemNum: int64(v.Number1),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_MatchSeason, "system", "赛季奖励")
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, item.ItemId, itemData.Name, item.ItemNum, "赛季奖励")
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, common.GainWay_MatchSeason, "system", "赛季奖励", 0, 0, false)
|
||||
}
|
||||
}
|
||||
if v.Number2 > 0 {
|
||||
|
@ -407,11 +403,7 @@ func (this *CSTMSeasonAwardHandler) Process(s *netlib.Session, packetid int, dat
|
|||
ItemId: v.AwardId2,
|
||||
ItemNum: int64(v.Number2),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_MatchSeason, "system", "赛季奖励")
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, item.ItemId, itemData.Name, item.ItemNum, "赛季奖励")
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, common.GainWay_MatchSeason, "system", "赛季奖励", 0, 0, false)
|
||||
}
|
||||
}
|
||||
if v.Number3 > 0 {
|
||||
|
@ -431,11 +423,7 @@ func (this *CSTMSeasonAwardHandler) Process(s *netlib.Session, packetid int, dat
|
|||
ItemId: v.AwardId3,
|
||||
ItemNum: int64(v.Number3),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_MatchSeason, "system", "赛季奖励")
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, item.ItemId, itemData.Name, item.ItemNum, "赛季奖励")
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, common.GainWay_MatchSeason, "system", "赛季奖励", 0, 0, false)
|
||||
}
|
||||
}
|
||||
break
|
||||
|
|
|
@ -145,11 +145,7 @@ func (this *ActSignMgr) Sign(player *Player, signIndex int, signType int32) acti
|
|||
ItemId: signConfig.Item_Id,
|
||||
ItemNum: int64(grade),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(player, []*Item{item}, 0, common.GainWay_ActSign, strconv.Itoa(signIndex), time.Now().Format("2006-01-02 15:04:05"))
|
||||
data := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if data != nil {
|
||||
BagMgrSingleton.RecordItemLog(player.Platform, player.SnId, ItemObtain, item.ItemId, data.Name, item.ItemNum, "14日签到获得")
|
||||
}
|
||||
BagMgrSingleton.AddItems(player, []*Item{item}, 0, common.GainWay_ActSign, strconv.Itoa(signIndex), time.Now().Format("2006-01-02 15:04:05"), 0, 0, false)
|
||||
}
|
||||
return activity.OpResultCode_ActSign_OPRC_Activity_Sign_Sucess
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"mongo.games.com/game/worldsrv/internal"
|
||||
"strconv"
|
||||
"time"
|
||||
|
@ -133,12 +134,16 @@ func (this *BagMgr) GetItem(snid, itemId int32) *Item {
|
|||
return item
|
||||
}
|
||||
|
||||
// AddJybBagInfo 给玩家背包添加道具
|
||||
// AddItems 给玩家背包添加道具
|
||||
// add 加成数量
|
||||
// gainWay 记录类型
|
||||
// oper 操作人
|
||||
// remark 备注
|
||||
func (this *BagMgr) AddJybBagInfo(p *Player, addItems []*Item, add int64, gainWay int32, oper, remark string) (*BagInfo, bag.OpResultCode) {
|
||||
// gameId 游戏id
|
||||
// gameFreeId 场次id
|
||||
// noLog 是否不记录日志
|
||||
func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int32, operator, remark string,
|
||||
gameId, gameFreeId int64, noLog bool) (*BagInfo, bag.OpResultCode, bool) {
|
||||
var items []*Item
|
||||
for _, v := range addItems {
|
||||
if v == nil || v.ItemNum == 0 {
|
||||
|
@ -149,12 +154,12 @@ func (this *BagMgr) AddJybBagInfo(p *Player, addItems []*Item, add int64, gainWa
|
|||
case common.ItemTypeCoin:
|
||||
//增加金币
|
||||
if item.Id == common.ItemIDCoin {
|
||||
p.AddCoin(v.ItemNum, 0, gainWay, oper, remark)
|
||||
p.AddCoin(v.ItemNum, add, gainWay, operator, remark)
|
||||
}
|
||||
case common.ItemTypeDiamond:
|
||||
//增加钻石
|
||||
if item.Id == common.ItemIDDiamond {
|
||||
p.AddDiamond(v.ItemNum, 0, gainWay, oper, remark)
|
||||
p.AddDiamond(v.ItemNum, add, gainWay, operator, remark)
|
||||
}
|
||||
case common.ItemTypeFishPower:
|
||||
//增加炮台
|
||||
|
@ -171,10 +176,10 @@ func (this *BagMgr) AddJybBagInfo(p *Player, addItems []*Item, add int64, gainWa
|
|||
}
|
||||
case common.ItemTypeShopScore:
|
||||
if v.ItemId == common.ItemIDPhoneScore {
|
||||
p.AddPhoneScore(v.ItemNum, 0, gainWay, oper, remark)
|
||||
p.AddPhoneScore(v.ItemNum, 0, gainWay, operator, remark)
|
||||
}
|
||||
case common.ItemTypeExpireTime:
|
||||
p.AddItemRecExpireTime(v.ItemId, v.ItemNum, 0, gainWay, oper, remark)
|
||||
p.AddItemRecExpireTime(v.ItemId, v.ItemNum, 0, gainWay, operator, remark)
|
||||
default:
|
||||
// 道具变化
|
||||
items = append(items, v)
|
||||
|
@ -194,9 +199,8 @@ func (this *BagMgr) AddJybBagInfo(p *Player, addItems []*Item, add int64, gainWa
|
|||
} else {
|
||||
newBagInfo = this.PlayerBag[p.SnId]
|
||||
}
|
||||
|
||||
if len(items) == 0 {
|
||||
return newBagInfo, bag.OpResultCode_OPRC_Sucess
|
||||
return newBagInfo, bag.OpResultCode_OPRC_Sucess, true
|
||||
}
|
||||
|
||||
var code = bag.OpResultCode_OPRC_Sucess
|
||||
|
@ -204,22 +208,56 @@ func (this *BagMgr) AddJybBagInfo(p *Player, addItems []*Item, add int64, gainWa
|
|||
if v == nil || v.ItemNum == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
item := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if item == nil {
|
||||
code = bag.OpResultCode_OPRC_IdErr
|
||||
continue
|
||||
}
|
||||
|
||||
changeItems = append(changeItems, v.ItemId)
|
||||
if itm, exist := newBagInfo.BagItem[v.ItemId]; exist {
|
||||
if itm.ItemNum+v.ItemNum < 0 {
|
||||
code = bag.OpResultCode_OPRC_IdErr
|
||||
continue
|
||||
}
|
||||
itm.ItemNum += v.ItemNum
|
||||
} else {
|
||||
if v.ItemNum < 0 {
|
||||
code = bag.OpResultCode_OPRC_IdErr
|
||||
continue
|
||||
}
|
||||
newBagInfo.BagItem[v.ItemId] = &Item{
|
||||
ItemId: item.Id, // 物品id
|
||||
ItemNum: v.ItemNum, // 数量
|
||||
ObtainTime: time.Now().Unix(),
|
||||
}
|
||||
}
|
||||
|
||||
changeItems = append(changeItems, v.ItemId)
|
||||
|
||||
// 道具日志
|
||||
if !noLog {
|
||||
logType := ItemObtain
|
||||
if v.ItemNum < 0 {
|
||||
logType = ItemConsume
|
||||
}
|
||||
log := model.NewItemLogEx(model.ItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
LogType: int32(logType),
|
||||
ItemId: v.ItemId,
|
||||
ItemName: item.Name,
|
||||
Count: v.ItemNum,
|
||||
Remark: remark,
|
||||
TypeId: gainWay,
|
||||
GameId: gameId,
|
||||
GameFreeId: gameFreeId,
|
||||
})
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
}
|
||||
|
||||
if v.ItemId == common.ItemIDWeekScore && v.ItemNum != 0 {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeActivityScore, &TaskData{
|
||||
SnId: p.SnId,
|
||||
|
@ -234,54 +272,71 @@ func (this *BagMgr) AddJybBagInfo(p *Player, addItems []*Item, add int64, gainWa
|
|||
this.SyncBagData(p.SnId, changeItems...)
|
||||
}
|
||||
|
||||
return newBagInfo, code
|
||||
return newBagInfo, code, true
|
||||
}
|
||||
|
||||
// SaleItem 出售道具,减少玩家道具数量
|
||||
func (this *BagMgr) SaleItem(p *Player, itemId int32, num int64) bool {
|
||||
item := this.GetItem(p.SnId, itemId)
|
||||
if item != nil && item.ItemNum >= num {
|
||||
return this.SalePlayerItem(p, item, num)
|
||||
}
|
||||
return false
|
||||
func (this *BagMgr) AddItem(p *Player, itemId, itemNum int64, add int64, gainWay int32, operator, remark string,
|
||||
gameId, gameFreeId int64, noLog bool) (*BagInfo, bag.OpResultCode, bool) {
|
||||
return this.AddItems(p, []*Item{{ItemId: int32(itemId), ItemNum: itemNum}}, add, gainWay, operator, remark, gameId, gameFreeId, noLog)
|
||||
}
|
||||
|
||||
// SalePlayerItem 出售道具,减少玩家道具数量
|
||||
func (this *BagMgr) SalePlayerItem(p *Player, item *Item, num int64) bool {
|
||||
item.ItemNum -= num
|
||||
p.dirty = true
|
||||
this.SyncBagData(p.SnId, item.ItemId)
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *BagMgr) SaleItemV2(p *Player, itemId int32, num int64, gain int32, oper string, remark string) bool {
|
||||
item := this.GetItem(p.SnId, itemId)
|
||||
if item != nil && item.ItemNum >= num {
|
||||
switch item.ItemId {
|
||||
case common.ItemIDCoin:
|
||||
p.AddCoin(-num, 0, gain, oper, remark)
|
||||
return true
|
||||
case common.ItemIDDiamond:
|
||||
p.AddDiamond(-num, 0, gain, oper, remark)
|
||||
return true
|
||||
default:
|
||||
return this.SalePlayerItem(p, item, num)
|
||||
func (this *BagMgr) AddItemsOffline(platform string, snid int32, addItems []*Item, gainWay int32, operator, remark string,
|
||||
gameId, gameFreeId int64, noLog bool, callback func(err error)) {
|
||||
var findPlayer *model.PlayerBaseInfo
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
findPlayer = model.GetPlayerBaseInfo(platform, snid)
|
||||
if findPlayer == nil {
|
||||
return nil
|
||||
}
|
||||
newBagInfo := &model.BagInfo{
|
||||
SnId: findPlayer.SnId,
|
||||
Platform: findPlayer.Platform,
|
||||
BagItem: make(map[int32]*model.Item),
|
||||
}
|
||||
for _, v := range addItems {
|
||||
if v == nil || v.ItemNum == 0 {
|
||||
continue
|
||||
}
|
||||
newBagInfo.BagItem[v.ItemId] = &model.Item{ItemId: v.ItemId, ItemNum: v.ItemNum}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// RecordItemLog 道具操作记录(获得,消耗)
|
||||
func (this *BagMgr) RecordItemLog(platform string, snid, logType, itemId int32, itemName string, count int64, remark string) {
|
||||
//logger.Logger.Trace("RecordItemLog:", platform, snid, logType, itemId, itemName, count, remark)
|
||||
switch itemId {
|
||||
case common.ItemIDCoin, common.ItemIDDiamond:
|
||||
return
|
||||
}
|
||||
log := model.NewItemLogEx(platform, snid, logType, itemId, itemName, count, remark)
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
return model.SaveDBBagItem(newBagInfo)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
logger.Logger.Tracef("AddItemsOffline failed: %v %+v", data, *findPlayer)
|
||||
if data == nil && findPlayer != nil {
|
||||
callback(nil)
|
||||
if noLog {
|
||||
return
|
||||
}
|
||||
for _, v := range addItems {
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if itemData == nil {
|
||||
continue
|
||||
}
|
||||
logType := ItemObtain
|
||||
if v.ItemNum < 0 {
|
||||
logType = ItemConsume
|
||||
}
|
||||
log := model.NewItemLogEx(model.ItemParam{
|
||||
Platform: findPlayer.Platform,
|
||||
SnId: findPlayer.SnId,
|
||||
LogType: int32(logType),
|
||||
ItemId: v.ItemId,
|
||||
ItemName: itemData.Name,
|
||||
Count: v.ItemNum,
|
||||
Remark: remark,
|
||||
TypeId: gainWay,
|
||||
GameId: gameId,
|
||||
GameFreeId: gameFreeId,
|
||||
})
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
callback(errors.New("AddItemsOffline failed"))
|
||||
}
|
||||
}), "AddItemsOffline").Start()
|
||||
}
|
||||
|
||||
// AddMailByItem 赠送道具到邮件
|
||||
|
@ -339,18 +394,12 @@ func (this *BagMgr) VerifyUpJybInfo(p *Player, args *model.VerifyUpJybInfoArgs)
|
|||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
}
|
||||
if _, code := this.AddJybBagInfo(p, items, 0, common.GainWay_ActJybAward, "system", "礼包码兑换"); code != bag.OpResultCode_OPRC_Sucess { //TODO 添加失败 要回退礼包
|
||||
logger.Logger.Errorf("CSPlayerSettingHandler AddJybBagInfo err", code)
|
||||
if _, code, _ := this.AddItems(p, items, 0, common.GainWay_ActJybAward, "system", "礼包码兑换", 0, 0, false); code != bag.OpResultCode_OPRC_Sucess { //TODO 添加失败 要回退礼包
|
||||
logger.Logger.Errorf("CSPlayerSettingHandler AddItems err", code)
|
||||
pack.OpRetCode = playerproto.OpResultCode_OPRC_Error
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(playerproto.PlayerPacketID_PACKET_ALL_SETTING), pack)
|
||||
} else {
|
||||
for _, v := range items {
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, itemData.Name, int64(v.ItemNum), "礼包领取")
|
||||
}
|
||||
}
|
||||
PetMgrSington.CheckShowRed(p)
|
||||
}
|
||||
p.dirty = true
|
||||
|
|
|
@ -1132,22 +1132,14 @@ func (this *Player) GetMessageAttach(id string) {
|
|||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
}
|
||||
if _, code := BagMgrSingleton.AddJybBagInfo(this, items, 0, gainWay, "mail", remark); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||
logger.Logger.Errorf("CSPlayerSettingHandler AddJybBagInfo err", code)
|
||||
if _, code, _ := BagMgrSingleton.AddItems(this, items, 0, gainWay, "mail", remark, 0, 0, false); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||
logger.Logger.Errorf("CSPlayerSettingHandler AddItems err", code)
|
||||
pack := &msg_proto.SCGetMessageAttach{
|
||||
Id: proto.String(""),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
this.SendToClient(int(msg_proto.MSGPacketID_PACKET_SC_GETMESSAGEATTACH), pack)
|
||||
} else {
|
||||
var itemIds []int32
|
||||
for _, v := range items {
|
||||
itemIds = append(itemIds, v.ItemId)
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(this.Platform, this.SnId, ItemObtain, v.ItemId, itemData.Name, v.ItemNum, "邮件领取")
|
||||
}
|
||||
}
|
||||
PetMgrSington.CheckShowRed(this)
|
||||
}
|
||||
this.dirty = true
|
||||
|
@ -1329,8 +1321,8 @@ func (this *Player) GetMessageAttachs(ids []string) {
|
|||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
}
|
||||
if _, code := BagMgrSingleton.AddJybBagInfo(this, items, 0, gainWay, "mail", remark); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||
logger.Logger.Errorf("CSPlayerSettingHandler AddJybBagInfo err", code)
|
||||
if _, code, _ := BagMgrSingleton.AddItems(this, items, 0, gainWay, "mail", remark, 0, 0, false); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||
logger.Logger.Errorf("CSPlayerSettingHandler AddItems err", code)
|
||||
/*
|
||||
pack := &msg_proto.SCGetMessageAttach{
|
||||
Id: proto.String(""),
|
||||
|
@ -1339,14 +1331,6 @@ func (this *Player) GetMessageAttachs(ids []string) {
|
|||
this.SendToClient(int(msg_proto.MSGPacketID_PACKET_SC_GETMESSAGEATTACH), pack)
|
||||
*/
|
||||
} else {
|
||||
var itemIds []int32
|
||||
for _, v := range items {
|
||||
itemIds = append(itemIds, v.ItemId)
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(v.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(this.Platform, this.SnId, ItemObtain, v.ItemId, itemData.Name, v.ItemNum, "邮件领取")
|
||||
}
|
||||
}
|
||||
PetMgrSington.CheckShowRed(this)
|
||||
}
|
||||
this.dirty = true
|
||||
|
@ -3925,7 +3909,7 @@ func (this *Player) GetPayGoodsInfo() {
|
|||
|
||||
info.Amount[2] = this.GetVIPExpByPay(info.ConsumeNum)
|
||||
|
||||
BagMgrSingleton.AddJybBagInfo(this, items, 0, info.GainWay, info.Operator, info.Remark)
|
||||
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)
|
||||
|
||||
PayGoodsInfo := &player_proto.SCPayGoodsInfo{
|
||||
Gold: info.Amount,
|
||||
|
@ -4251,7 +4235,7 @@ func (this *Player) BindTelReward() {
|
|||
}
|
||||
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(this, items, 0, common.GainWay_BindTel, "system", "绑定手机号")
|
||||
BagMgrSingleton.AddItems(this, items, 0, common.GainWay_BindTel, "system", "绑定手机号", 0, 0, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4499,7 +4483,7 @@ func (this *Player) CollectTask(taskId int32, num int64) {
|
|||
ItemNum: num,
|
||||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
BagMgrSingleton.AddJybBagInfo(this, items, 0, common.GainWay_Collect, "system", oper)
|
||||
BagMgrSingleton.AddItems(this, items, 0, common.GainWay_Collect, "system", oper, 0, 0, false)
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
@ -4599,9 +4583,8 @@ func (this *Player) GetWeekCardAwary(id int32) {
|
|||
itemInfo.ItemId = int32(itemId)
|
||||
itemInfo.ItemNum = itemNum
|
||||
ret.Items = append(ret.Items, itemInfo)
|
||||
BagMgrSingleton.RecordItemLog(this.Platform, this.SnId, ItemObtain, int32(itemId), data.Name, itemNum, "周卡每日奖励")
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(this, addItem, 0, common.GainWay_WeekCardAward, "system", "周卡每日奖励")
|
||||
BagMgrSingleton.AddItems(this, addItem, 0, common.GainWay_WeekCardAward, "system", "周卡每日奖励", 0, 0, false)
|
||||
//返回消息
|
||||
this.WeekCardAward[id] = true
|
||||
ret.WeekCardAward = this.WeekCardAward[id]
|
||||
|
|
|
@ -19,7 +19,6 @@ import (
|
|||
hall_proto "mongo.games.com/game/protocol/gamehall"
|
||||
"mongo.games.com/game/protocol/shop"
|
||||
webapi_proto "mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/game/srvdata"
|
||||
"mongo.games.com/game/webapi"
|
||||
)
|
||||
|
||||
|
@ -522,11 +521,7 @@ func (this *ShopMgr) shopAddItem(p *Player, shopInfo *model.ShopInfo, vipShopId
|
|||
|
||||
for _, info := range shopInfo.GetItems() {
|
||||
item := &Item{ItemId: info.ItemId, ItemNum: info.ItemNum, ObtainTime: time.Now().Unix()}
|
||||
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, common.GainWay_Shop_Buy, "system", name)
|
||||
data := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if data != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, info.ItemId, data.Name, info.ItemNum, "商城购买")
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, common.GainWay_Shop_Buy, "system", name, 0, 0, false)
|
||||
}
|
||||
|
||||
// 获得道具,检查是否显示红点
|
||||
|
@ -748,7 +743,7 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf
|
|||
|
||||
// 兑换操作
|
||||
// Exchange 生成兑换订单(v卡) id 兑换方式 0~2
|
||||
func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, comment string, id int32, num int32) (ret bool) {
|
||||
func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, comment string, id int32, num, giveType int32) (ret bool) {
|
||||
ret = true
|
||||
cdata := this.GetExchangeData(p.Platform, goodsId)
|
||||
pack := &shop.SCShopExchange{
|
||||
|
@ -777,26 +772,32 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
// 判断p.VCoin是否足够 不足返回错误 足够扣掉 另外需从后台操作回执成功生成扣除V卡的订单 回执失败
|
||||
//扣除V卡
|
||||
if info.Price > 0 {
|
||||
if isF := BagMgrSingleton.SaleItem(p, VCard, int64(info.Price*num)); !isF { // 扣掉V卡
|
||||
item := model.ItemInfo{
|
||||
ItemId: VCard,
|
||||
ItemNum: int64(info.Price * num),
|
||||
}
|
||||
_, _, isF := BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWay_Exchange,
|
||||
"sys", fmt.Sprintf("兑换扣除%v", item.ItemId), 0, 0, false)
|
||||
if !isF { // 扣掉V卡
|
||||
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
|
||||
return false
|
||||
}
|
||||
itemInfo = append(itemInfo, model.ItemInfo{
|
||||
ItemId: VCard,
|
||||
ItemNum: int64(info.Price * num),
|
||||
})
|
||||
itemInfo = append(itemInfo, item)
|
||||
}
|
||||
//扣除金券
|
||||
if info.JPrice > 0 {
|
||||
if isF := BagMgrSingleton.SaleItem(p, JCard, int64(info.JPrice*num)); !isF { // 扣掉金券
|
||||
item := model.ItemInfo{
|
||||
ItemId: JCard,
|
||||
ItemNum: int64(info.JPrice * num),
|
||||
}
|
||||
_, _, isF := BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWay_Exchange,
|
||||
"sys", fmt.Sprintf("兑换扣除%v", item.ItemId), 0, 0, false)
|
||||
if !isF { // 扣掉金券
|
||||
pack.RetCode = shop.OpResultCode_OPRC_JCoinNotEnough
|
||||
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
|
||||
return false
|
||||
}
|
||||
itemInfo = append(itemInfo, model.ItemInfo{
|
||||
ItemId: JCard,
|
||||
ItemNum: int64(info.JPrice * num),
|
||||
})
|
||||
itemInfo = append(itemInfo, item)
|
||||
}
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
pack := &webapi_proto.ASCreateExchangeOrder{
|
||||
|
@ -812,7 +813,8 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
JPrice: info.JPrice * num,
|
||||
Cash: info.Cash * num,
|
||||
Amount: num,
|
||||
ExchangeType: id,
|
||||
ExchangeType: id, // 消耗类型
|
||||
GiveType: giveType,
|
||||
}
|
||||
buff, err := webapi.API_CreateExchange(common.GetAppId(), pack)
|
||||
if err != nil {
|
||||
|
@ -843,26 +845,6 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
//dbShop
|
||||
if as.Tag == webapi_proto.TagCode_SUCCESS {
|
||||
pack.RetCode = shop.OpResultCode_OPRC_Sucess
|
||||
//p.SendVCoinDiffData() // 强推
|
||||
if info.Price > 0 {
|
||||
name := "V卡"
|
||||
if item := BagMgrSingleton.GetItem(p.SnId, VCard); item != nil && item.Name != "" {
|
||||
name = item.Name
|
||||
} else {
|
||||
logger.Logger.Errorf("ExchangeList name err snid %v item %v ", p.SnId, VCard)
|
||||
}
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, VCard, name, int64(info.Price*num), fmt.Sprintf("兑换订单 %v-%v", cdata.Id, cdata.Name))
|
||||
}
|
||||
|
||||
if info.JPrice > 0 {
|
||||
name := "金券"
|
||||
if item := BagMgrSingleton.GetItem(p.SnId, JCard); item != nil && item.Name != "" {
|
||||
name = item.Name
|
||||
} else {
|
||||
logger.Logger.Errorf("ExchangeList name err snid %v item %v ", p.SnId, JCard)
|
||||
}
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, JCard, name, int64(info.JPrice*num), fmt.Sprintf("兑换订单 %v-%v", cdata.Id, cdata.Name))
|
||||
}
|
||||
} else {
|
||||
if as.GetReturnCPO() != nil {
|
||||
switch as.ReturnCPO.Err {
|
||||
|
@ -877,26 +859,15 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
}
|
||||
}
|
||||
logger.Logger.Trace("API_CreateExchange: ", as.Tag, as.GetReturnCPO())
|
||||
var items = []*Item{}
|
||||
//返回V卡
|
||||
if info.Price > 0 {
|
||||
item1 := &Item{
|
||||
ItemId: VCard, // 物品id
|
||||
ItemNum: int64(info.Price * num), // 数量
|
||||
}
|
||||
items = append(items, item1)
|
||||
var items []*Item
|
||||
for _, v := range itemInfo {
|
||||
items = append(items, &Item{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
})
|
||||
}
|
||||
//返回金券
|
||||
if info.JPrice > 0 {
|
||||
item := &Item{
|
||||
ItemId: JCard,
|
||||
ItemNum: int64(info.JPrice * num),
|
||||
}
|
||||
items = append(items, item)
|
||||
}
|
||||
|
||||
if len(items) > 0 {
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_Exchange, "system", "返还物品") // 后台订单创建失败 返回物品
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_Exchange, "system", "返还物品", 0, 0, false) // 后台订单创建失败 返回物品
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -399,23 +399,22 @@ func (this *Tournament) signUpCost(tmId int32, p *Player, cost bool) (bool, int3
|
|||
logger.Logger.Trace("比赛场报名消耗道具", cost, gmd.SignupCostItem.ItemNum)
|
||||
item := BagMgrSingleton.GetItem(p.SnId, gmd.SignupCostItem.ItemId)
|
||||
if item != nil {
|
||||
gameId := int64(0)
|
||||
gf := PlatformMgrSingleton.GetGameFree(p.Platform, gmd.GameFreeId)
|
||||
if gf != nil && gf.GetDbGameFree() != nil {
|
||||
gameId = int64(gf.GetDbGameFree().GameId)
|
||||
}
|
||||
if cost {
|
||||
if item.ItemNum < gmd.SignupCostItem.ItemNum {
|
||||
logger.Logger.Trace("道具不足")
|
||||
return false, int32(tournament.SignRaceCode_OPRC_NoItem)
|
||||
} else {
|
||||
BagMgrSingleton.SalePlayerItem(p, item, gmd.SignupCostItem.ItemNum)
|
||||
//item.ItemNum -= gmd.SignupCostItem.ItemNum
|
||||
//p.dirty = true
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, gmd.SignupCostItem.ItemNum, gmd.MatchName+"-报名消耗")
|
||||
//BagMgrSingleton.SyncBagData(p, item.ItemId)
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), -gmd.SignupCostItem.ItemNum, 0, common.GainWay_MatchSignup,
|
||||
"player", gmd.MatchName+"-报名消耗", gameId, int64(gmd.GameFreeId), false)
|
||||
}
|
||||
} else {
|
||||
BagMgrSingleton.SalePlayerItem(p, item, -gmd.SignupCostItem.ItemNum)
|
||||
//item.ItemNum += gmd.SignupCostItem.ItemNum
|
||||
//p.dirty = true
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, item.ItemId, item.Name, gmd.SignupCostItem.ItemNum, gmd.MatchName+"-报名退还")
|
||||
//BagMgrSingleton.SyncBagData(p, item.ItemId)
|
||||
BagMgrSingleton.AddItem(p, int64(item.ItemId), gmd.SignupCostItem.ItemNum, 0, common.GainWay_MatchSignup,
|
||||
"player", gmd.MatchName+"-报名退还", gameId, int64(gmd.GameFreeId), false)
|
||||
}
|
||||
} else {
|
||||
logger.Logger.Trace("道具不足")
|
||||
|
@ -995,12 +994,7 @@ func (this *Tournament) sendPromotionInfo(mc *PlayerMatchContext, sortId int32,
|
|||
ItemId: info.ItemId,
|
||||
ItemNum: int64(info.ItemNum),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(mc.p, []*Item{item}, 0, common.GainWay_MatchSystemSupply, "system", mc.tm.gmd.MatchName+"排名奖励")
|
||||
data := srvdata.PBDB_GameItemMgr.GetData(info.ItemId)
|
||||
if data != nil {
|
||||
// 背包变更记录
|
||||
BagMgrSingleton.RecordItemLog(mc.p.Platform, mc.p.SnId, ItemObtain, item.ItemId, data.Name, item.ItemNum, mc.tm.gmd.MatchName+"排名奖励")
|
||||
}
|
||||
BagMgrSingleton.AddItems(mc.p, []*Item{item}, 0, common.GainWay_MatchSystemSupply, "system", mc.tm.gmd.MatchName+"排名奖励", 0, 0, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3988,61 +3988,39 @@ func init() {
|
|||
}
|
||||
addvcoin := msg.NeedNum
|
||||
jPrice := msg.JPrice
|
||||
var items []*Item
|
||||
//V卡
|
||||
if addvcoin > 0 {
|
||||
items = append(items, &Item{ItemId: VCard, ItemNum: int64(addvcoin)})
|
||||
}
|
||||
//金券
|
||||
if jPrice > 0 {
|
||||
items = append(items, &Item{ItemId: JCard, ItemNum: int64(jPrice)})
|
||||
}
|
||||
remark := fmt.Sprintf("兑换撤单 %v-%v", msg.GoodsId, msg.Name)
|
||||
if player != nil {
|
||||
// 在线
|
||||
var items []*Item
|
||||
//V卡
|
||||
if addvcoin > 0 {
|
||||
items = append(items, &Item{ItemId: VCard, ItemNum: int64(addvcoin)})
|
||||
}
|
||||
//金券
|
||||
if jPrice > 0 {
|
||||
items = append(items, &Item{ItemId: JCard, ItemNum: int64(jPrice)})
|
||||
}
|
||||
if _, code := BagMgrSingleton.AddJybBagInfo(player, items, 0, common.GainWay_Exchange, "system", remark); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||
logger.Logger.Errorf("UpExchangeStatus AddJybBagInfo err", code)
|
||||
pack.Msg = "AddJybBagInfo err"
|
||||
if _, code, _ := BagMgrSingleton.AddItems(player, items, 0, common.GainWay_Exchange, "system", remark, 0, 0, false); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||
logger.Logger.Errorf("UpExchangeStatus AddItems err", code)
|
||||
pack.Msg = "AddItems err"
|
||||
return common.ResponseTag_ParamError, pack
|
||||
}
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
pack.Msg = "UpExchange success"
|
||||
BagMgrSingleton.RecordItemLog(player.Platform, player.SnId, ItemObtain, VCard, item.Name, int64(addvcoin), remark)
|
||||
return common.ResponseTag_Ok, pack
|
||||
} else {
|
||||
var findPlayer *model.PlayerBaseInfo
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
findPlayer = model.GetPlayerBaseInfo(platform, snid)
|
||||
if findPlayer == nil {
|
||||
pack.Tag = webapiproto.TagCode_Play_NotEXIST
|
||||
pack.Msg = fmt.Sprintf("player is not exist %v", snid)
|
||||
return errors.New("player is not exist")
|
||||
}
|
||||
newBagInfo := &model.BagInfo{
|
||||
SnId: findPlayer.SnId,
|
||||
Platform: findPlayer.Platform,
|
||||
BagItem: make(map[int32]*model.Item),
|
||||
}
|
||||
if addvcoin > 0 {
|
||||
newBagInfo.BagItem[VCard] = &model.Item{ItemId: VCard, ItemNum: int64(addvcoin)}
|
||||
}
|
||||
if jPrice > 0 {
|
||||
newBagInfo.BagItem[JCard] = &model.Item{ItemId: JCard, ItemNum: int64(jPrice)}
|
||||
}
|
||||
|
||||
return model.SaveDBBagItem(newBagInfo)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
if data == nil && findPlayer != nil {
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
pack.Msg = "UpExchange success"
|
||||
BagMgrSingleton.RecordItemLog(findPlayer.Platform, findPlayer.SnId, ItemObtain, VCard, item.Name, int64(addvcoin), remark)
|
||||
} else {
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "UpExchange failed:" + data.(error).Error()
|
||||
}
|
||||
tNode.TransRep.RetFiels = pack
|
||||
tNode.Resume()
|
||||
}), "UpExchange").Start()
|
||||
BagMgrSingleton.AddItemsOffline(platform, snid, items, common.GainWay_Exchange,
|
||||
"system", remark, 0, 0, false, func(err error) {
|
||||
if err != nil {
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "UpExchange failed:" + err.Error()
|
||||
} else {
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
pack.Msg = "UpExchange success"
|
||||
}
|
||||
tNode.TransRep.RetFiels = pack
|
||||
tNode.Resume()
|
||||
})
|
||||
return common.ResponseTag_TransactYield, pack
|
||||
}
|
||||
}))
|
||||
|
@ -4288,7 +4266,7 @@ func init() {
|
|||
})
|
||||
}
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(player, items, 0, info.GainWay, "Callback", info.Remark)
|
||||
BagMgrSingleton.AddItems(player, items, 0, info.GainWay, "Callback", info.Remark, 0, 0, false)
|
||||
switch info.Remark {
|
||||
case "BlindBox":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
|
|
@ -513,6 +513,19 @@ func (this *WelfareMgr) GetTurnplteVideo(p *Player) {
|
|||
// isVideo 看视频了,计算看视频加成
|
||||
func DrawWelfareDate(dates []*webapi_proto.WelfareDate, p *Player, gainWay int32, oper, remark string, isVideo bool) {
|
||||
// 注意dates只能读,不能写
|
||||
giveType := int32(-1)
|
||||
switch gainWay {
|
||||
case common.GainWay_VIPGift:
|
||||
giveType = model.SystemFreeGive_GiveType_VipGift
|
||||
case common.GainWay_ActTurnplate:
|
||||
giveType = model.SystemFreeGive_GiveType_ActTurnplate
|
||||
case common.GainWay_ActSignNew:
|
||||
if remark == "新七日签到" {
|
||||
giveType = model.SystemFreeGive_GiveType_ActSign
|
||||
} else { //累签
|
||||
giveType = model.SystemFreeGive_GiveType_ActContinuousSign
|
||||
}
|
||||
}
|
||||
for _, v := range dates {
|
||||
switch v.Type {
|
||||
case 1: //金币
|
||||
|
@ -528,19 +541,6 @@ func DrawWelfareDate(dates []*webapi_proto.WelfareDate, p *Player, gainWay int32
|
|||
}
|
||||
|
||||
p.AddCoin(coin, add, gainWay, oper, remark)
|
||||
giveType := int32(-1)
|
||||
switch gainWay {
|
||||
case common.GainWay_VIPGift: //vip礼包
|
||||
giveType = model.SystemFreeGive_GiveType_VipGift
|
||||
case common.GainWay_ActTurnplate: //转盘
|
||||
giveType = model.SystemFreeGive_GiveType_ActTurnplate
|
||||
case common.GainWay_ActSignNew:
|
||||
if remark == "新七日签到" {
|
||||
giveType = model.SystemFreeGive_GiveType_ActSign
|
||||
} else { //累签
|
||||
giveType = model.SystemFreeGive_GiveType_ActContinuousSign
|
||||
}
|
||||
}
|
||||
if giveType != -1 {
|
||||
if !p.IsRob {
|
||||
LogChannelSingleton.WriteMQData(model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, giveType, model.SystemFreeGive_CoinType_Coin, int64(coin)))
|
||||
|
@ -548,19 +548,6 @@ func DrawWelfareDate(dates []*webapi_proto.WelfareDate, p *Player, gainWay int32
|
|||
}
|
||||
case 2: //钻石
|
||||
p.AddDiamond(int64(v.Grade), 0, gainWay, oper, remark)
|
||||
giveType := int32(-1)
|
||||
switch gainWay {
|
||||
case common.GainWay_VIPGift:
|
||||
giveType = model.SystemFreeGive_GiveType_VipGift
|
||||
case common.GainWay_ActTurnplate:
|
||||
giveType = model.SystemFreeGive_GiveType_ActTurnplate
|
||||
case common.GainWay_ActSignNew:
|
||||
if remark == "新七日签到" {
|
||||
giveType = model.SystemFreeGive_GiveType_ActSign
|
||||
} else { //累签
|
||||
giveType = model.SystemFreeGive_GiveType_ActContinuousSign
|
||||
}
|
||||
}
|
||||
if giveType != -1 {
|
||||
if !p.IsRob {
|
||||
LogChannelSingleton.WriteMQData(model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, giveType, model.SystemFreeGive_CoinType_Diamond, int64(v.Grade)))
|
||||
|
@ -572,11 +559,7 @@ func DrawWelfareDate(dates []*webapi_proto.WelfareDate, p *Player, gainWay int32
|
|||
ItemId: v.Item_Id,
|
||||
ItemNum: int64(v.Grade),
|
||||
}
|
||||
BagMgrSingleton.AddJybBagInfo(p, []*Item{item}, 0, gainWay, oper, remark)
|
||||
itemData := srvdata.PBDB_GameItemMgr.GetData(item.ItemId)
|
||||
if itemData != nil {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, item.ItemId, itemData.Name, item.ItemNum, remark)
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, gainWay, oper, remark, 0, 0, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue