解决冲突

This commit is contained in:
sk 2024-09-21 13:46:08 +08:00
commit 4c64b96429
26 changed files with 2077 additions and 1837 deletions

View File

@ -22,6 +22,7 @@ const (
TransTypeMatchSceneChange = 1013
TransTypeMiniGameAddCoin = 1014
TransTypeServerCtrl = 1015
TranTypeAddItem = 1016 // 道具修改
)
type M2GWebTrascate struct {

View File

@ -126,6 +126,19 @@ func (svc *ItemLogSvc) GetClawdollItemLog(args *model.ClawdollItemLogReq, ret *m
return
}
func (svc *ItemLogSvc) GetItemLog(req *model.GetItemLogParam, res *model.GetItemLogRes) error {
c := ItemLogsCollection(req.Plt)
if c == nil {
return nil
}
err := c.Find(bson.M{"snid": req.SnId, "createts": bson.M{"$gt": req.Ts}}).Sort("createts").All(&res.Logs)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return err
}
return nil
}
func init() {
rpc.Register(new(ItemLogSvc))
}

View File

@ -1267,7 +1267,8 @@ func (this *Player) GetSkillAdd(id int32) int32 {
// 同步到 worldsrv
func (this *Player) AddItems(args *model.AddItemParam) {
pack := &server.PlayerChangeItems{
SnId: args.P.SnId,
SnId: args.SnId,
NoLog: args.NoLog,
}
for _, v := range args.Change {

View File

@ -1993,7 +1993,8 @@ func (this *Scene) TryBillExGameDrop(p *Player) {
itemData := srvdata.GameItemMgr.Get(p.Platform, id)
if itemData != nil {
p.AddItems(&model.AddItemParam{
P: p.PlayerData,
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: id,
@ -2035,7 +2036,8 @@ func (this *Scene) DropCollectBox(p *Player) {
if itemData != nil {
pack.Items = map[int32]int32{itemData.Id: 1}
p.AddItems(&model.AddItemParam{
P: p.PlayerData,
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: itemData.Id,

View File

@ -109,7 +109,8 @@ func (this *PlayerEx) CostPlayCoin() bool {
}
this.AddItems(&model.AddItemParam{
P: this.PlayerData,
Platform: this.Platform,
SnId: this.SnId,
Change: items,
GainWay: common.GainWayClawdollCostItem,
Operator: "system",
@ -151,7 +152,8 @@ func (this *PlayerEx) CatchCardClawdoll() bool {
}
this.AddItems(&model.AddItemParam{
P: this.PlayerData,
Platform: this.Platform,
SnId: this.SnId,
Change: items,
GainWay: common.GainWayClawdollCatch,
Operator: "system",

View File

@ -2632,7 +2632,8 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
}
}
p.AddItems(&model.AddItemParam{
P: p.PlayerData,
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWayRoomGain,
Operator: "system",

View File

@ -13,7 +13,8 @@ type BagInfo struct {
SnId int32 //玩家账号直接在这里生成
Platform string //平台
BagItem map[int32]*Item //背包数据 key为itemId
GainWay int32 `bson:"-"`
Ts int64
GainWay int32 `bson:"-"`
}
type Item struct {
@ -86,7 +87,8 @@ func SaveToDelBackupBagItem(args *BagInfo) error {
}
type AddItemParam struct {
P *PlayerData
Platform string
SnId int32
Change []*Item // 道具变化数量
Cost []*Item // 获得道具时消耗的道具数量
Add int64 // 加成数量
@ -97,3 +99,14 @@ type AddItemParam struct {
LogId string // 撤销的id,道具兑换失败
RoomConfigId int32 // 房间配置id
}
type ChangeItemParam struct {
SnId int32
ItemId int32
ItemNum int64
GainWay int32
RoomConfigId int32
GameId int64
GameFreeId int64
Cost []*Item
}

View File

@ -25,8 +25,8 @@ type ItemLog struct {
CreateTs int64 //记录时间
Remark string //备注
TypeId int32 // 变化类型
GameId int32 // 游戏id,游戏中获得时有值
GameFreeId int32 // 场次id,游戏中获得时有值
GameId int64 // 游戏id,游戏中获得时有值
GameFreeId int64 // 场次id,游戏中获得时有值
Cost []*Item // 消耗的道具
Id string // 撤销的id兑换失败
RoomConfigId int32 // 房间配置id
@ -64,8 +64,8 @@ func NewItemLogEx(param ItemParam) *ItemLog {
itemLog.CreateTs = time.Now().Unix()
itemLog.Remark = param.Remark
itemLog.TypeId = param.TypeId
itemLog.GameId = int32(param.GameId)
itemLog.GameFreeId = int32(param.GameFreeId)
itemLog.GameId = param.GameId
itemLog.GameFreeId = param.GameFreeId
itemLog.Cost = param.Cost
itemLog.Id = param.LogId
itemLog.RoomConfigId = param.RoomConfigId
@ -157,3 +157,33 @@ func GetClawdollItemLog(plt string, snid int32) (logs []ItemLog, err error) {
return
}
type GetItemLogParam struct {
Plt string
SnId int32
Ts int64
}
type GetItemLogRes struct {
Logs []*ItemLog
}
func GetItemLog(plt string, snid int32, ts int64) ([]*ItemLog, error) {
if rpcCli == nil {
logger.Logger.Warnf("rpcCli is nil")
return nil, errors.New("rpcCli is nil")
}
var ret GetItemLogRes
err := rpcCli.CallWithTimeout("ItemLogSvc.GetItemLog", &GetItemLogParam{
Plt: plt,
SnId: snid,
Ts: ts,
}, &ret, time.Second*30)
if err != nil {
logger.Logger.Errorf("GetItemLog err:%v", err)
return nil, err
}
return ret.Logs, nil
}

View File

@ -8891,6 +8891,7 @@ type PlayerChangeItems struct {
SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"`
Items []*Item `protobuf:"bytes,2,rep,name=Items,proto3" json:"Items,omitempty"` // 道具变化数量
NoLog bool `protobuf:"varint,3,opt,name=NoLog,proto3" json:"NoLog,omitempty"`
}
func (x *PlayerChangeItems) Reset() {
@ -8939,6 +8940,13 @@ func (x *PlayerChangeItems) GetItems() []*Item {
return nil
}
func (x *PlayerChangeItems) GetNoLog() bool {
if x != nil {
return x.NoLog
}
return false
}
var File_server_proto protoreflect.FileDescriptor
var file_server_proto_rawDesc = []byte{
@ -9949,199 +9957,200 @@ var file_server_proto_rawDesc = []byte{
0x22, 0x32, 0x0a, 0x0c, 0x57, 0x47, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6e,
0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x53, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x68,
0x52, 0x02, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a,
0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x2a, 0x83, 0x17, 0x0a, 0x0a, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44,
0x12, 0x16, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45,
0x52, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x42, 0x5f, 0x43, 0x55, 0x52, 0x5f, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0xe8,
0x07, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x42, 0x5f, 0x53,
0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x10, 0xe9, 0x07, 0x12, 0x17,
0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x47, 0x41, 0x54, 0x45,
0x49, 0x4e, 0x46, 0x4f, 0x10, 0xea, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x53, 0x5f, 0x44, 0x49, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0xec,
0x07, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x5f, 0x53,
0x52, 0x56, 0x43, 0x54, 0x52, 0x4c, 0x10, 0xed, 0x07, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x54,
0x41, 0x54, 0x45, 0x10, 0xf4, 0x07, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x47, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x54, 0x41, 0x47,
0x10, 0xf5, 0x07, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x53,
0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x54, 0x41, 0x47, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49,
0x43, 0x41, 0x53, 0x54, 0x10, 0xf6, 0x07, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x45,
0x10, 0xcd, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47,
0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0xce, 0x08,
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c,
0x41, 0x59, 0x45, 0x52, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x10, 0xcf, 0x08, 0x12, 0x1a, 0x0a, 0x15,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52,
0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0xd0, 0x08, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x52, 0x4f, 0x4f, 0x4d,
0x43, 0x41, 0x52, 0x44, 0x10, 0xd1, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x53, 0x43, 0x45, 0x4e,
0x45, 0x10, 0xd2, 0x08, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x44, 0x52, 0x4f, 0x50, 0x4c, 0x49, 0x4e, 0x45,
0x10, 0xd3, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47,
0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x52, 0x45, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0xd4, 0x08,
0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x47, 0x5f, 0x50, 0x4c,
0x41, 0x59, 0x45, 0x52, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x42, 0x49, 0x4e, 0x44, 0x10,
0xd5, 0x08, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x47, 0x5f,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x55, 0x4e, 0x42,
0x49, 0x4e, 0x44, 0x10, 0xd6, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e,
0x10, 0xd7, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x52,
0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x59, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x10, 0xd8, 0x08,
0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x47, 0x41,
0x4d, 0x45, 0x52, 0x45, 0x43, 0x10, 0xd9, 0x08, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x45, 0x4e,
0x54, 0x45, 0x52, 0x10, 0xda, 0x08, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x47, 0x57, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x41, 0x56,
0x45, 0x10, 0xdb, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47,
0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0xdc, 0x08, 0x12,
0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f, 0x49, 0x4e, 0x56,
0x49, 0x54, 0x45, 0x52, 0x4f, 0x42, 0x4f, 0x54, 0x10, 0xdd, 0x08, 0x12, 0x21, 0x0a, 0x1c, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x4b, 0x49,
0x43, 0x4b, 0x4f, 0x55, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x10, 0xde, 0x08, 0x12, 0x1a,
0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41,
0x4e, 0x41, 0x4c, 0x59, 0x53, 0x49, 0x53, 0x10, 0xdf, 0x08, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x43, 0x4c, 0x55, 0x42, 0x42, 0x49, 0x4c, 0x4c,
0x4d, 0x4f, 0x4e, 0x45, 0x59, 0x10, 0xe1, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x52, 0x45, 0x42, 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x4e, 0x49,
0x44, 0x10, 0xe2, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x53, 0x49, 0x54, 0x10, 0xe3, 0x08,
0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x52, 0x45,
0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x10, 0xe4, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x53, 0x54, 0x41, 0x54,
0x45, 0x10, 0xe5, 0x08, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x47, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x53,
0x43, 0x45, 0x4e, 0x45, 0x10, 0xe6, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x45, 0x4e, 0x44, 0x10, 0xe7, 0x08,
0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x46, 0x49,
0x53, 0x48, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x10, 0xe8, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x46,
0x4f, 0x52, 0x43, 0x45, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0xe9, 0x08, 0x12, 0x1e, 0x0a, 0x19,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52,
0x57, 0x49, 0x4e, 0x53, 0x4f, 0x43, 0x4f, 0x52, 0x45, 0x10, 0xea, 0x08, 0x12, 0x19, 0x0a, 0x14,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52,
0x44, 0x41, 0x54, 0x41, 0x10, 0xeb, 0x08, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x44, 0x57, 0x5f, 0x54, 0x68, 0x69, 0x72, 0x64, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0xec, 0x08, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x44, 0x5f, 0x41, 0x43, 0x4b, 0x54, 0x68, 0x69, 0x72, 0x64,
0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0xed, 0x08,
0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x57, 0x5f, 0x54, 0x68,
0x69, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10,
0xee, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f,
0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x4f, 0x4f, 0x4d,
0x10, 0xef, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52,
0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x63, 0x10, 0xf0, 0x08, 0x12, 0x19, 0x0a, 0x14,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f, 0x47, 0x61, 0x6d, 0x65, 0x44, 0x65,
0x74, 0x61, 0x69, 0x6c, 0x10, 0xf1, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x52, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10,
0xf2, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f,
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0xf3, 0x08, 0x12, 0x18,
0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x57, 0x42, 0x43, 0x74,
0x72, 0x6c, 0x43, 0x66, 0x67, 0x10, 0xf4, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x4e, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x43, 0x41, 0x52, 0x44,
0x53, 0x10, 0xdc, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47,
0x57, 0x5f, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0xdd,
0x0b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50,
0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a,
0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x4e, 0x45, 0x57, 0x4e, 0x4f,
0x54, 0x49, 0x43, 0x45, 0x10, 0xdf, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x54, 0x41, 0x54, 0x49,
0x43, 0x10, 0xe0, 0x0b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x43, 0x4f, 0x49, 0x4e, 0x50, 0x4f, 0x4f, 0x4c, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e,
0x47, 0x10, 0xe1, 0x0b, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x53, 0x45, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x42, 0x4c, 0x41, 0x43, 0x4b,
0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0xe2, 0x0b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x52, 0x45, 0x4c, 0x49, 0x45, 0x56,
0x45, 0x57, 0x42, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0xe3, 0x0b, 0x12, 0x1a, 0x0a, 0x15, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x4e, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x50,
0x41, 0x52, 0x41, 0x4d, 0x10, 0xe4, 0x0b, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52,
0x4c, 0x4f, 0x47, 0x10, 0xe5, 0x0b, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x47, 0x57, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x43, 0x4f,
0x49, 0x4e, 0x10, 0xe6, 0x0b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x57, 0x47, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x10, 0xea, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x52, 0x5f, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x44, 0x61, 0x74,
0x61, 0x10, 0xeb, 0x0b, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x61, 0x66, 0x65,
0x42, 0x6f, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xec, 0x0b, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x54, 0x43, 0x4f, 0x49,
0x4e, 0x50, 0x4f, 0x4f, 0x4c, 0x10, 0xed, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x43, 0x4c, 0x55, 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41,
0x47, 0x45, 0x10, 0xee, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x47, 0x57, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4c, 0x4f, 0x47, 0x10,
0xef, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f,
0x47, 0x41, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xf0, 0x0b, 0x12, 0x1a, 0x0a, 0x15,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x4a, 0x41, 0x43, 0x4b, 0x50, 0x4f,
0x54, 0x4c, 0x49, 0x53, 0x54, 0x10, 0xf1, 0x0b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x4a, 0x41, 0x43, 0x4b, 0x50, 0x4f, 0x54, 0x43, 0x4f, 0x49,
0x4e, 0x10, 0xf2, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47,
0x57, 0x5f, 0x4e, 0x49, 0x43, 0x45, 0x49, 0x44, 0x52, 0x45, 0x42, 0x49, 0x4e, 0x44, 0x10, 0xf3,
0x0b, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50,
0x4c, 0x41, 0x59, 0x45, 0x52, 0x57, 0x49, 0x4e, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0xf4, 0x0b, 0x12,
0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41,
0x59, 0x45, 0x52, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x41, 0x52, 0x4b, 0x54, 0x41, 0x47, 0x10, 0xf5,
0x0b, 0x12, 0x2b, 0x0a, 0x26, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x49,
0x4e, 0x56, 0x49, 0x54, 0x45, 0x52, 0x4f, 0x42, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x43, 0x4f, 0x49,
0x4e, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0xf6, 0x0b, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x47, 0x41, 0x4d, 0x45,
0x46, 0x4f, 0x52, 0x43, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0xf7, 0x0b, 0x12, 0x24, 0x0a,
0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49,
0x54, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54,
0x10, 0xf8, 0x0b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57,
0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x45, 0x56, 0x45, 0x4e,
0x54, 0x10, 0xf9, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x54, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x50, 0x41, 0x59, 0x10, 0xfa, 0x0b, 0x12, 0x20,
0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59,
0x45, 0x52, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xfb, 0x0b,
0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c,
0x41, 0x59, 0x45, 0x52, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x47, 0x52, 0x41, 0x44, 0x45, 0x10, 0xfc,
0x0b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50,
0x4c, 0x41, 0x59, 0x45, 0x52, 0x51, 0x55, 0x49, 0x54, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0xfd,
0x0b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53,
0x43, 0x45, 0x4e, 0x45, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x42, 0x41, 0x53, 0x45, 0x43, 0x48, 0x41,
0x4e, 0x47, 0x45, 0x10, 0xfe, 0x0b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x54, 0x4f, 0x50, 0x4c,
0x41, 0x59, 0x45, 0x52, 0x10, 0xff, 0x0b, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x4d, 0x41, 0x54, 0x43, 0x48,
0x52, 0x4f, 0x42, 0x10, 0x80, 0x0c, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x57, 0x47, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x4a, 0x41, 0x43, 0x4b, 0x50, 0x4f, 0x54, 0x10,
0x83, 0x0c, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x49, 0x4e, 0x49,
0x47, 0x41, 0x4d, 0x45, 0x10, 0x85, 0x0c, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4c, 0x45, 0x41, 0x56, 0x45,
0x5f, 0x4d, 0x49, 0x4e, 0x49, 0x47, 0x41, 0x4d, 0x45, 0x10, 0x86, 0x0c, 0x12, 0x23, 0x0a, 0x1e,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52,
0x4c, 0x45, 0x41, 0x56, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x49, 0x47, 0x41, 0x4d, 0x45, 0x10, 0x87,
0x0c, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44,
0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x4d, 0x49, 0x4e, 0x49, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10,
0x88, 0x0c, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x52, 0x5f,
0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0x89, 0x0c, 0x12,
0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x44, 0x54, 0x52,
0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x8a, 0x0c, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44, 0x54, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e,
0x46, 0x4f, 0x10, 0x8b, 0x0c, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x57, 0x47, 0x5f, 0x44, 0x54, 0x52, 0x4f, 0x4f, 0x4d, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53,
0x10, 0x8c, 0x0c, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57,
0x5f, 0x44, 0x54, 0x52, 0x4f, 0x4f, 0x4d, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x10, 0x8d,
0x0c, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53,
0x49, 0x4e, 0x47, 0x4c, 0x45, 0x41, 0x44, 0x4a, 0x55, 0x53, 0x54, 0x10, 0x8e, 0x0c, 0x12, 0x1e,
0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x41, 0x44, 0x44, 0x53,
0x49, 0x4e, 0x47, 0x4c, 0x45, 0x41, 0x44, 0x4a, 0x55, 0x53, 0x54, 0x10, 0x8f, 0x0c, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x42, 0x55, 0x59, 0x52,
0x45, 0x43, 0x54, 0x49, 0x4d, 0x45, 0x49, 0x54, 0x45, 0x4d, 0x10, 0x90, 0x0c, 0x12, 0x19, 0x0a,
0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x53, 0x6b, 0x69, 0x6e, 0x10, 0x91, 0x0c, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49,
0x74, 0x65, 0x6d, 0x73, 0x10, 0x92, 0x0c, 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, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x4c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x05, 0x4e, 0x6f, 0x4c, 0x6f, 0x67, 0x2a, 0x83, 0x17, 0x0a, 0x0a, 0x53, 0x53, 0x50, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x17,
0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x42, 0x5f, 0x43, 0x55, 0x52, 0x5f,
0x4c, 0x4f, 0x41, 0x44, 0x10, 0xe8, 0x07, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43,
0x48, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xea, 0x07, 0x12, 0x18, 0x0a,
0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x53, 0x5f, 0x44, 0x49, 0x43, 0x4f, 0x4e,
0x4e, 0x45, 0x43, 0x54, 0x10, 0xec, 0x07, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x4d, 0x53, 0x5f, 0x53, 0x52, 0x56, 0x43, 0x54, 0x52, 0x4c, 0x10, 0xed, 0x07, 0x12,
0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53, 0x45, 0x52,
0x56, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xf4, 0x07, 0x12, 0x1b, 0x0a, 0x16,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x47, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x47, 0x52,
0x4f, 0x55, 0x50, 0x54, 0x41, 0x47, 0x10, 0xf5, 0x07, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x53, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x54, 0x41, 0x47,
0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x43, 0x41, 0x53, 0x54, 0x10, 0xf6, 0x07, 0x12, 0x1a, 0x0a,
0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54,
0x45, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0xcd, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x53, 0x43,
0x45, 0x4e, 0x45, 0x10, 0xce, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x10,
0xcf, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0xd0, 0x08, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x42, 0x49, 0x4c, 0x4c,
0x45, 0x44, 0x52, 0x4f, 0x4f, 0x4d, 0x43, 0x41, 0x52, 0x44, 0x10, 0xd1, 0x08, 0x12, 0x1b, 0x0a,
0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52,
0x4f, 0x59, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0xd2, 0x08, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x44, 0x52,
0x4f, 0x50, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0xd3, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x52, 0x45, 0x48,
0x4f, 0x4c, 0x44, 0x10, 0xd4, 0x08, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x47, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f,
0x4e, 0x42, 0x49, 0x4e, 0x44, 0x10, 0xd5, 0x08, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x45, 0x53, 0x53,
0x49, 0x4f, 0x4e, 0x55, 0x4e, 0x42, 0x49, 0x4e, 0x44, 0x10, 0xd6, 0x08, 0x12, 0x1b, 0x0a, 0x16,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52,
0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x10, 0xd7, 0x08, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x47, 0x52, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x59, 0x52, 0x45, 0x43,
0x4f, 0x52, 0x44, 0x10, 0xd8, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x47, 0x57, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x52, 0x45, 0x43, 0x10, 0xd9, 0x08, 0x12, 0x1c,
0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x41, 0x55, 0x44, 0x49,
0x45, 0x4e, 0x43, 0x45, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x10, 0xda, 0x08, 0x12, 0x1c, 0x0a, 0x17,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e,
0x43, 0x45, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0xdb, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x53, 0x54, 0x41,
0x52, 0x54, 0x10, 0xdc, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x57, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x52, 0x4f, 0x42, 0x4f, 0x54, 0x10, 0xdd,
0x08, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x41,
0x47, 0x45, 0x4e, 0x54, 0x4b, 0x49, 0x43, 0x4b, 0x4f, 0x55, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45,
0x52, 0x10, 0xde, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x4e, 0x41, 0x4c, 0x59, 0x53, 0x49, 0x53, 0x10, 0xdf, 0x08,
0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x43, 0x4c,
0x55, 0x42, 0x42, 0x49, 0x4c, 0x4c, 0x4d, 0x4f, 0x4e, 0x45, 0x59, 0x10, 0xe1, 0x08, 0x12, 0x1a,
0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x52, 0x45, 0x42, 0x49,
0x4e, 0x44, 0x5f, 0x53, 0x4e, 0x49, 0x44, 0x10, 0xe2, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45,
0x53, 0x49, 0x54, 0x10, 0xe3, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x57, 0x47, 0x5f, 0x52, 0x45, 0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x10, 0xe4, 0x08, 0x12,
0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45,
0x4e, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe5, 0x08, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x47, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x44, 0x45,
0x53, 0x54, 0x52, 0x4f, 0x59, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0xe6, 0x08, 0x12, 0x17, 0x0a,
0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45,
0x45, 0x4e, 0x44, 0x10, 0xe7, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x47, 0x57, 0x5f, 0x46, 0x49, 0x53, 0x48, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x10, 0xe8,
0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50,
0x4c, 0x41, 0x59, 0x45, 0x52, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10,
0xe9, 0x08, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x57, 0x49, 0x4e, 0x53, 0x4f, 0x43, 0x4f, 0x52, 0x45, 0x10,
0xea, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x44, 0x41, 0x54, 0x41, 0x10, 0xeb, 0x08, 0x12, 0x21, 0x0a,
0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x57, 0x5f, 0x54, 0x68, 0x69, 0x72, 0x64,
0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0xec, 0x08,
0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x44, 0x5f, 0x41, 0x43,
0x4b, 0x54, 0x68, 0x69, 0x72, 0x64, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x10, 0xed, 0x08, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x44, 0x57, 0x5f, 0x54, 0x68, 0x69, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0xee, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x43, 0x52, 0x45, 0x41,
0x54, 0x45, 0x52, 0x4f, 0x4f, 0x4d, 0x10, 0xef, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x63, 0x10,
0xf0, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f,
0x47, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x10, 0xf1, 0x08, 0x12, 0x19, 0x0a,
0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x52, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0xf2, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x45, 0x41, 0x56,
0x45, 0x10, 0xf3, 0x08, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x57, 0x42, 0x43, 0x74, 0x72, 0x6c, 0x43, 0x66, 0x67, 0x10, 0xf4, 0x08, 0x12, 0x1a,
0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x4e, 0x5f, 0x50, 0x4c, 0x41, 0x59,
0x45, 0x52, 0x43, 0x41, 0x52, 0x44, 0x53, 0x10, 0xdc, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x53,
0x43, 0x45, 0x4e, 0x45, 0x10, 0xdd, 0x0b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x54, 0x41, 0x54, 0x45,
0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57,
0x5f, 0x4e, 0x45, 0x57, 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0xdf, 0x0b, 0x12, 0x1b, 0x0a,
0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45,
0x52, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0xe0, 0x0b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x43, 0x4f, 0x49, 0x4e, 0x50, 0x4f, 0x4f, 0x4c,
0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x10, 0xe1, 0x0b, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53, 0x45, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45,
0x52, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0xe2, 0x0b, 0x12, 0x21,
0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x41, 0x55, 0x54, 0x4f,
0x52, 0x45, 0x4c, 0x49, 0x45, 0x56, 0x45, 0x57, 0x42, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0xe3,
0x0b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x4e, 0x5f, 0x50,
0x4c, 0x41, 0x59, 0x45, 0x52, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x10, 0xe4, 0x0b, 0x12, 0x1d, 0x0a,
0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4c, 0x4f, 0x47, 0x10, 0xe5, 0x0b, 0x12, 0x1d, 0x0a, 0x18,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x50, 0x4c,
0x41, 0x59, 0x45, 0x52, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0xe6, 0x0b, 0x12, 0x20, 0x0a, 0x1b, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f,
0x6e, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xea, 0x0b, 0x12, 0x1b, 0x0a,
0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x52, 0x5f, 0x47, 0x61, 0x6d, 0x65, 0x46,
0x72, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x10, 0xeb, 0x0b, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x53, 0x61, 0x66, 0x65, 0x42, 0x6f, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xec, 0x0b,
0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x52, 0x45,
0x53, 0x45, 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x50, 0x4f, 0x4f, 0x4c, 0x10, 0xed, 0x0b, 0x12, 0x1b,
0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x43, 0x4c, 0x55, 0x42,
0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0xee, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x53, 0x54, 0x41,
0x54, 0x45, 0x4c, 0x4f, 0x47, 0x10, 0xef, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10,
0xf0, 0x0b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f,
0x4a, 0x41, 0x43, 0x4b, 0x50, 0x4f, 0x54, 0x4c, 0x49, 0x53, 0x54, 0x10, 0xf1, 0x0b, 0x12, 0x1a,
0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x4a, 0x41, 0x43, 0x4b,
0x50, 0x4f, 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0xf2, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x4e, 0x49, 0x43, 0x45, 0x49, 0x44, 0x52, 0x45,
0x42, 0x49, 0x4e, 0x44, 0x10, 0xf3, 0x0b, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x57, 0x49, 0x4e, 0x43, 0x4f,
0x49, 0x4e, 0x10, 0xf4, 0x0b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x41, 0x52,
0x4b, 0x54, 0x41, 0x47, 0x10, 0xf5, 0x0b, 0x12, 0x2b, 0x0a, 0x26, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x52, 0x4f, 0x42, 0x45, 0x4e,
0x54, 0x45, 0x52, 0x43, 0x4f, 0x49, 0x4e, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x51, 0x55, 0x45, 0x55,
0x45, 0x10, 0xf6, 0x0b, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54,
0x10, 0xf7, 0x0b, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47,
0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x43,
0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x10, 0xf8, 0x0b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x53, 0x43, 0x45,
0x4e, 0x45, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0xf9, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x54, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x50, 0x41,
0x59, 0x10, 0xfa, 0x0b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47,
0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x42, 0x49, 0x4c,
0x4c, 0x45, 0x44, 0x10, 0xfb, 0x0b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x47, 0x57, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x47,
0x52, 0x41, 0x44, 0x45, 0x10, 0xfc, 0x0b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x51, 0x55, 0x49, 0x54, 0x4d,
0x41, 0x54, 0x43, 0x48, 0x10, 0xfd, 0x0b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53, 0x43, 0x45, 0x4e, 0x45, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x42,
0x41, 0x53, 0x45, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0xfe, 0x0b, 0x12, 0x1f, 0x0a, 0x1a,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45,
0x43, 0x54, 0x54, 0x4f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x10, 0xff, 0x0b, 0x12, 0x1d, 0x0a,
0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54,
0x45, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x52, 0x4f, 0x42, 0x10, 0x80, 0x0c, 0x12, 0x1a, 0x0a, 0x15,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x4a, 0x41,
0x43, 0x4b, 0x50, 0x4f, 0x54, 0x10, 0x83, 0x0c, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x45, 0x4e, 0x54, 0x45,
0x52, 0x5f, 0x4d, 0x49, 0x4e, 0x49, 0x47, 0x41, 0x4d, 0x45, 0x10, 0x85, 0x0c, 0x12, 0x23, 0x0a,
0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45,
0x52, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x49, 0x47, 0x41, 0x4d, 0x45, 0x10,
0x86, 0x0c, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f,
0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x49,
0x47, 0x41, 0x4d, 0x45, 0x10, 0x87, 0x0c, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x4d, 0x49, 0x4e, 0x49,
0x53, 0x43, 0x45, 0x4e, 0x45, 0x10, 0x88, 0x0c, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x52, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x53, 0x43, 0x45,
0x4e, 0x45, 0x10, 0x89, 0x0c, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x57, 0x47, 0x5f, 0x44, 0x54, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x8a, 0x0c,
0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44, 0x54,
0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x8b, 0x0c, 0x12, 0x1c, 0x0a, 0x17, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47, 0x5f, 0x44, 0x54, 0x52, 0x4f, 0x4f, 0x4d, 0x52,
0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x10, 0x8c, 0x0c, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x47, 0x57, 0x5f, 0x44, 0x54, 0x52, 0x4f, 0x4f, 0x4d, 0x52, 0x45, 0x53,
0x55, 0x4c, 0x54, 0x53, 0x10, 0x8d, 0x0c, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x57, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x41, 0x44, 0x4a, 0x55, 0x53,
0x54, 0x10, 0x8e, 0x0c, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47,
0x57, 0x5f, 0x41, 0x44, 0x44, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x41, 0x44, 0x4a, 0x55, 0x53,
0x54, 0x10, 0x8f, 0x0c, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57,
0x47, 0x5f, 0x42, 0x55, 0x59, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4d, 0x45, 0x49, 0x54, 0x45, 0x4d,
0x10, 0x90, 0x0c, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x57, 0x47,
0x5f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x69, 0x6e, 0x10, 0x91, 0x0c, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x10, 0x92, 0x0c, 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, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -1023,4 +1023,5 @@ message WGUpdateSkin{
message PlayerChangeItems{
int32 SnId = 1;
repeated Item Items = 2; //
bool NoLog = 3;
}

View File

@ -71,11 +71,18 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
if common.Config.IsDevMode {
if msg.GetOpt() == -1 {
items := []*Item{{
items := []*model.Item{{
ItemId: msg.ItemId,
ItemNum: int64(msg.ItemNum),
}}
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_ItemUse, "system", "测试", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWay_ItemUse,
Operator: "system",
Remark: "测试",
})
return nil
}
}
@ -111,7 +118,7 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
case ItemCanUse:
logger.Logger.Trace("道具使用", msg.ItemId)
items := map[int32]*Item{}
items := map[int32]*model.Item{}
var useFunc func()
saleFunc := func(gainWay int32, oper, remark string) {
if gainWay == 0 {
@ -124,7 +131,19 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
remark = "道具使用"
}
// 使用道具,减少道具
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-msg.ItemNum), 0, gainWay, oper, remark, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-msg.ItemNum),
},
},
GainWay: gainWay,
Operator: oper,
Remark: remark,
})
pack.RetCode = bag.OpResultCode_OPRC_Sucess
pack.NowItemId = item.ItemId
pack.NowItemNum = item.ItemNum
@ -143,11 +162,18 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
remark = "道具使用"
}
if len(items) > 0 {
var itemArr []*Item
var itemArr []*model.Item
for _, v := range items {
itemArr = append(itemArr, v)
}
BagMgrSingleton.AddItems(p, itemArr, 0, gainWay, oper, remark, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: itemArr,
GainWay: gainWay,
Operator: oper,
Remark: remark,
})
for _, v := range itemArr {
pack.Infos = append(pack.Infos, &bag.ItemInfo{
ItemId: v.ItemId,
@ -190,7 +216,7 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
if vv > 0 {
item, ok := items[int32(k)]
if !ok {
items[int32(k)] = &Item{
items[int32(k)] = &model.Item{
ItemId: int32(k),
ItemNum: vv,
ObtainTime: ts,
@ -224,7 +250,7 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
if vv > 0 {
item, ok := items[int32(k)]
if !ok {
items[int32(k)] = &Item{
items[int32(k)] = &model.Item{
ItemId: int32(k),
ItemNum: vv,
ObtainTime: ts,
@ -252,8 +278,19 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
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)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-msg.ItemNum),
},
},
GainWay: common.GainWay_ItemMove,
Operator: "player",
Remark: remark,
})
pack.RetCode = bag.OpResultCode_OPRC_Sucess
pack.NowItemId = msg.ItemId
pack.NowItemNum = item.ItemNum
@ -266,8 +303,19 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
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)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-msg.ItemNum),
},
},
GainWay: common.GainWay_ItemMove,
Operator: "player",
Remark: remark,
})
pack.RetCode = bag.OpResultCode_OPRC_Sucess
pack.NowItemId = msg.ItemId
pack.NowItemNum = item.ItemNum
@ -283,7 +331,19 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
logger.Logger.Trace("道具出售", msg.ItemId)
if msg.ItemNum > 0 {
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)
_, _, isF := BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-msg.ItemNum),
},
},
GainWay: common.GainWay_Item_Sale,
Operator: "player",
Remark: remark,
})
if isF {
pack.RetCode = bag.OpResultCode_OPRC_Sucess
if item.SaleGold > 0 {
@ -309,8 +369,9 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
send()
return nil
}
bagInfo, _, isF := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
bagInfo, _, isF := BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: msg.GetItemId(),
@ -334,8 +395,9 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
logger.Logger.Trace("道具分解", msg.ItemId)
itemInfo := srvdata.GameItemMgr.Get(p.Platform, msg.ItemId)
if msg.ItemNum > 0 && itemInfo != nil {
_, _, isF := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
_, _, isF := BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: msg.GetItemId(),
@ -358,9 +420,10 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
})
}
}
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
Change: changeItems,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: changeItems,
Cost: []*model.Item{
{
ItemId: msg.GetItemId(),
@ -452,8 +515,8 @@ func CSPropExchange(s *netlib.Session, packetid int, data interface{}, sid int64
return nil
}
// 检查背包是否足够
var items []*Item
var costItems []*Item
var items []*model.Item
var costItems []*model.Item
for k, v := range info.GetCost() {
item := BagMgrSingleton.GetItem(p.SnId, int32(k))
if item == nil || item.ItemNum < v {
@ -462,29 +525,46 @@ func CSPropExchange(s *netlib.Session, packetid int, data interface{}, sid int64
}
info := srvdata.GameItemMgr.Get(p.Platform, int32(k))
if info != nil {
costItems = append(costItems, &Item{
costItems = append(costItems, &model.Item{
ItemId: int32(k),
ItemNum: v,
Name: info.Name,
})
}
}
for k, v := range info.GetGain() {
info := srvdata.GameItemMgr.Get(p.Platform, int32(k))
if info != nil {
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: int32(k),
ItemNum: v,
Name: info.Name,
})
}
}
// 扣除背包物品
for _, item := range costItems {
BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWayItemCollectExchange, "system", "集卡活动兑换", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: -item.ItemNum,
},
},
GainWay: common.GainWayItemCollectExchange,
Operator: "system",
Remark: "集卡活动兑换",
})
}
// 增加背包物品
BagMgrSingleton.AddItems(p, items, 0, common.GainWayItemCollectExchange, "system", "集卡活动兑换", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWayItemCollectExchange,
Operator: "system",
Remark: "集卡活动兑换",
})
for _, v := range items {
pack.Items = append(pack.Items, &bag.PropInfo{
ItemId: v.ItemId,
@ -530,8 +610,9 @@ func CSDollChange(s *netlib.Session, packetid int, data interface{}, sid int64)
continue
}
bagInfo, rest, isF := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
bagInfo, rest, isF := BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.GetItemId(),

View File

@ -143,14 +143,28 @@ func (this *CSRisingStarHandler) Process(s *netlib.Session, packetid int, data i
return nil
}
}
if role == nil {
logger.Logger.Tracef("人物不存在")
return nil
}
//背包数据处理
item := BagMgrSingleton.GetItem(p.SnId, role.Fragment)
if item != nil {
// item.ItemNum -= role.Amount
if item != nil && item.ItemNum >= int64(role.Amount) {
role.HaveAmount -= role.Amount
remark := role.Name + "升星"
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-role.Amount), 0, common.GainWay_RoleUpgrade,
"player", remark, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-role.Amount),
},
},
GainWay: common.GainWay_RoleUpgrade,
Operator: "player",
Remark: remark,
})
//人物模型状态处理
p.Roles.ModUnlock[msg.RisingModId]++
FriendMgrSington.UpdateInfo(p.Platform, p.SnId)
@ -177,15 +191,27 @@ func (this *CSRisingStarHandler) Process(s *netlib.Session, packetid int, data i
return nil
}
}
if pet == nil {
logger.Logger.Tracef("宠物不存在")
return nil
}
//背包数据处理
item := BagMgrSingleton.GetItem(p.SnId, pet.Fragment)
if item != nil {
// item.ItemNum -= pet.Amount
if item != nil && item.ItemNum >= int64(pet.Amount) {
pet.HaveAmount -= pet.Amount
remark := pet.Name + "升星"
BagMgrSingleton.AddItem(p, int64(item.ItemId), int64(-pet.Amount), 0, common.GainWay_PetUpgrade,
"player", remark, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-pet.Amount),
},
},
GainWay: common.GainWay_PetUpgrade,
Operator: "player",
Remark: remark,
})
p.Pets.ModUnlock[msg.RisingModId]++
FriendMgrSington.UpdateInfo(p.Platform, p.SnId)
p.dirty = true
@ -193,7 +219,6 @@ func (this *CSRisingStarHandler) Process(s *netlib.Session, packetid int, data i
SendInfoPet(pets.OpResultCode_OPRC_Sucess, PetMgrSington.GetPetInfo(p, msg.RisingModId))
}
}
}
return nil
}
@ -301,9 +326,19 @@ func (this *CSRolePetUnlockHandler) Process(s *netlib.Session, packetid int, dat
item := BagMgrSingleton.GetItem(p.SnId, roleInfo.Fragment)
if item != nil && 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)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-roleInfo.Amount),
},
},
GainWay: common.GainWay_RoleUpgrade,
Operator: "player",
Remark: remark,
})
p.Roles.ModUnlock[msg.UseModId] = 1
if p.Roles.Mod[msg.UseModId] == nil {
p.Roles.Mod[msg.UseModId] = &model.ModEx{}
@ -326,9 +361,19 @@ func (this *CSRolePetUnlockHandler) Process(s *netlib.Session, packetid int, dat
item := BagMgrSingleton.GetItem(p.SnId, petInfo.Fragment)
if item != nil && 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)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: int64(-petInfo.Amount),
},
},
GainWay: common.GainWay_PetUpgrade,
Operator: "player",
Remark: remark,
})
p.Pets.ModUnlock[msg.UseModId] = 1
if p.Pets.Mod[msg.UseModId] == nil {
p.Pets.Mod[msg.UseModId] = &model.ModEx{}
@ -395,17 +440,24 @@ func (this *CSPetSkillLevelUpHandler) Process(s *netlib.Session, packetid int, d
}
//消耗道具
itemCon := SkillInfo.ItemConsum
var items []*Item
var items []*model.Item
for itemId, itemNum := range itemCon {
if itemNum == 0 {
if itemNum <= 0 {
return nil
}
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: int32(itemId),
ItemNum: -itemNum,
})
}
_, _, isF := BagMgrSingleton.AddItems(p, items, 0, common.GainWayPetSkillLevelUp, "system", "宠物技能升级消耗", 0, 0, false)
_, _, isF := BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWayPetSkillLevelUp,
Operator: "system",
Remark: "宠物技能升级消耗",
})
if isF {
p.Pets.SkillInfo[petId][skillId] = level + 1
if level == 0 {
@ -543,8 +595,9 @@ func CSSkinUpgrade(s *netlib.Session, packetid int, data interface{}, sid int64)
ItemNum: -v.GetN(),
})
}
_, _, ok = BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
_, _, ok = BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: change,
Add: 0,
GainWay: common.GainWaySkinUpGrade,
@ -597,8 +650,9 @@ func SkinUnLock(p *Player, id int32) (*pets.SkinInfo, pets.OpResultCode) {
ItemNum: -v.GetN(),
})
}
_, _, ok := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
_, _, ok := BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: change,
Add: 0,
GainWay: common.GainWaySkinUnLock,

View File

@ -99,7 +99,7 @@ func (this *CSPhoneLotteryHandler) Process(s *netlib.Session, packetid int, data
p.addLotteryCount(-count)
pool := srvdata.PBDB_PhoneLotteryMgr.Datas.GetArr()
pack := &player_proto.SCPhoneLottery{}
items := make([]*Item, 0)
items := make([]*model.Item, 0)
for i := 1; i <= int(count); i++ {
//抽奖
rate := 0
@ -167,7 +167,7 @@ func (this *CSPhoneLotteryHandler) Process(s *netlib.Session, packetid int, data
itemArr.ItemId = lottery.Item_Id
itemArr.ItemNum = int64(lottery.Grade)
itemArr.Id = lottery.Id
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: lottery.Item_Id, // 物品id
ItemNum: int64(lottery.Grade), // 数量
})
@ -178,7 +178,14 @@ func (this *CSPhoneLotteryHandler) Process(s *netlib.Session, packetid int, data
}
}
//增加到玩家背包
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_PhoneScore, "system", "玩游戏积分", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWay_PhoneScore,
Operator: "system",
Remark: "玩游戏积分",
})
pack.Count = p.LotteryCount
pack.PhoneScore = p.PhoneScore
logger.Logger.Tracef("获取玩家抽奖权重 score = %d,抽奖获得的物品:%v", p.PhoneScore, pack)
@ -389,9 +396,10 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
}
}
}
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
Change: items,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
Cost: []*model.Item{
{
ItemId: common.ItemIDDiamond,
@ -462,8 +470,8 @@ func (this *CSDiamondLotteryLuckyAwardHandler) Process(s *netlib.Session, packet
//获取奖励
for _, lotteryInfo := range config.Info {
if lotteryInfo.Type == 2 {
var items []*Item
items = append(items, &Item{
var items []*model.Item
items = append(items, &model.Item{
ItemId: lotteryInfo.ItemId, // 物品id
ItemNum: int64(lotteryInfo.Grade), // 数量
})
@ -472,7 +480,14 @@ func (this *CSDiamondLotteryLuckyAwardHandler) Process(s *netlib.Session, packet
ItemId: lotteryInfo.ItemId,
ItemNum: int64(lotteryInfo.Grade),
}
BagMgrSingleton.AddItems(p, items, 0, common.GainWayDiamondLottery, "system", "钻石抽奖保底奖励", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWayDiamondLottery,
Operator: "system",
Remark: "钻石抽奖保底奖励",
})
pack.Item = append(pack.Item, itemData)
break
}

View File

@ -1691,15 +1691,15 @@ func (this *CSPlayerVIPBuyPacketFactory) CreatePacket() interface{} {
func (this *CSPlayerVIPBuyHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
logger.Logger.Trace("CSVIPBuy Process recv ", data)
if msg, ok := data.(*player_proto.CSVIPBuy); ok {
p := PlayerMgrSington.GetPlayer(sid)
if p == nil {
logger.Logger.Warn("CSPlayerVIPBuyHandler p == nil")
return nil
}
p.SCVIPBuy(int64(msg.GetMoney()))
}
//if msg, ok := data.(*player_proto.CSVIPBuy); ok {
// p := PlayerMgrSington.GetPlayer(sid)
// if p == nil {
// logger.Logger.Warn("CSPlayerVIPBuyHandler p == nil")
// return nil
// }
//
// p.SCVIPBuy(int64(msg.GetMoney()))
//}
return nil
}
@ -1722,7 +1722,7 @@ func (this *CSPlayerVIPInfoHandler) Process(s *netlib.Session, packetid int, dat
logger.Logger.Warn("CSPlayerVIPInfoHandler p == nil")
return nil
}
p.SCVIPInfo()
p.GetVIPLevel()
}
return nil
}
@ -3124,8 +3124,9 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
send()
// 获得10v卡
if p.GuideStep == 2 {
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: common.ItemIDVCard,
@ -3176,8 +3177,9 @@ func CSClawdollItemLog(s *netlib.Session, packetId int, data interface{}, sid in
ItemNum: 3,
})
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: change,
Add: 0,
GainWay: common.GainWayItemShopChangeDoll,

View File

@ -251,11 +251,22 @@ func CSRMAward(s *netlib.Session, packetId int, data interface{}, sid int64) err
}
default:
//道具
item := &Item{
ItemId: v.Id,
ItemNum: int64(v.Num),
}
BagMgrSingleton.AddItems(p, []*Item{item}, 0, common.GainWay_RankMatch, "system", "段位奖励", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: v.Id,
ItemNum: int64(v.Num),
},
},
Add: 0,
GainWay: common.GainWay_RankMatch,
Operator: "system",
Remark: "段位奖励",
GameId: 0,
GameFreeId: 0,
})
}
}
}

View File

@ -615,37 +615,6 @@ func init() {
}
return nil
}))
// 同步道具数量
netlib.Register(int(serverproto.SSPacketID_PACKET_PlayerChangeItems), &serverproto.PlayerChangeItems{}, HandlePlayerChangeItems)
}
func HandlePlayerChangeItems(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("HandlePlayerChangeItems recv %v", data)
msg, ok := data.(*serverproto.PlayerChangeItems)
if !ok {
return nil
}
p := PlayerMgrSington.GetPlayerBySnId(msg.GetSnId())
if p == nil {
return nil
}
var items []*model.Item
for _, v := range msg.GetItems() {
items = append(items, &model.Item{
ItemId: v.GetId(),
ItemNum: v.GetNum(),
})
}
_, _, ok = BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
Change: items,
NoLog: true,
})
if !ok {
logger.Logger.Errorf("HandlePlayerChangeItems add item failed %v", msg)
}
return nil
}
// 机器人服务器向worldsrv发送
@ -786,3 +755,37 @@ func init() {
common.RegisterHandler(int(loginproto.LoginPacketID_PACKET_CS_ACCOUNTINVALID), &CSAccountInvalidHandler{})
netlib.RegisterFactory(int(loginproto.LoginPacketID_PACKET_CS_ACCOUNTINVALID), &CSAccountInvalidPacketFactory{})
}
func init() {
// 同步道具数量
netlib.Register(int(serverproto.SSPacketID_PACKET_PlayerChangeItems), &serverproto.PlayerChangeItems{}, HandlePlayerChangeItems)
}
func HandlePlayerChangeItems(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("HandlePlayerChangeItems recv %v", data)
msg, ok := data.(*serverproto.PlayerChangeItems)
if !ok {
return nil
}
p := PlayerMgrSington.GetPlayerBySnId(msg.GetSnId())
if p == nil {
return nil
}
var items []*model.Item
for _, v := range msg.GetItems() {
items = append(items, &model.Item{
ItemId: v.GetId(),
ItemNum: v.GetNum(),
})
}
_, _, ok = BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
NoLog: msg.GetNoLog(),
})
if !ok {
logger.Logger.Errorf("HandlePlayerChangeItems add item failed %v", msg)
}
return nil
}

View File

@ -82,7 +82,7 @@ func IsTaskReward(p *Player, id int32) bool {
func SendReward(p *Player, m map[int64]int64, tp int32) {
isPermit := p.GetIsPermit()
add := p.GetSkillAdd(common.SkillIdTask)
var items []*Item
var items []*model.Item
for k, v := range m {
if k == common.ItemIDPermit && isPermit {
v += int64(float64(v) * common.PermitAdd)
@ -91,7 +91,7 @@ func SendReward(p *Player, m map[int64]int64, tp int32) {
if tp == common.TaskActivityTypeEveryDay && add > 0 && k == common.ItemIDCoin {
v += int64((float64(v) * float64(add)) / 100.0)
}
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: int32(k),
ItemNum: v,
})
@ -118,7 +118,17 @@ func SendReward(p *Player, m map[int64]int64, tp int32) {
gain = common.GainWayItemTaskPermit
giveType = model.SystemFreeGive_GiveType_TaskPermit
}
BagMgrSingleton.AddItems(p, items, 0, gain, "system", "任务奖励", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
Add: 0,
GainWay: gain,
Operator: "system",
Remark: "任务奖励",
GameId: 0,
GameFreeId: 0,
})
for _, v := range items {
tp := int32(-1)
if v.ItemId == common.ItemIDCoin {

View File

@ -542,9 +542,9 @@ func IsPermitCanReward(p *Player, id int32) bool {
// SendPermitReward 发赛季通行证奖励
// tp 1普通2典藏
func SendPermitReward(p *Player, m map[int64]int64, tp int32) {
var items []*Item
var items []*model.Item
for k, v := range m {
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: int32(k),
ItemNum: v,
})
@ -559,7 +559,17 @@ func SendPermitReward(p *Player, m map[int64]int64, tp int32) {
gain = common.GainWayPermitAward
giveType = model.SystemFreeGive_GiveType_PermitAward
}
BagMgrSingleton.AddItems(p, items, 0, gain, "system", "通行证奖励", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
Add: 0,
GainWay: gain,
Operator: "system",
Remark: "通行证奖励",
GameId: 0,
GameFreeId: 0,
})
for _, v := range items {
tp1 := int32(-1)
if v.ItemId == common.ItemIDCoin {
@ -1051,9 +1061,8 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
if exchangeConfig != nil {
// 检查背包是否足够
var items []*model.Item
var costItems []*Item
var costItems, cost1 []*model.Item
var cost, gain []model.AwardItem
var cost1 []*model.Item
for _, v := range exchangeConfig.GetCost() {
item := BagMgrSingleton.GetItem(p.SnId, v.GetItemId())
if item == nil || item.ItemNum < v.GetItemNum() {
@ -1062,10 +1071,9 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
}
info := srvdata.GameItemMgr.Get(p.Platform, v.GetItemId())
if info != nil {
costItems = append(costItems, &Item{
costItems = append(costItems, &model.Item{
ItemId: v.GetItemId(),
ItemNum: v.GetItemNum(),
Name: info.Name,
ItemNum: -v.GetItemNum(),
})
cost = append(cost, model.AwardItem{
Id: v.GetItemId(),
@ -1091,13 +1099,18 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
}
}
// 扣除背包物品
for _, item := range costItems {
BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0,
common.GainWayPermitExchangeCost, "system", "赛季通行证兑换消耗", 0, 0, false)
}
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: costItems,
GainWay: common.GainWayPermitExchangeCost,
Operator: "system",
Remark: "赛季通行证兑换消耗",
})
// 增加背包物品
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
Cost: cost1,
Add: 0,

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,6 @@ import (
"mongo.games.com/game/protocol/rankmatch"
serverproto "mongo.games.com/game/protocol/server"
shopproto "mongo.games.com/game/protocol/shop"
webapiproto "mongo.games.com/game/protocol/webapi"
"mongo.games.com/game/srvdata"
"mongo.games.com/game/worldsrv/internal"
)
@ -264,7 +263,7 @@ func (this *Player) LoadAfter() {
}
v.CallbackAfter(replays[k])
}
})).StartByFixExecutor(fmt.Sprintf("Player%v", this.SnId))
})).StartByExecutor(fmt.Sprintf("Player%v", this.SnId))
}
func (this *Player) OnLogined() {
@ -310,13 +309,7 @@ func (this *Player) OnLogined() {
this.SetOnline()
//测试用
if !this.IsRob {
old := this.VIP
this.VIP = this.GetVIPLevel()
if old != this.VIP {
this.dirty = true
}
} else {
if this.IsRob {
this.VIP = rand.Int31n(6) + 1
//机器人随机vip和头像
this.RobRandVip()
@ -1116,9 +1109,8 @@ func (this *Player) GetMessageAttach(id string) {
}
return gift
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
attach_msg, ok := data.(*model.Message)
dirtyCoin := int64(0)
if ok && attach_msg != nil {
attachMsg, ok := data.(*model.Message)
if ok && attachMsg != nil {
msg.AttachState = model.MSGATTACHSTATE_GOT
notifyClient := true
var remark string
@ -1126,10 +1118,10 @@ func (this *Player) GetMessageAttach(id string) {
// 领取道具
addItem := func() {
items := make([]*Item, 0)
items := make([]*model.Item, 0)
if num := len(msg.Params); num > 0 && num%2 == 0 {
for i := 0; i < num; i += 2 {
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: msg.Params[i], // 物品id
ItemNum: int64(msg.Params[i+1]), // 数量
ObtainTime: time.Now().Unix(),
@ -1148,14 +1140,14 @@ func (this *Player) GetMessageAttach(id string) {
}
}
}
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 := &msgproto.SCGetMessageAttach{
Id: proto.String(""),
}
proto.SetDefaults(pack)
this.SendToClient(int(msgproto.MSGPacketID_PACKET_SC_GETMESSAGEATTACH), pack)
}
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: items,
GainWay: gainWay,
Operator: "mail",
Remark: remark,
})
this.dirty = true
}
}
@ -1164,29 +1156,24 @@ func (this *Player) GetMessageAttach(id string) {
case model.MSGTYPE_ITEM:
remark = "领取道具"
gainWay = common.GainWay_MAIL_MTEM
dirtyCoin = msg.Coin
addItem()
case model.MSGTYPE_IOSINSTALLSTABLE:
remark = "IOS下载稳定版本"
gainWay = common.GainWay_IOSINSTALLSTABLE
dirtyCoin = msg.Coin
case model.MSGTYPE_GIFT:
remark = "礼物"
case model.MSGTYPE_GOLDCOMERANK:
remark = "财神降临奖励"
gainWay = common.GainWay_GoldCome
notifyClient = false
dirtyCoin = msg.Coin
case model.MSGTYPE_RANDCOIN:
remark = "红包雨"
gainWay = common.GainWay_OnlineRandCoin
notifyClient = false
dirtyCoin = msg.Coin
case model.MSGTYPE_REBATE:
remark = "流水返利"
gainWay = common.GainWay_RebateTask
notifyClient = false
dirtyCoin = msg.Coin
//邮件领取 添加日志
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
return model.InsertRebateLog(this.Platform, &model.Rebate{
@ -1234,8 +1221,6 @@ func (this *Player) GetMessageAttach(id string) {
}
if msg.Coin > 0 {
this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark)
//增加泥码
this.AddDirtyCoin(0, dirtyCoin)
//俱乐部获取不算系统赠送
if msg.MType != model.MSGTYPE_ClubGet {
this.ReportSystemGiveEvent(int32(msg.Coin), gainWay, notifyClient) //邮件附件算是系统赠送
@ -1278,182 +1263,6 @@ func (this *Player) GetMessageAttach(id string) {
}
}
// 一键领取
func (this *Player) GetMessageAttachs(ids []string) {
var msgs []*model.Message
var Ids []string // 可以领取的邮件
var platform string
for _, id := range ids {
if msg, exist := this.msgs[id]; exist {
if msg.AttachState == model.MSGATTACHSTATE_DEFAULT && (msg.Coin > 0 || msg.Ticket > 0 ||
msg.Grade > 0 || len(msg.Params) > 0 || msg.Diamond > 0) {
Ids = append(Ids, id)
platform = msg.Platform
}
}
}
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
magids, err := model.GetMessageAttachs(Ids, platform)
if err != nil {
logger.Logger.Trace("GetMessageAttachs err ", err)
}
return magids
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
magids, ok := data.(*[]string)
if ok && magids != nil {
for _, id := range *magids {
if msg, exist := this.msgs[id]; exist {
if msg.AttachState == model.MSGATTACHSTATE_DEFAULT && (msg.Coin > 0 || msg.Ticket > 0 ||
msg.Grade > 0 || len(msg.Params) > 0 || msg.Diamond > 0) {
msgs = append(msgs, msg)
platform = msg.Platform
}
}
}
pack := &msgproto.SCGetMessageAttach{
// Id: proto.String(id),
}
for _, msg := range msgs {
pack.Ids = append(pack.Ids, msg.Id.Hex())
dirtyCoin := int64(0)
msg.AttachState = model.MSGATTACHSTATE_GOT
notifyClient := true
var remark string
var gainWay int32 = common.GainWay_MessageAttach
switch msg.MType {
case model.MSGTYPE_ITEM:
remark = "领取道具"
gainWay = common.GainWay_MAIL_MTEM
dirtyCoin = msg.Coin
items := make([]*Item, 0)
if num := len(msg.Params); num > 0 && num%2 == 0 {
for i := 0; i < num; i += 2 {
items = append(items, &Item{
ItemId: msg.Params[i], // 物品id
ItemNum: int64(msg.Params[i+1]), // 数量
ObtainTime: time.Now().Unix(),
})
}
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)
*/
}
this.dirty = true
}
case model.MSGTYPE_IOSINSTALLSTABLE:
remark = "IOS下载稳定版本"
gainWay = common.GainWay_IOSINSTALLSTABLE
dirtyCoin = msg.Coin
case model.MSGTYPE_GIFT:
remark = "礼物"
case model.MSGTYPE_GOLDCOMERANK:
remark = "财神降临奖励"
gainWay = common.GainWay_GoldCome
notifyClient = false
dirtyCoin = msg.Coin
case model.MSGTYPE_RANDCOIN:
remark = "红包雨"
gainWay = common.GainWay_OnlineRandCoin
notifyClient = false
dirtyCoin = msg.Coin
case model.MSGTYPE_REBATE:
remark = "流水返利"
gainWay = common.GainWay_RebateTask
notifyClient = false
dirtyCoin = msg.Coin
//邮件领取 添加日志
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
return model.InsertRebateLog(this.Platform, &model.Rebate{
SnId: this.SnId,
RebateCoin: msg.Coin,
ReceiveType: 1,
CodeCoin: 0,
})
}), nil, "InsertRebateLog").StartByFixExecutor("ReceiveCodeCoin")
case model.MSGTYPE_ClubGet:
//if len(msg.Params) != 0 {
// //如果俱乐部解散 就存msg.Params[0]
// remark = fmt.Sprintf("%v", msg.Params[0])
//}
//gainWay = common.GainWay_ClubGetCoin
//dirtyCoin = msg.Coin
case model.MSGTYPE_ClubPump:
//if len(msg.Params) != 0 {
// remark = fmt.Sprintf("%v", msg.Params[0])
//}
//gainWay = common.GainWay_ClubPumpCoin
//notifyClient = false
//dirtyCoin = msg.Coin
case model.MSGTYPE_MATCH_SIGNUPFEE:
gainWay = common.GainWay_MatchBreakBack
notifyClient = false
case model.MSGTYPE_MATCH_TICKETREWARD:
gainWay = common.GainWay_MatchSystemSupply
notifyClient = false
this.TicketTotal += msg.Ticket
case model.MSGTYPE_MATCH_SHOPEXCHANGE:
remark = "积分商城兑换"
gainWay = common.GainWay_Exchange
case model.MSGTYPE_MATCH_SHOPERETURN:
remark = "撤单返还"
gainWay = common.GainWay_GradeShopReturn
}
if msg.Coin > 0 {
this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark)
//增加泥码
this.AddDirtyCoin(0, dirtyCoin)
//俱乐部获取不算系统赠送
if msg.MType != model.MSGTYPE_ClubGet {
this.ReportSystemGiveEvent(int32(msg.Coin), gainWay, notifyClient) //邮件附件算是系统赠送
} else { //俱乐部获取算充值
this.AddCoinGiveLog(msg.Coin, 0, 0, gainWay, model.COINGIVETYPE_PAY, "club", "club")
}
this.AddPayCoinLog(msg.Coin, model.PayCoinLogType_Coin, "mail")
if msg.Oper == 0 { //系统赠送
if !this.IsRob {
LogChannelSingleton.WriteMQData(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel, model.SystemFreeGive_GiveType_MailSystemGive,
model.SystemFreeGive_CoinType_Coin, int64(msg.Coin)))
}
}
}
if msg.Ticket > 0 {
//增加报名券
this.AddTicket(msg.Ticket, gainWay, msg.Id.Hex(), remark)
}
if msg.Grade > 0 {
//增加积分
this.AddGrade(msg.Grade, gainWay, msg.Id.Hex(), remark)
}
if msg.Diamond > 0 {
this.AddDiamond(msg.Diamond, 0, gainWay, msg.Id.Hex(), remark)
if msg.Oper == 0 { //系统赠送
if !this.IsRob {
LogChannelSingleton.WriteMQData(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel, model.SystemFreeGive_GiveType_MailSystemGive,
model.SystemFreeGive_CoinType_Diamond, int64(msg.Diamond)))
}
}
}
}
proto.SetDefaults(pack)
this.SendToClient(int(msgproto.MSGPacketID_PACKET_SC_GETMESSAGEATTACH), pack)
}
}), "GetMessageAttach").StartByFixExecutor("logic_message")
}
func (this *Player) GetMessageByGiftId(id string) *model.Message {
for _, msg := range this.msgs {
if msg.GiftId == id && msg.State != model.MSGSTATE_REMOVEED {
@ -1854,7 +1663,7 @@ func (this *Player) Save(force bool) {
}
}
}), "SavePlayerTask")
if b := t.StartByExecutor(strconv.Itoa(int(this.SnId))); b {
if b := t.StartByExecutor(fmt.Sprintf("Player%v", this.SnId)); b {
this.lastSaved = time.Now()
}
}
@ -1898,55 +1707,46 @@ func (this *Player) AddDiamond(num, add int64, gainWay int32, oper, remark strin
return
}
logger.Logger.Tracef("snid(%v) AddDiamond(%v)", this.SnId, num)
//async := false
//if num > 0 && this.scene != nil && !this.scene.IsTestScene() && this.scene.sceneMode != common.SceneMode_Thr { //游戏场中加币,需要同步到gamesrv上
// if StartAsyncAddCoinTransact(this, num, gainWay, oper, remark, true, 0, true) {
// async = true
// }
//}
if num != 0 /*&& !async*/ {
this.dirty = true
if num > 0 {
this.Diamond += num
this.dirty = true
if num > 0 {
this.Diamond += num
} else {
if -num > this.Diamond {
logger.Logger.Errorf("Player.AddCoin exception!!! num(%v) oper(%v)", num, oper)
num = -this.Diamond
this.Diamond = 0
} else {
if -num > this.Diamond {
logger.Logger.Errorf("Player.AddCoin exception!!! num(%v) oper(%v)", num, oper)
num = -this.Diamond
this.Diamond = 0
} else {
this.Diamond += num
}
switch gainWay {
case common.GainWay_MatchSignup: // 排除的
default:
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
SnId: this.SnId,
Num: -num,
})
}
this.Diamond += num
}
this.SendDiffData()
if !this.IsRob {
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeDiamond,
ChangeNum: num,
RemainNum: this.Diamond,
Add: add,
LogType: gainWay,
GameID: 0,
GameFreeID: 0,
BaseCoin: 0,
Operator: oper,
Remark: remark,
switch gainWay {
case common.GainWay_MatchSignup: // 排除的
default:
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
SnId: this.SnId,
Num: -num,
})
if log != nil {
LogChannelSingleton.WriteLog(log)
}
}
}
this.SendDiffData()
if !this.IsRob {
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeDiamond,
ChangeNum: num,
RemainNum: this.Diamond,
Add: add,
LogType: gainWay,
GameID: 0,
GameFreeID: 0,
BaseCoin: 0,
Operator: oper,
Remark: remark,
})
if log != nil {
LogChannelSingleton.WriteLog(log)
}
}
}
@ -2083,45 +1883,6 @@ func (this *Player) AddCoinAsync(num, add int64, gainWay int32, oper, remark str
// }
//}
// 增加泥码
func (this *Player) AddDirtyCoin(paycoin, givecoin int64) {
if this.IsRob {
return
}
//if cfg, ok := ProfitControlMgrSington.GetCfg(this.Platform); ok && cfg != nil && paycoin >= 0 {
// //洗码折算率=(玩家剩余泥码*洗码折算率+期望营收)/(充值额+赠送额+泥码余额)
// this.RecalcuWashingCoinConvRate(cfg.Rate, paycoin, givecoin)
//}
//
//this.DirtyCoin += paycoin + givecoin
//if this.DirtyCoin < 0 {
// this.DirtyCoin = 0
//}
this.dirty = true
}
// 洗码
func (this *Player) WashingCoin(coin int64) int64 {
if this.IsRob {
return 0
}
if coin <= 0 {
return 0
}
//if this.DirtyCoin > coin {
// this.DirtyCoin -= coin
// this.dirty = true
// return coin
//}
//
////剩余多少泥码,清洗多少
//coin = this.DirtyCoin
//this.DirtyCoin = 0
return coin
}
func (this *Player) AddTicket(num int64, gainWay int32, oper, remark string) {
if num == 0 {
return
@ -2443,23 +2204,14 @@ func (this *Player) BackDiffData() {
this.diffData.SafeBoxCoin = this.SafeBoxCoin
}
func (this *Player) UpdateVip() {
if this.IsRob {
return
}
this.VIP = this.GetVIPLevel()
//clubManager.UpdateVip(this)
}
func (this *Player) AddMoneyPayTotal(amount int64) {
if amount > 0 {
this.MoneyPayTotal += amount
this.SendDiffData() //更新vip
this.GetVIPLevel()
}
}
func (this *Player) SendDiffData() {
this.UpdateVip()
var dirty bool
pack := &playerproto.SCPlayerDataUpdate{}
pack.UpdateField = 0
@ -2945,7 +2697,6 @@ func (this *Player) GetPromoterKey() (string, error) {
//}
func (this *Player) SendPlayerInfo() {
this.UpdateVip()
scPlayerData := &playerproto.SCPlayerData{
OpRetCode: playerproto.OpResultCode_OPRC_Sucess,
Data: &playerproto.PlayerData{
@ -3057,6 +2808,8 @@ func (this *Player) SendPlayerInfo() {
this.SendGameConfig(int32(this.scene.gameId), this.Platform, this.Channel)
}
//this.SendJackpotInfo()
// 更新vip
this.GetVIPLevel()
// 后台道具配置
this.SCItems()
// 引导配置
@ -3698,17 +3451,17 @@ func (this *Player) SendShowRed(showType hallproto.ShowRedCode, showChild, isSho
this.SendToClient(int(hallproto.HallPacketID_PACKET_SC_SHOWRED), pack)
}
func (this *Player) SCVIPBuy(buy int64) {
//buy *= 10000
//this.AddMoneyPayTotal(buy)
//this.GetVIPLevel(0) // 更新下vip等级
pack := &playerproto.SCVIPBuy{
OpRetCode: playerproto.OpResultCode_OPRC_Sucess,
}
pack.TolVipExp, pack.Money = this.GetCurrentVIPExp() // 获取经验会更新vip等级
pack.Vip = this.VIP
this.SendToClient(int(playerproto.PlayerPacketID_PACKET_SC_VIPBUY), pack)
}
//func (this *Player) SCVIPBuy(buy int64) {
// //buy *= 10000
// //this.AddMoneyPayTotal(buy)
// //this.GetVIPLevel(0) // 更新下vip等级
// pack := &playerproto.SCVIPBuy{
// OpRetCode: playerproto.OpResultCode_OPRC_Sucess,
// }
// pack.TolVipExp, pack.Money = this.GetCurrentVIPExp() // 获取经验会更新vip等级
// pack.Vip = this.VIP
// this.SendToClient(int(playerproto.PlayerPacketID_PACKET_SC_VIPBUY), pack)
//}
func (this *Player) SCVIPInfo() {
if this.IsRob {
@ -3782,11 +3535,9 @@ func (this *Player) SCVIPInfo() {
pack.List = append(pack.List, data)
}
pack.TolVipExp, pack.Money = this.GetCurrentVIPExp(vips)
pack.TolVipExp, pack.Money = this.GetCurrentVIPExp()
pack.Vip = this.VIP
pack.OpRetCode = playerproto.OpResultCode_OPRC_Sucess
//WelfareMgrSington.MonitorWelfData(this)
//pack.VipId = append(pack.VipId, this.WelfData.VIPGift...)
}
this.SendToClient(int(playerproto.PlayerPacketID_PACKET_SC_VIPINFO), pack)
logger.Logger.Tracef("send vipinfo to client:%v", pack)
@ -3862,8 +3613,9 @@ func (this *Player) VIPDraw(id, vip int32) {
this.AddMoneyPayTotal(addVipExp)
pack.Award[common.ItemIDVipExp] = addVipExp
default:
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: this.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: []*model.Item{
{
ItemId: int32(k),
@ -3895,8 +3647,9 @@ func (this *Player) VIPDraw(id, vip int32) {
itemInfo = append(itemInfo, model.ItemInfo{ItemId: int32(k), ItemNum: v})
pack.Award[k] = v
}
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: this.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: items,
GainWay: common.GainWayVipGift9,
Operator: "system",
@ -3911,17 +3664,14 @@ func (this *Player) VIPDraw(id, vip int32) {
send()
}
func (this *Player) GetCurrentVIPExp(vipcfg ...*webapiproto.VIPcfgDataList) (exp int64, money int64) {
var vips *webapiproto.VIPcfgDataList
if len(vipcfg) == 0 {
vips = VipMgrSington.GetVIPcfg(this.Platform)
} else {
vips = vipcfg[0]
}
// GetCurrentVIPExp 更新vip等级
// 返回当前经验和升级需要经验
func (this *Player) GetCurrentVIPExp() (exp int64, money int64) {
vips := VipMgrSington.GetVIPcfg(this.Platform)
exp = int64(float64(this.MoneyPayTotal) * vips.MoneyRatio)
tolexp := int32(0)
oldVipLevel := this.VIP
if vips != nil && this.MoneyPayTotal != 0 {
if this.MoneyPayTotal != 0 {
allExp := int64(float64(this.MoneyPayTotal) * vips.MoneyRatio)
for _, v := range vips.List {
tolexp = v.VipEx
@ -3938,14 +3688,12 @@ func (this *Player) GetCurrentVIPExp(vipcfg ...*webapiproto.VIPcfgDataList) (exp
money = 0
}
if oldVipLevel != this.VIP {
//玩家VIP升级
this.SCVIPInfo()
PetMgrSington.CheckSkinRed(this)
logger.Logger.Trace("VIP升级")
this.GetVIPLevel()
}
return // 默认
}
// GetVIPLevel 更新vip等级返回vip等级
func (this *Player) GetVIPLevel() int32 {
if this.IsRob {
return 0
@ -3963,14 +3711,16 @@ func (this *Player) GetVIPLevel() int32 {
}
}
}
var b bool
if vip != this.VIP {
this.dirty = true
b = true
//玩家VIP升级
this.SCVIPInfo()
logger.Logger.Trace("VIP升级")
}
this.VIP = vip
//玩家VIP升级
this.SCVIPInfo()
if b {
PetMgrSington.CheckSkinRed(this)
}
@ -4023,7 +3773,7 @@ func (this *Player) GetPayGoodsInfo() {
logger.Logger.Tracef("GetPayGoodsInfo ShopPageBackend %+v", *info)
default:
var itemInfo []*playerproto.PayItem
var items []*Item
var items []*model.Item
if len(info.Amount) > 0 {
this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark)
this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark)
@ -4032,7 +3782,7 @@ func (this *Player) GetPayGoodsInfo() {
this.MoneyTotal += int64(info.ConsumeTypeNum)
if info.ItemInfo != nil {
for _, v := range info.ItemInfo {
items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
items = append(items, &model.Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
itemInfo = append(itemInfo, &playerproto.PayItem{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
@ -4088,7 +3838,14 @@ func (this *Player) GetPayGoodsInfo() {
info.Amount[2] = int32(this.GetVIPExpByPay(int64(info.ConsumeNum)))
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: items,
GainWay: info.GainWay,
Operator: info.Operator,
Remark: info.Remark,
})
PayGoodsInfo := &playerproto.SCPayGoodsInfo{
Gold: info.Amount,
@ -4455,27 +4212,37 @@ func (this *Player) BindTelReward() {
// 发送奖励
plt := PlatformMgrSingleton.GetPlatform(this.Platform)
if plt != nil {
var items []*Item
var items []*model.Item
for k, v := range plt.BindTelReward {
switch k {
case 1:
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: common.ItemIDCoin,
ItemNum: v,
})
case 2:
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: common.ItemIDDiamond,
ItemNum: v,
})
default:
items = append(items, &Item{
items = append(items, &model.Item{
ItemId: k,
ItemNum: v,
})
}
}
BagMgrSingleton.AddItems(this, items, 0, common.GainWay_BindTel, "system", "绑定手机号", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: items,
Add: 0,
GainWay: common.GainWay_BindTel,
Operator: "system",
Remark: "绑定手机号奖励",
GameId: 0,
GameFreeId: 0,
})
}
}
@ -4508,7 +4275,7 @@ func (this *Player) addLotteryCount(count int32) {
}
// 增加手机积分
// AddPhoneScore 增加手机积分
func (this *Player) AddPhoneScore(num, add int64, gainWay int32, oper, remark string) {
if num == 0 {
return
@ -4517,22 +4284,20 @@ func (this *Player) AddPhoneScore(num, add int64, gainWay int32, oper, remark st
return
}
logger.Logger.Tracef("snid(%v) AddPhoneScore(%v)", this.SnId, num)
if num != 0 /*&& !async*/ {
this.dirty = true
if num > 0 {
this.PhoneScore += num
} else {
if -num > this.PhoneScore {
logger.Logger.Errorf("Player.AddPhoneScore exception!!! num(%v) oper(%v)", num, oper)
num = -this.PhoneScore
this.PhoneScore = 0
} else {
this.PhoneScore += num
}
}
this.SendDiffData()
this.dirty = true
if num > 0 {
this.PhoneScore += num
} else {
if -num > this.PhoneScore {
logger.Logger.Errorf("Player.AddPhoneScore exception!!! num(%v) oper(%v)", num, oper)
num = -this.PhoneScore
this.PhoneScore = 0
} else {
this.PhoneScore += num
}
}
this.SendDiffData()
}
// 抽奖任务
@ -4656,14 +4421,20 @@ func (this *Player) CollectTask(taskId int32, num int64) {
// 每日转盘抽奖赠送一个
switch taskId {
case common.TaskTypeTurnplate, common.TaskTypeFirstLogin:
oper := fmt.Sprintf("集卡活动%v", taskId)
var items []*Item
items = append(items, &Item{
ItemId: common.ItemIDCollectBox,
ItemNum: num,
ObtainTime: time.Now().Unix(),
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: []*model.Item{
{
ItemId: common.ItemIDCollectBox,
ItemNum: num,
ObtainTime: time.Now().Unix(),
},
},
GainWay: common.GainWayItemCollectLogin,
Operator: "system",
Remark: fmt.Sprintf("集卡活动%v", taskId),
})
BagMgrSingleton.AddItems(this, items, 0, common.GainWayItemCollectLogin, "system", oper, 0, 0, false)
default:
}
}
@ -4752,16 +4523,23 @@ func (this *Player) GetWeekCardAwary(id int32) {
if !this.WeekCardAward[id] {
//获取周卡奖励
items := data.GetDayRewards()
addItem := []*Item{}
var addItem []*model.Item
for itemId, itemNum := range items {
item := &Item{ItemId: int32(itemId), ItemNum: itemNum, ObtainTime: time.Now().Unix()}
item := &model.Item{ItemId: int32(itemId), ItemNum: itemNum, ObtainTime: time.Now().Unix()}
addItem = append(addItem, item)
itemInfo := &playerproto.PayItem{}
itemInfo.ItemId = int32(itemId)
itemInfo.ItemNum = itemNum
ret.Items = append(ret.Items, itemInfo)
}
BagMgrSingleton.AddItems(this, addItem, 0, common.GainWay_WeekCardAward, "system", "周卡每日奖励", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: this.Platform,
SnId: this.SnId,
Change: addItem,
GainWay: common.GainWay_WeekCardAward,
Operator: "system",
Remark: "周卡每日奖励",
})
//返回消息
this.WeekCardAward[id] = true
ret.WeekCardAward = this.WeekCardAward[id]
@ -4797,43 +4575,34 @@ func (this *Player) GetWeekCardPrivilege(typeId int32) bool {
// 增加记牌器道具时限
func (this *Player) AddItemRecExpireTime(itemId int32, num, add int64, gainWay int32, oper, remark string) {
if num == 0 {
if num <= 0 {
return
}
logger.Logger.Tracef("snid(%v) AddItemRecExpireTime, itemId:(%v), num:(%v)", this.SnId, itemId, num)
this.dirty = true
itemData := srvdata.GameItemMgr.Get(this.Platform, itemId)
if itemData == nil {
return
}
logger.Logger.Tracef("snid(%v) AddItemRecExpireTime, itemId:(%v), num:(%v)", this.SnId, itemId, num)
if num != 0 /*&& !async*/ {
this.dirty = true
if num > 0 {
itemData := srvdata.GameItemMgr.Get(this.Platform, itemId)
if itemData == nil {
return
}
if this.ItemRecExpireTime == 0 {
this.ItemRecExpireTime = time.Now().Unix() + int64(itemData.Time)*3600*num
} else {
if this.ItemRecExpireTime >= time.Now().Unix() {
this.ItemRecExpireTime += int64(itemData.Time) * 3600 * num
} else {
this.ItemRecExpireTime = time.Now().Unix() + int64(itemData.Time)*3600*num
}
}
if this.scene != nil && this.scene.gameSess != nil {
msg := &serverproto.WGBuyRecTimeItem{
SnId: this.SnId,
ExpireTime: this.ItemRecExpireTime,
Diamond: this.Diamond,
}
proto.SetDefaults(msg)
this.SendToGame(int(serverproto.SSPacketID_PACKET_WG_BUYRECTIMEITEM), msg)
}
if this.ItemRecExpireTime == 0 {
this.ItemRecExpireTime = time.Now().Unix() + int64(itemData.Time)*3600*num
} else {
if this.ItemRecExpireTime >= time.Now().Unix() {
this.ItemRecExpireTime += int64(itemData.Time) * 3600 * num
} else {
this.ItemRecExpireTime = time.Now().Unix() + int64(itemData.Time)*3600*num
}
}
this.SendDiffData()
if this.scene != nil && this.scene.gameSess != nil {
msg := &serverproto.WGBuyRecTimeItem{
SnId: this.SnId,
ExpireTime: this.ItemRecExpireTime,
Diamond: this.Diamond,
}
this.SendToGame(int(serverproto.SSPacketID_PACKET_WG_BUYRECTIMEITEM), msg)
}
}

View File

@ -1,7 +1,7 @@
package main
import (
"strconv"
"fmt"
"time"
"mongo.games.com/goserver/core"
@ -153,7 +153,7 @@ func (c *PlayerCacheMgr) Get(plt string, snid int32, cb func(*PlayerCacheItem, b
}
}
}), "PlayerCacheMgr.Get").StartByExecutor(strconv.Itoa(int(snid)))
})).StartByExecutor(fmt.Sprintf("Player%v", snid))
}
func (c *PlayerCacheMgr) GetMore(plt string, snid []int32, cb func([]*PlayerCacheItem, bool)) {

View File

@ -146,8 +146,9 @@ func (spd *ScenePolicyData) CostPayment(s *Scene, p *Player) bool {
for _, v := range items {
v.ItemNum = -v.ItemNum
}
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWayRoomCost,
Operator: "system",
@ -180,8 +181,9 @@ func (spd *ScenePolicyData) GiveCostPayment(s *Scene, snid int32) bool {
p := PlayerMgrSington.GetPlayerBySnId(snid)
if p != nil {
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
GainWay: common.GainWayRoomCost,
Operator: "system",
@ -192,10 +194,20 @@ func (spd *ScenePolicyData) GiveCostPayment(s *Scene, snid int32) bool {
RoomConfigId: roomConfig.GetId(),
})
} else {
BagMgrSingleton.AddItemsOffline(s.limitPlatform.IdStr, snid, items, common.GainWayRoomCost, "system",
"竞技场费用返还", int64(s.gameId), int64(s.dbGameFree.GetId()), false, func(err error) {
logger.Logger.Errorf("竞技场房间费用返还失败, err: %v", err)
})
BagMgrSingleton.AddItemsOffline(&model.AddItemParam{
Platform: s.limitPlatform.IdStr,
SnId: snid,
Change: items,
GainWay: common.GainWayRoomCost,
Operator: "system",
Remark: "竞技场房间费用返还",
GameId: int64(s.gameId),
GameFreeId: int64(s.dbGameFree.GetId()),
NoLog: false,
RoomConfigId: roomConfig.GetId(),
}, func(err error) {
logger.Logger.Errorf("竞技场房间费用返还失败, err: %v", err)
})
}
return false
}

View File

@ -4,8 +4,6 @@ import (
"encoding/json"
"fmt"
"math/rand"
"mongo.games.com/game/protocol/bag"
"mongo.games.com/game/srvdata"
"slices"
"time"
@ -21,6 +19,7 @@ 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"
)
@ -541,8 +540,19 @@ 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.AddItems(p, []*Item{item}, 0, int32(gainWay), "system", name, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: info.ItemId,
ItemNum: info.ItemNum,
},
},
GainWay: int32(gainWay),
Operator: "system",
Remark: name,
})
}
}
@ -692,12 +702,19 @@ func (this *ShopMgr) GainShop(shopInfo *model.ShopInfo, p *Player, vipShopId, po
case ShopConsumePhoneScore:
p.AddPhoneScore(-costNum, 0, gainWay, "sys", shopName)
case ShopConsumeDiamondScore:
var items []*Item
items = append(items, &Item{
ItemId: common.ItemDiamondScore, // 物品id
ItemNum: int64(-costNum), // 数量
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: common.ItemDiamondScore,
ItemNum: -costNum,
},
},
GainWay: common.GainWayBuyItem,
Operator: "system",
Remark: "商城购买消耗钻石积分",
})
BagMgrSingleton.AddItems(p, items, 0, common.GainWayBuyItem, "system", "商城购买消耗钻石积分", 0, 0, false)
default:
logger.Logger.Errorf("GainShop ConstType[%v] err", shopInfo.ConstType)
return shop.OpResultCode_OPRC_Error
@ -849,51 +866,90 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
return false
}
var itemInfo []model.ItemInfo
var itemInfo []*model.Item
// TODO 服务器处理 减劵 成功后调后台生成订单
// 判断p.VCoin是否足够 不足返回错误 足够扣掉 另外需从后台操作回执成功生成扣除V卡的订单 回执失败
//扣除V卡
if info.Price > 0 {
item := model.ItemInfo{
ItemId: common.ItemIDVCard,
ItemNum: int64(info.Price * num),
}
_, code, _ := BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWay_Exchange,
"sys", fmt.Sprintf("兑换扣除%v", item.ItemId), 0, 0, false)
if code != bag.OpResultCode_OPRC_Sucess { // 扣掉V卡
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDVCard)
n := int64(info.Price * num)
if item != nil && item.ItemNum >= n {
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: -n,
},
},
GainWay: common.GainWay_Exchange,
Operator: "system",
Remark: fmt.Sprintf("兑换扣除%v", item.ItemId),
})
} else {
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
return false
}
itemInfo = append(itemInfo, item)
itemInfo = append(itemInfo, &model.Item{
ItemId: item.ItemId,
ItemNum: n,
})
}
//扣除金券
if info.JPrice > 0 {
item := model.ItemInfo{
ItemId: common.ItemIDJCard,
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 { // 扣掉金券
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDJCard)
n := int64(info.JPrice * num)
if item != nil && item.ItemNum >= n {
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: -n,
},
},
GainWay: common.GainWay_Exchange,
Operator: "system",
Remark: fmt.Sprintf("兑换扣除%v", item.ItemId),
})
} else {
pack.RetCode = shop.OpResultCode_OPRC_JCoinNotEnough
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
return false
}
itemInfo = append(itemInfo, item)
itemInfo = append(itemInfo, &model.Item{
ItemId: item.ItemId,
ItemNum: n,
})
}
if info.DPrice > 0 {
item := model.ItemInfo{
ItemId: common.ItemDollCard,
ItemNum: int64(info.JPrice * num),
}
_, _, isF := BagMgrSingleton.AddItem(p, int64(item.ItemId), -item.ItemNum, 0, common.GainWayItemShopChangeDoll,
"sys", fmt.Sprintf("兑换娃娃扣除%v", item.ItemId), 0, 0, false)
if !isF { // 扣掉金券
n := int64(info.DPrice * num)
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDJCard)
if item != nil && item.ItemNum >= n {
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: -n,
},
},
GainWay: common.GainWayItemShopChangeDoll,
Operator: "system",
Remark: fmt.Sprintf("兑换娃娃扣除%v", item.ItemId),
})
} else {
pack.RetCode = shop.OpResultCode_OPRC_DCoinNotEnough
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)
return false
}
itemInfo = append(itemInfo, item)
itemInfo = append(itemInfo, &model.Item{
ItemId: common.ItemDollCard,
ItemNum: n,
})
}
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
pack := &webapi_proto.ASCreateExchangeOrder{
@ -927,8 +983,15 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
}
var amount [ShopParamMax]int32
//保存db
var items []model.ItemInfo
for _, v := range itemInfo {
items = append(items, model.ItemInfo{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
}
dbShop := this.NewDbShop(p, 0, amount[:], ExchangeConsumeCash, info.Cash*num,
common.GainWay_ShopBuy, itemInfo, cdata.Id, cdata.Name, 0, "", []int32{})
common.GainWay_ShopBuy, items, cdata.Id, cdata.Name, 0, "", []int32{})
err = model.InsertDbShopLog(dbShop)
if err != nil {
logger.Logger.Errorf("model.InsertDbShopLog err:", err)
@ -995,16 +1058,16 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
}
}
logger.Logger.Trace("API_CreateExchange: ", as.Tag, as.GetReturnCPO())
var items []*Item
for _, v := range itemInfo {
items = append(items, &Item{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
if len(itemInfo) > 0 {
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: itemInfo,
GainWay: common.GainWay_Exchange,
Operator: "system",
Remark: "兑换返还",
})
}
if len(items) > 0 {
BagMgrSingleton.AddItems(p, items, 0, common.GainWay_Exchange, "system", "返还物品", 0, 0, false) // 后台订单创建失败 返回物品
}
}
p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack)

View File

@ -609,12 +609,38 @@ func (this *Tournament) signUpCost(p *Player, tmId int32, cost bool) (bool, int3
logger.Logger.Trace("道具不足")
return false, int32(tournament.SignRaceCode_OPRC_NoItem)
} else {
BagMgrSingleton.AddItem(p, int64(item.ItemId), -gmd.SignupCostItem.ItemNum, 0, common.GainWay_MatchSignup,
"player", gmd.MatchName+"-报名消耗", gameId, int64(gmd.GameFreeId), false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: -gmd.SignupCostItem.ItemNum,
},
},
GainWay: common.GainWay_MatchSignup,
Operator: "player",
Remark: gmd.MatchName + "-报名消耗",
GameId: gameId,
GameFreeId: int64(gmd.GameFreeId),
})
}
} else {
BagMgrSingleton.AddItem(p, int64(item.ItemId), gmd.SignupCostItem.ItemNum, 0, common.GainWay_MatchSignup,
"player", gmd.MatchName+"-报名退还", gameId, int64(gmd.GameFreeId), false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: item.ItemId,
ItemNum: gmd.SignupCostItem.ItemNum,
},
},
GainWay: common.GainWay_MatchSignup,
Operator: "player",
Remark: gmd.MatchName + "-报名退还",
GameId: gameId,
GameFreeId: int64(gmd.GameFreeId),
})
}
} else {
logger.Logger.Trace("道具不足")
@ -1393,11 +1419,21 @@ func (this *Tournament) sendPromotionInfo(mc *PlayerMatchContext, sortId int64,
if info.ItemNum <= 0 {
continue
}
item := &Item{
ItemId: info.ItemId,
ItemNum: int64(info.ItemNum),
}
BagMgrSingleton.AddItems(mc.p, []*Item{item}, 0, common.GainWay_MatchSystemSupply, "system", mc.tm.gmd.MatchName+"排名奖励", 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: mc.p.Platform,
SnId: mc.p.SnId,
Change: []*model.Item{
{
ItemId: info.ItemId,
ItemNum: int64(info.ItemNum),
},
},
GainWay: common.GainWay_MatchSystemSupply,
Operator: "system",
Remark: mc.tm.gmd.MatchName + "排名奖励",
GameId: int64(mc.tm.dbGameFree.GetGameId()),
GameFreeId: int64(mc.tm.dbGameFree.GetId()),
})
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -568,11 +568,20 @@ func DrawWelfareDate(dates []*webapi_proto.WelfareDate, p *Player, gainWay int32
}
case 3: //道具
if v.Grade > 0 {
item := &Item{
ItemId: v.Item_Id,
ItemNum: int64(v.Grade),
}
BagMgrSingleton.AddItems(p, []*Item{item}, 0, gainWay, oper, remark, 0, 0, false)
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{
{
ItemId: v.Item_Id,
ItemNum: int64(v.Grade),
},
},
Add: 0,
GainWay: gainWay,
Operator: oper,
Remark: remark,
})
}
}
}
@ -887,8 +896,9 @@ func (this *WelfareMgr) GetAddUp2Award(p *Player, day int32) {
items = append(items, item)
}
}
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
P: p.PlayerData,
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: items,
Cost: cost,
Add: 0,