This commit is contained in:
liwei1dao 2022-11-29 21:03:39 +08:00
commit bfaf7ea954
17 changed files with 336 additions and 172 deletions

View File

@ -848,7 +848,7 @@
{ {
"id": 173, "id": 173,
"datatype": 2, "datatype": 2,
"type": 71, "type": 72,
"inited": [], "inited": [],
"data1": 1, "data1": 1,
"data2": 0, "data2": 0,
@ -1076,17 +1076,6 @@
"data4": 4, "data4": 4,
"data5": 4 "data5": 4
}, },
{
"id": 194,
"datatype": 2,
"type": 138,
"inited": [],
"data1": 30,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{ {
"id": 195, "id": 195,
"datatype": 2, "datatype": 2,
@ -3792,5 +3781,93 @@
"data3": 0, "data3": 0,
"data4": 0, "data4": 0,
"data5": 0 "data5": 0
},
{
"id": 5011001,
"datatype": 2,
"type": 11,
"inited": [],
"data1": 3,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5012001,
"datatype": 2,
"type": 12,
"inited": [],
"data1": 1,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5018001,
"datatype": 2,
"type": 18,
"inited": [],
"data1": 1,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5024001,
"datatype": 2,
"type": 24,
"inited": [],
"data1": 1,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5047001,
"datatype": 2,
"type": 47,
"inited": [],
"data1": 6,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5063001,
"datatype": 2,
"type": 63,
"inited": [],
"data1": 100,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5068001,
"datatype": 2,
"type": 68,
"inited": [],
"data1": 200000,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 5104001,
"datatype": 2,
"type": 104,
"inited": [],
"data1": 100,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
} }
] ]

View File

@ -47,6 +47,11 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code
} else { } else {
curByCount = list.BuyCount curByCount = list.BuyCount
} }
curByCount += req.Count // 当前需要购买的数量
if this.configure.GetMaxBuyChallengeCount() < curByCount {
code = pb.ErrorCode_HuntingBuyMaxCount
return
}
conf := this.module.configure.GetGlobalConf() conf := this.module.configure.GetGlobalConf()
if conf == nil { if conf == nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
@ -76,11 +81,12 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code
} }
} }
if curCount-amount > 0 { if curCount-amount > 0 {
if code = this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ res := &cfg.Gameatn{
A: "item", A: "item",
T: costRes.T, T: costRes.T,
N: curCount - amount, N: curCount - amount,
}}, true); code != pb.ErrorCode_Success { }
if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success {
return return
} }
} }
@ -88,11 +94,6 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code
list.RecoveryTime = 0 list.RecoveryTime = 0
} }
mapData["recoveryTime"] = list.RecoveryTime mapData["recoveryTime"] = list.RecoveryTime
curByCount += req.Count // 当前需要购买的数量
if this.configure.GetMaxBuyChallengeCount() < curByCount {
code = pb.ErrorCode_HuntingBuyMaxCount
return
}
for i := list.BuyCount + 1; i <= curByCount; i++ { for i := list.BuyCount + 1; i <= curByCount; i++ {
_cfg := this.configure.GetBuyChallengeCount(i) _cfg := this.configure.GetBuyChallengeCount(i)
@ -109,6 +110,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code
if v.A == v1.A && v.T == v1.T { if v.A == v1.A && v.T == v1.T {
v1.N += v.N v1.N += v.N
bFound = true bFound = true
break
} }
} }
if !bFound { if !bFound {

View File

@ -70,46 +70,45 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
} }
newChallenge = true newChallenge = true
} }
// 校验门票数量够不够
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{costRes}, true); code != pb.ErrorCode_Success {
return
}
// check // check
code, bWin = this.module.battle.CheckBattleReport(session, req.Report) code, bWin = this.module.battle.CheckBattleReport(session, req.Report)
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return return
} }
if !bWin {
return
}
// 校验门票数量够不够
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{costRes}, true); code != pb.ErrorCode_Success {
return
}
amount := int32(this.module.ModuleItems.QueryItemAmount(session.GetUserId(), costRes.T)) // 获取当前数量 amount := int32(this.module.ModuleItems.QueryItemAmount(session.GetUserId(), costRes.T)) // 获取当前数量
if amount < conf.HuntingNum { if amount < conf.HuntingNum {
hunting.RecoveryTime = configure.Now().Unix() hunting.RecoveryTime = configure.Now().Unix()
mapData["recoveryTime"] = hunting.RecoveryTime mapData["recoveryTime"] = hunting.RecoveryTime
} }
if bWin {
this.module.CheckRank(session.GetUserId(), req.BossType, req.Difficulty, hunting, req.Report) this.module.CheckRank(session.GetUserId(), req.BossType, req.Difficulty, hunting, req.Report)
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据 // 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
// 发放通关随机奖励 // 发放通关随机奖励
reward = this.module.configure.GetDropReward(cfgHunting.Drop) // 获取掉落奖励 reward = this.module.configure.GetDropReward(cfgHunting.Drop) // 获取掉落奖励
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
return return
} }
if newChallenge { // 新关卡挑战通过 发放首通奖励 if newChallenge && bWin { // 新关卡挑战通过 发放首通奖励
if code = this.module.DispenseRes(session, cfgHunting.Firstprize, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, cfgHunting.Firstprize, true); code != pb.ErrorCode_Success {
return return
} }
hunting.Boss[req.BossType] += 1 hunting.Boss[req.BossType] += 1
mapData["boss"] = hunting.Boss mapData["boss"] = hunting.Boss
mapData["challengeTime"] = hunting.BossTime
} }
for k := range hunting.Boss { for k := range hunting.Boss {
hunting.Boss[k] += 1 hunting.Boss[k] += 1
} }
mapData["challengeTime"] = hunting.BossTime
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
session.SendMsg(string(this.module.GetType()), HuntingChallengeOverResp, &pb.HuntingChallengeOverResp{Data: hunting}) session.SendMsg(string(this.module.GetType()), HuntingChallengeOverResp, &pb.HuntingChallengeOverResp{Data: hunting})
// 随机任务统计 // 随机任务统计

View File

@ -72,11 +72,12 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe
addCount := curCount - amount addCount := curCount - amount
if addCount > 0 { if addCount > 0 {
if code = this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ res := &cfg.Gameatn{
A: "item", A: "item",
T: costRes.T, T: costRes.T,
N: addCount, N: addCount,
}}, true); code != pb.ErrorCode_Success { }
if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success {
return return
} }
} }
@ -85,6 +86,10 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe
} }
mapData["recoveryTime"] = list.RecoveryTime mapData["recoveryTime"] = list.RecoveryTime
code = this.module.ModifyHuntingData(session.GetUserId(), mapData) //修改内存信息 code = this.module.ModifyHuntingData(session.GetUserId(), mapData) //修改内存信息
// 发送难度
for k := range list.Boss {
list.Boss[k] += 1
}
session.SendMsg(string(this.module.GetType()), HuntingGetListResp, &pb.HuntingGetListResp{Data: list}) session.SendMsg(string(this.module.GetType()), HuntingGetListResp, &pb.HuntingGetListResp{Data: list})
return return
} }

View File

@ -88,10 +88,10 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
// cd = pb.ErrorCode_MoonfantasyNotEnoughbattles // cd = pb.ErrorCode_MoonfantasyNotEnoughbattles
// } // }
// umfantasy.Ticket -= this.module.configure.GetGlobalConf().DreamlandCos // umfantasy.Ticket -= this.module.configure.GetGlobalConf().DreamlandCos
// if boss, err = this.module.configure.GetMonsterById(mdata.Monster); err != nil { if boss, err = this.module.configure.GetMonsterById(mdata.Monster); err != nil {
// cd = pb.ErrorCode_ConfigNoFound cd = pb.ErrorCode_ConfigNoFound
// return return
// } }
if len(mdata.Join) >= int(mdata.Numup) { if len(mdata.Join) >= int(mdata.Numup) {
cd = pb.ErrorCode_MoonfantasyJoinUp cd = pb.ErrorCode_MoonfantasyJoinUp

View File

@ -26,6 +26,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
mapData map[string]interface{} mapData map[string]interface{}
pagoda *pb.DBPagoda pagoda *pb.DBPagoda
costTime int32 // 本次战斗消耗的时间 costTime int32 // 本次战斗消耗的时间
isWin bool
) )
mapData = make(map[string]interface{}, 0) mapData = make(map[string]interface{}, 0)
code = this.ChallengeOverCheck(session, req) code = this.ChallengeOverCheck(session, req)
@ -67,10 +68,14 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
} }
} }
// 校验通过 // 校验通过
code, _ = this.module.battle.CheckBattleReport(session, req.Report) code, isWin = this.module.battle.CheckBattleReport(session, req.Report)
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return return
} }
if !isWin { // 战斗失败直接返回
code = pb.ErrorCode_BattleNoWin
return
}
costTime = req.Report.Costtime costTime = req.Report.Costtime
// 加经验 // 加经验
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {

View File

@ -155,7 +155,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
verify: this.modelRtask.verfiyRtype10, verify: this.modelRtask.verfiyRtype10,
update: this.modelRtaskRecord.overrideUpdate, update: this.modelRtaskRecord.overrideUpdate,
}) })
case comm.Rtype11: case comm.Rtype11, comm.Rtype84, comm.Rtype85:
this.registerVerifyHandle(v.Id, &rtaskCondi{ this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg, cfg: typeCfg,
find: this.modelRtaskRecord.lessEqualFirstParam, find: this.modelRtaskRecord.lessEqualFirstParam,
@ -174,7 +174,8 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53, comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53,
comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60, comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60,
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype104: comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype88, comm.Rtype104,
comm.Rtype96, comm.Rtype105, comm.Rtype128, comm.Rtype130, comm.Rtype131:
this.registerVerifyHandle(v.Id, &rtaskCondi{ this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg, cfg: typeCfg,
find: this.modelRtaskRecord.lessEqualFirstParam, find: this.modelRtaskRecord.lessEqualFirstParam,

View File

@ -77,11 +77,12 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.VikingBuyReq) (code
} }
} }
if curCount-amount > 0 { if curCount-amount > 0 {
if code = this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ res := &cfg.Gameatn{
A: "item", A: "item",
T: costRes.T, T: costRes.T,
N: curCount - amount, N: curCount - amount,
}}, true); code != pb.ErrorCode_Success { }
if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success {
return return
} }
} }

View File

@ -81,16 +81,12 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return return
} }
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
code, bWin = this.module.battle.CheckBattleReport(session, req.Report)
if !bWin { // 战斗失败 直接返回
return
}
// 校验门票数量够不够 // 校验门票数量够不够
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{costRes}, true); code != pb.ErrorCode_Success { if code = this.module.ConsumeRes(session, []*cfg.Gameatn{costRes}, true); code != pb.ErrorCode_Success {
return return
} }
code, bWin = this.module.battle.CheckBattleReport(session, req.Report)
amount := int32(this.module.ModuleItems.QueryItemAmount(session.GetUserId(), costRes.T)) // 获取当前数量 amount := int32(this.module.ModuleItems.QueryItemAmount(session.GetUserId(), costRes.T)) // 获取当前数量
conf := this.module.configure.GetGlobalConf() conf := this.module.configure.GetGlobalConf()
if conf != nil { if conf != nil {
@ -99,13 +95,14 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
mapData["recoveryTime"] = viking.RecoveryTime mapData["recoveryTime"] = viking.RecoveryTime
} }
} }
if bWin {
this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, viking, req.Report) this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, viking, req.Report)
}
mapData["bossTime"] = viking.BossTime // 更新时间 mapData["bossTime"] = viking.BossTime // 更新时间
if newChallenge { // 新关卡挑战通过 发放首通奖励 if newChallenge && bWin { // 新关卡挑战通过 发放首通奖励
if code = this.module.DispenseRes(session, vikingCfg.Firstprize, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, vikingCfg.Firstprize, true); code != pb.ErrorCode_Success {
return return
} }
for _, v := range vikingCfg.Firstprize { for _, v := range vikingCfg.Firstprize {
asset = append(asset, &pb.UserAssets{ asset = append(asset, &pb.UserAssets{
A: v.A, A: v.A,

View File

@ -73,11 +73,12 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq
} }
addCount := curCount - amount addCount := curCount - amount
if addCount > 0 { if addCount > 0 {
if code = this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ res := &cfg.Gameatn{
A: "item", A: "item",
T: costRes.T, T: costRes.T,
N: addCount, N: addCount,
}}, true); code != pb.ErrorCode_Success { }
if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success {
return return
} }
} }
@ -86,6 +87,9 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq
} }
mapData["recoveryTime"] = list.RecoveryTime mapData["recoveryTime"] = list.RecoveryTime
code = this.module.ModifyVikingData(session.GetUserId(), mapData) //修改内存信息 code = this.module.ModifyVikingData(session.GetUserId(), mapData) //修改内存信息
for k := range list.Boss {
list.Boss[k] += 1
}
session.SendMsg(string(this.module.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list}) session.SendMsg(string(this.module.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list})
return return
} }

View File

@ -202,6 +202,7 @@ const (
ErrorCode_LibraryLvReward ErrorCode = 2805 // 领奖等级没达到 ErrorCode_LibraryLvReward ErrorCode = 2805 // 领奖等级没达到
// Battle // Battle
ErrorCode_BattleValidationFailed ErrorCode = 2901 //战斗校验失败 ErrorCode_BattleValidationFailed ErrorCode = 2901 //战斗校验失败
ErrorCode_BattleNoWin ErrorCode = 2902 //战斗失败
// sociaty // sociaty
ErrorCode_SociatyNoFound ErrorCode = 3000 //公会不存在 ErrorCode_SociatyNoFound ErrorCode = 3000 //公会不存在
ErrorCode_SociatyAdded ErrorCode = 3001 //已在公会里 ErrorCode_SociatyAdded ErrorCode = 3001 //已在公会里
@ -438,6 +439,7 @@ var (
2804: "LibraryReward", 2804: "LibraryReward",
2805: "LibraryLvReward", 2805: "LibraryLvReward",
2901: "BattleValidationFailed", 2901: "BattleValidationFailed",
2902: "BattleNoWin",
3000: "SociatyNoFound", 3000: "SociatyNoFound",
3001: "SociatyAdded", 3001: "SociatyAdded",
3002: "SociatyDiamondNoEnough", 3002: "SociatyDiamondNoEnough",
@ -661,6 +663,7 @@ var (
"LibraryReward": 2804, "LibraryReward": 2804,
"LibraryLvReward": 2805, "LibraryLvReward": 2805,
"BattleValidationFailed": 2901, "BattleValidationFailed": 2901,
"BattleNoWin": 2902,
"SociatyNoFound": 3000, "SociatyNoFound": 3000,
"SociatyAdded": 3001, "SociatyAdded": 3001,
"SociatyDiamondNoEnough": 3002, "SociatyDiamondNoEnough": 3002,
@ -756,7 +759,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{ var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xb9, 0x27, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x6f, 0x2a, 0xcb, 0x27, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -979,100 +982,101 @@ var file_errorcode_proto_rawDesc = []byte{
0x64, 0x10, 0xf4, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x64, 0x10, 0xf4, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c,
0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xf5, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x42, 0x61, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xf5, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61,
0x69, 0x6c, 0x65, 0x64, 0x10, 0xd5, 0x16, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xd5, 0x16, 0x12, 0x10, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x74, 0x79, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xb8, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x65, 0x4e, 0x6f, 0x57, 0x69, 0x6e, 0x10, 0xd6, 0x16, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xb9, 0x17, 0x12, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xb8, 0x17, 0x12, 0x11,
0x1b, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xb9,
0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xba, 0x17, 0x12, 0x14, 0x0a, 0x0f, 0x17, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x61, 0x6d,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x6f, 0x6e, 0x64, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xba, 0x17, 0x12, 0x14,
0xbb, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x52, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x4d, 0x65, 0x6d, 0x62, 0x65,
0x69, 0x67, 0x68, 0x74, 0x10, 0xbc, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x72, 0x10, 0xbb, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e,
0x74, 0x79, 0x4e, 0x6f, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xbd, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x6f, 0x52, 0x69, 0x67, 0x68, 0x74, 0x10, 0xbc, 0x17, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x6f, 0x63,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x10, 0xbe, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x41, 0x64, 0x64, 0x65, 0x64, 0x10, 0xbd, 0x17, 0x12, 0x13,
0x17, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73,
0x10, 0xbf, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x67, 0x10, 0xbe, 0x17, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75,
0x72, 0x65, 0x65, 0x10, 0xc0, 0x17, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x74, 0x10, 0xbf, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x10, 0xc1, 0x17, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x41, 0x67, 0x72, 0x65, 0x65, 0x10, 0xc0, 0x17, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69,
0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0xba, 0x61, 0x74, 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x10, 0xc1, 0x17, 0x12, 0x16, 0x0a, 0x10,
0xea, 0x01, 0x12, 0x19, 0x0a, 0x13, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x61, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x74, 0x65, 0x72, 0x4e, 0x6f, 0x44, 0x69, 0x73, 0x73, 0x10, 0xbb, 0xea, 0x01, 0x12, 0x17, 0x0a, 0x10, 0xba, 0xea, 0x01, 0x12, 0x19, 0x0a, 0x13, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d,
0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x44, 0x69, 0x73, 0x73, 0x10, 0xbb, 0xea, 0x01, 0x12,
0x6f, 0x62, 0x10, 0xbc, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x17, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xbd, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x67, 0x4a, 0x6f, 0x62, 0x10, 0xbc, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69,
0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x10, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xbd, 0xea, 0x01, 0x12, 0x15,
0xbe, 0xea, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x75, 0x73,
0x67, 0x6e, 0x10, 0xbf, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x10, 0xbe, 0xea, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x10, 0xc0, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x53, 0x69, 0x67, 0x6e, 0x10, 0xbf, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x44, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc1, 0xea, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x10, 0xc0, 0xea, 0x01, 0x12, 0x14, 0x0a,
0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x44, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10,
0x79, 0x4d, 0x61, 0x78, 0x10, 0xc2, 0xea, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0xc1, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70,
0x61, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xc3, 0x70, 0x6c, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xc2, 0xea, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x53, 0x6f,
0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc4, 0xea, 0x10, 0xc3, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d,
0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10,
0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc5, 0xea, 0x01, 0x12, 0x1a, 0xc4, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65,
0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc5, 0xea, 0x01,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xc6, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72,
0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0xc7, 0xea, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xc6, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f,
0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x65, 0x6c, 0x6f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10,
0x6e, 0x67, 0x54, 0x6f, 0x10, 0xc9, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0xc7, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x65,
0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x10, 0xca, 0xea, 0x01, 0x12, 0x1b, 0x6c, 0x6f, 0x6e, 0x67, 0x54, 0x6f, 0x10, 0xc9, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f,
0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x79, 0x4c, 0x76, 0x4e, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x10, 0xca, 0xea, 0x01,
0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xcb, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x12, 0x1b, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x79, 0x4c,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x76, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xcb, 0xea, 0x01, 0x12, 0x1b, 0x0a,
0x74, 0x69, 0x6f, 0x6e, 0x10, 0xcc, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f, 0x63, 0x69, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x61, 0x6c, 0x69,
0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xcc, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f,
0x75, 0x67, 0x68, 0x10, 0xcd, 0xea, 0x01, 0x12, 0x1c, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x45,
0x74, 0x79, 0x41, 0x63, 0x69, 0x74, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xcd, 0xea, 0x01, 0x12, 0x1c, 0x0a, 0x16, 0x53, 0x6f, 0x63,
0x65, 0x10, 0xce, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x69, 0x74, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x63, 0x65,
0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x10, 0xcf, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x69, 0x76, 0x65, 0x10, 0xce, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x10, 0xcf, 0xea, 0x01, 0x12,
0x74, 0x10, 0xd0, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x78,
0x51, 0x75, 0x69, 0x74, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0xd1, 0xea, 0x69, 0x73, 0x74, 0x10, 0xd0, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10,
0x73, 0x74, 0x65, 0x72, 0x10, 0xd2, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0xd1, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x6f,
0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x10, 0xd2, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72,
0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d,
0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12,
0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e,
0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x43, 0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52,
0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a,
0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82,
0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63,
0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10,
0x19, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65,
0x10, 0xe5, 0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x10, 0x84, 0x19, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d,
0x4d, 0x61, 0x78, 0x10, 0xe6, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, 0xe5, 0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65,
0x61, 0x78, 0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, 0xe6, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c,
0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19,
0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d,
0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c,
0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10,
0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0xe9, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e,
0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x6f, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a,
0x45, 0x6e, 0x64, 0x10, 0xca, 0x1a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44,
0x65, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, 0xca, 0x1a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76,
0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b,
0x54, 0x69, 0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12, 0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x65, 0x6e,
0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12, 0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f,
0x12, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x91, 0x1c, 0x12,
0x69, 0x76, 0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x17, 0x0a, 0x12, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65,
0x4e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x12, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42,
0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5,
0x72, 0x72, 0x10, 0xf6, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d,
0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a, 0x14, 0x57, 0x65, 0x45, 0x72, 0x72, 0x10, 0xf6, 0x1c, 0x12, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6c, 0x64,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0xd9, 0x1d, 0x12, 0x19, 0x0a,
0x75, 0x67, 0x68, 0x10, 0xda, 0x1d, 0x12, 0x16, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x14, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x76, 0x4e, 0x6f, 0x74, 0x45,
0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d, 0x12, 0x18, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xda, 0x1d, 0x12, 0x16, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6c,
0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x6d, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x10, 0xdb, 0x1d,
0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x68, 0x65, 0x64, 0x10, 0xdd, 0x1d, 0x12, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0xdc, 0x1d, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x6f,
0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61, 0x73, 0x74, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x68, 0x65, 0x64, 0x10, 0xdd,
0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12, 0x1e, 0x0a, 0x1d, 0x12, 0x1c, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x61,
0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x55, 0x6e, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xde, 0x1d, 0x12,
0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42, 0x06, 0x5a, 0x1e, 0x0a, 0x19, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -168,15 +168,15 @@ func (r *RobotFormatter) Format(entry *logrus.Entry) ([]byte, error) {
return b.Bytes(), nil return b.Bytes(), nil
} }
func (r *Robot) MessageRsp(mainType, subType string) bool { func (r *Robot) MessageRsp(mainType, subType string) (bool, int64) {
var byteLen int64
var msg *pb.UserMessage = &pb.UserMessage{} var msg *pb.UserMessage = &pb.UserMessage{}
_, data, err := r.ws.ReadMessage() _, data, err := r.ws.ReadMessage()
if err != nil { if err != nil {
fmt.Printf("readMessage err:%v", err) fmt.Printf("readMessage err:%v", err)
return false return false, byteLen
} }
byteLen = int64(len(data))
if err = proto.Unmarshal(data, msg); err != nil { if err = proto.Unmarshal(data, msg); err != nil {
fmt.Printf("unmarshal err:%v", err) fmt.Printf("unmarshal err:%v", err)
} }
@ -184,19 +184,19 @@ func (r *Robot) MessageRsp(mainType, subType string) bool {
if msg.MainType == "chat" && msg.SubType == "message" { if msg.MainType == "chat" && msg.SubType == "message" {
resp := &pb.ChatMessagePush{} resp := &pb.ChatMessagePush{}
if !comm.ProtoUnmarshal(msg, resp) { if !comm.ProtoUnmarshal(msg, resp) {
return false return false, byteLen
} }
return false return false, byteLen
//fmt.Printf("接收消息=====resp:%v\n", resp.Chat) //fmt.Printf("接收消息=====resp:%v\n", resp.Chat)
} else if msg.MainType == mainType && msg.SubType == subType { } else if msg.MainType == mainType && msg.SubType == subType {
resp := &pb.UserLoginResp{} resp := &pb.UserLoginResp{}
if !comm.ProtoUnmarshal(msg, resp) { if !comm.ProtoUnmarshal(msg, resp) {
return false return false, byteLen
} }
//fmt.Printf("接收消息=====loginData:%v,userExpand:%v\n", resp.Data, resp.Ex) //fmt.Printf("接收消息=====loginData:%v,userExpand:%v\n", resp.Data, resp.Ex)
return true return true, byteLen
} }
return false return false, byteLen
} }
func (r *Robot) CloseHandler() { func (r *Robot) CloseHandler() {
@ -212,3 +212,42 @@ func (r *Robot) GetMessagedata() []byte {
} }
return data return data
} }
func (r *Robot) Login() error {
msg := &pb.UserMessage{MainType: "user", SubType: "login"}
rsp := &pb.UserLoginReq{
Account: "user001",
Sid: "dfmxf",
}
msg.Sec = r.BuildSecStr()
if comm.ProtoMarshal(rsp, msg) {
data, _ := proto.Marshal(msg)
return r.ws.WriteMessage(websocket.BinaryMessage, data)
}
return nil
}
func (r *Robot) Create() bool {
mainType := "user"
subType := "create"
msg := &pb.UserMessage{MainType: mainType, SubType: subType}
rsp := &pb.UserCreateReq{
NickName: "001",
Figure: 100,
Gender: 0,
}
msg.Sec = r.BuildSecStr()
if comm.ProtoMarshal(rsp, msg) {
data, _ := proto.Marshal(msg)
err := r.ws.WriteMessage(websocket.BinaryMessage, data)
if err != nil {
fmt.Printf("WriteMessage err:%v", err)
}
}
for {
if b, _ := r.MessageRsp(mainType, subType); b {
return true
}
}
}

View File

@ -29,6 +29,7 @@ func init() {
// webSocket // webSocket
model.RegisterVerifyWebSocket("json", verify.WebSocketJSON) model.RegisterVerifyWebSocket("json", verify.WebSocketJSON)
model.RegisterVerifyWebSocket("pb", verify.WebSocketProto)
} }
// Dispose 处理函数 // Dispose 处理函数
@ -52,13 +53,6 @@ func Dispose(ctx context.Context, concurrency, totalNumber uint64, request *mode
case 1: case 1:
// 连接以后再启动协程 // 连接以后再启动协程
r := robot.NewRobot(request.URL) r := robot.NewRobot(request.URL)
// head := &pb.UserMessage{MainType: "user", SubType: "login"}
// req := &pb.UserLoginReq{
// Account: "user001",
// Sid: "dfmxf",
// }
// r.SendToClient(head, req)
// r.MessageRsp()
go golink.WebSocket(ctx, i, ch, totalNumber, &wg, request, r) go golink.WebSocket(ctx, i, ch, totalNumber, &wg, request, r)
case 2: case 2:

View File

@ -72,6 +72,7 @@ func webSocketRequest(chanID uint64, ch chan<- *model.RequestResults, i uint64,
startTime = time.Now() startTime = time.Now()
isSucceed = false isSucceed = false
errCode = model.HTTPOk errCode = model.HTTPOk
byteLen int64 // 协议传输字节数
) )
// 需要发送的数据 // 需要发送的数据
head := &pb.UserMessage{MainType: "user", SubType: "login"} head := &pb.UserMessage{MainType: "user", SubType: "login"}
@ -81,18 +82,23 @@ func webSocketRequest(chanID uint64, ch chan<- *model.RequestResults, i uint64,
} }
r.SendToClient(head, req) r.SendToClient(head, req)
for { for {
if r.MessageRsp("user", "login") {
if b, len := r.MessageRsp("user", "login"); b {
byteLen += len
isSucceed = true isSucceed = true
errCode, isSucceed = request.GetVerifyWebSocket()(request, "webSocket.json", r.GetMessagedata()) //errCode, isSucceed = request.GetVerifyWebSocket()(request, "webSocket.pb", r.GetMessagedata())
break break
} }
} }
requestTime := uint64(helper.DiffNano(startTime)) requestTime := uint64(helper.DiffNano(startTime))
requestResults := &model.RequestResults{ requestResults := &model.RequestResults{
ID: "",
ChanID: chanID,
Time: requestTime, Time: requestTime,
IsSucceed: isSucceed, IsSucceed: isSucceed,
ErrCode: errCode, ErrCode: errCode,
ReceivedBytes: byteLen,
} }
requestResults.SetID(chanID, i) requestResults.SetID(chanID, i)
ch <- requestResults ch <- requestResults

View File

@ -38,7 +38,7 @@ func ReceivingResults(concurrent uint64, ch <-chan *model.RequestResults, wg *sy
maxTime uint64 // 最大时长 maxTime uint64 // 最大时长
minTime uint64 // 最小时长 minTime uint64 // 最小时长
successNum uint64 // 成功处理数code为0 successNum uint64 // 成功处理数code为0
failureNum uint64 // 处理失败数code不为0 failureNum uint64 // 处理失败数code不为0 0
chanIDLen int // 并发数 chanIDLen int // 并发数
chanIDs = make(map[uint64]bool) chanIDs = make(map[uint64]bool)
receivedBytes int64 receivedBytes int64

View File

@ -4,8 +4,11 @@ package verify
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/stress/model" "go_dreamfactory/stress/model"
"google.golang.org/protobuf/proto"
) )
// WebSocketResponseJSON 返回数据结构体返回值为json // WebSocketResponseJSON 返回数据结构体返回值为json
@ -47,3 +50,29 @@ func WebSocketJSON(request *model.Request, seq string, msg []byte) (code int, is
} }
return return
} }
func WebSocketProto(request *model.Request, seq string, data []byte) (code int, isSucceed bool) {
var msg *pb.UserMessage = &pb.UserMessage{}
if err := proto.Unmarshal(data, msg); err != nil {
fmt.Printf("unmarshal err:%v", err)
}
//fmt.Printf("接收消息=====msg.MainType = %s,msg.SubType = %s\n", msg.MainType, msg.SubType)
if msg.MainType == "chat" && msg.SubType == "message" {
resp := &pb.ChatMessagePush{}
if !comm.ProtoUnmarshal(msg, resp) {
code = model.ParseError
}
return
//fmt.Printf("接收消息=====resp:%v\n", resp.Chat)
} else if msg.MainType == "user" && msg.SubType == "login" {
resp := &pb.UserLoginResp{}
if !comm.ProtoUnmarshal(msg, resp) {
code = model.ParseError
}
//fmt.Printf("接收消息=====loginData:%v,userExpand:%v\n", resp.Data, resp.Ex)
return
}
return
}

View File

@ -74,6 +74,7 @@ func main() {
totalNumber = 10 totalNumber = 10
debugStr = "false" debugStr = "false"
requestURL = "ws://10.0.0.9:7891/gateway" requestURL = "ws://10.0.0.9:7891/gateway"
verify = "pb"
if concurrency == 0 || totalNumber == 0 || (requestURL == "" && path == "") { if concurrency == 0 || totalNumber == 0 || (requestURL == "" && path == "") {
fmt.Printf("示例: go run main.go -c 1 -n 1 -u https://www.baidu.com/ \n") fmt.Printf("示例: go run main.go -c 1 -n 1 -u https://www.baidu.com/ \n")
fmt.Printf("压测地址或curl路径必填 \n") fmt.Printf("压测地址或curl路径必填 \n")