Compare commits

..

No commits in common. "0333ef441e859cd8b4f09731487db15b906b8b73" and "2d76ef963f5ee3668a3a025c15d11b2863c22fb6" have entirely different histories.

10 changed files with 116 additions and 134 deletions

View File

@ -42,7 +42,7 @@ build-job:
- echo '编译'
- go env -w GO111MODULE=off
- |
while IFS= read -r line || [[ -n $line ]]
while IFS= read -r line
do
cd $line
echo "编译 $line"
@ -66,7 +66,7 @@ save-job:
# 删除自定义配置
- echo '删除自定义配置'
- |
while IFS= read -r line || [[ -n $line ]]
while IFS= read -r line
do
echo "删除 $line 配置"
rm ./temp/data/$line
@ -74,7 +74,7 @@ save-job:
# 拷贝可执行程序
- echo '拷贝可执行程序'
- |
while IFS= read -r line || [[ -n $line ]]
while IFS= read -r line
do
echo "拷贝 $line"
mv ./$line/$line ./temp/$line

View File

@ -321,7 +321,6 @@ const (
GainWayItemBagChangeDollRevocation = 113 //娃娃兑换后台撤销
GainWayPermitReset = 114 //赛季通行证积分重置
GainWayClientUpgrade = 115 //客户端升级奖励
GainWayLottery = 116 //开奖码抽奖
)
// 后台选择 金币变化类型 的充值 类型id号起始

View File

@ -2,7 +2,6 @@ package svc
import (
"errors"
"fmt"
"net/rpc"
"sort"
"time"
@ -151,7 +150,7 @@ func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs
//机器人库
robotPlayer := AccountCollection(mongo.G_P)
var robotPlayerList []PInfo
err = robotPlayer.Find(selecter).Select(bson.M{"snid": 1, "username": 1, "roles": 1}).All(&robotPlayerList)
err = robotPlayer.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&robotPlayerList)
if err != nil {
logger.Logger.Error("GetInviteRankList find player is error", err)
return err
@ -160,12 +159,8 @@ func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs
for _, inviteInfo := range list {
for _, playerData := range retPlayerList {
if inviteInfo.SnId == playerData.SnId {
name := playerData.Name
if name == "" {
name = "mango" + fmt.Sprintf("%d", playerData.SnId)
}
var RankInvite model.PlayerRankInvite
RankInvite.Name = name
RankInvite.Name = playerData.Name
RankInvite.Score = inviteInfo.Score
RankInvite.SnId = inviteInfo.SnId

View File

@ -2185,14 +2185,13 @@ type LotteryHistory struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ts int64 `protobuf:"varint,1,opt,name=Ts,proto3" json:"Ts,omitempty"` // 时间戳
Index int32 `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"` // 期数
SnId int32 `protobuf:"varint,3,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id
Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` // 玩家名字
RoleId int32 `protobuf:"varint,5,opt,name=RoleId,proto3" json:"RoleId,omitempty"` // 角色id
Award []*Item `protobuf:"bytes,6,rep,name=Award,proto3" json:"Award,omitempty"` // 本期奖品
Show []*LotteryShow `protobuf:"bytes,7,rep,name=Show,proto3" json:"Show,omitempty"` // 展示列表
ImageURL string `protobuf:"bytes,8,opt,name=ImageURL,proto3" json:"ImageURL,omitempty"` // 奖品图片
Ts int64 `protobuf:"varint,1,opt,name=Ts,proto3" json:"Ts,omitempty"` // 时间戳
Index int32 `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"` // 期数
SnId int32 `protobuf:"varint,3,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id
Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` // 玩家名字
RoleId int32 `protobuf:"varint,5,opt,name=RoleId,proto3" json:"RoleId,omitempty"` // 角色id
Award []*Item `protobuf:"bytes,6,rep,name=Award,proto3" json:"Award,omitempty"` // 本期奖品
Show []*LotteryShow `protobuf:"bytes,7,rep,name=Show,proto3" json:"Show,omitempty"` // 展示列表
}
func (x *LotteryHistory) Reset() {
@ -2276,13 +2275,6 @@ func (x *LotteryHistory) GetShow() []*LotteryShow {
return nil
}
func (x *LotteryHistory) GetImageURL() string {
if x != nil {
return x.ImageURL
}
return ""
}
// PACKET_SCLotteryHistory
type SCLotteryHistory struct {
state protoimpl.MessageState
@ -2525,7 +2517,7 @@ var file_rank_proto_rawDesc = []byte{
0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x6d, 0x67, 0x55, 0x72,
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x6d, 0x67, 0x55, 0x72, 0x6c, 0x22,
0xdb, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f,
0xbf, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
0x54, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64,
@ -2537,58 +2529,56 @@ var file_rank_proto_rawDesc = []byte{
0x74, 0x65, 0x6d, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x53, 0x68,
0x6f, 0x77, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x2e,
0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x04, 0x53, 0x68, 0x6f,
0x77, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x08, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x52, 0x4c, 0x22, 0x3c, 0x0a,
0x10, 0x53, 0x43, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72,
0x79, 0x12, 0x28, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x2a, 0x9e, 0x04, 0x0a, 0x04,
0x52, 0x61, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52,
0x41, 0x4e, 0x4b, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x52, 0x61, 0x6e, 0x6b,
0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x90, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61,
0x74, 0x63, 0x68, 0x10, 0x91, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x92, 0x4e, 0x12,
0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53,
0x43, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x93, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x10, 0x94, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41,
0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0x95, 0x4e, 0x12, 0x17,
0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74,
0x65, 0x4c, 0x6f, 0x67, 0x10, 0x96, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x10, 0x97, 0x4e,
0x77, 0x22, 0x3c, 0x0a, 0x10, 0x53, 0x43, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x28, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65,
0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x2a,
0x9e, 0x04, 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1c,
0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53,
0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x90, 0x4e, 0x12, 0x1c, 0x0a, 0x17,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x52, 0x61,
0x6e, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x91, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x43, 0x6f, 0x69, 0x6e,
0x10, 0x92, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41,
0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x93, 0x4e, 0x12, 0x19, 0x0a, 0x14,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x49, 0x6e,
0x76, 0x69, 0x74, 0x65, 0x10, 0x94, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10,
0x95, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49,
0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x10, 0x96, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x6f,
0x67, 0x10, 0x97, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52,
0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x98, 0x4e,
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f,
0x43, 0x53, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x98, 0x4e, 0x12, 0x1a, 0x0a, 0x15,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x57, 0x69,
0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x99, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10,
0x9a, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e,
0x4b, 0x5f, 0x53, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9b, 0x4e, 0x12, 0x19, 0x0a, 0x14,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x50, 0x65,
0x72, 0x6d, 0x69, 0x74, 0x10, 0x9c, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x10,
0x9d, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x52,
0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0x9e, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72,
0x64, 0x10, 0x9f, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x6e, 0x65, 0x10, 0xa0, 0x4e,
0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4c, 0x6f, 0x74,
0x74, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa1, 0x4e, 0x12, 0x1c,
0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4c, 0x6f, 0x74, 0x74, 0x65,
0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa2, 0x4e, 0x2a, 0x8d, 0x01, 0x0a,
0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x49,
0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00,
0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54,
0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49,
0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x10,
0x03, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
0x55, 0x70, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69,
0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10, 0x05, 0x42, 0x24, 0x5a, 0x22,
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, 0x72, 0x61,
0x6e, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x53, 0x43, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x99, 0x4e, 0x12, 0x18, 0x0a, 0x13,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4c, 0x65,
0x76, 0x65, 0x6c, 0x10, 0x9a, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9b, 0x4e,
0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f,
0x43, 0x53, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x10, 0x9c, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x50, 0x65, 0x72,
0x6d, 0x69, 0x74, 0x10, 0x9d, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x53, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0x9e, 0x4e, 0x12,
0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x6f, 0x6f, 0x6d,
0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0x9f, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x6e,
0x65, 0x10, 0xa0, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
0x53, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10,
0xa1, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4c,
0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x10, 0xa2, 0x4e,
0x2a, 0x8d, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12,
0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x6f,
0x6e, 0x65, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79,
0x70, 0x65, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e,
0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02, 0x12,
0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f,
0x6e, 0x74, 0x68, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54,
0x79, 0x70, 0x65, 0x5f, 0x55, 0x70, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e,
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10, 0x05,
0x42, 0x24, 0x5a, 0x22, 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, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -264,7 +264,6 @@ message LotteryHistory{
int32 RoleId = 5; // id
repeated Item Award = 6; //
repeated LotteryShow Show = 7; //
string ImageURL = 8; //
}
// PACKET_SCLotteryHistory

View File

@ -612,12 +612,11 @@ func CSLotteryHistory(s *netlib.Session, d *rankproto.GateTransmit, packetId int
var ranks []*rankproto.LotteryHistory
for _, v := range list {
r := &rankproto.LotteryHistory{
Ts: v.CTime.Unix(),
Index: v.Num,
SnId: v.SnId,
Name: v.Name,
RoleId: v.RoleId,
ImageURL: v.ImageURL,
Ts: v.CTime.Unix(),
Index: v.Num,
SnId: v.SnId,
Name: v.Name,
RoleId: v.RoleId,
}
if r.RoleId == 0 {
r.RoleId = common.DefaultRoleId

View File

@ -66,13 +66,11 @@ func RobotRandon() {
for i := 0; i < robotNum; i++ {
//随机机器人
snId := accounts[rand.Intn(len(accounts))].SnId
num := int64(rand.Intn(8) + 1)
score := num*50 + int64(rand.Intn(551)+50)
data := model.RankInvite{
Platform: "1",
SnId: snId,
Num: num,
Score: score,
Num: int64(rand.Intn(4) + 2),
Score: int64(rand.Intn(901) + 100),
Ts: time.Now().Unix(),
Week: common.GetWeekStartTs(time.Now().Unix()),
}

View File

@ -1,4 +1,4 @@
set deployDir="..\deploy"
set deployDir=".\deploy"
xcopy .\data\* %deployDir%\data\ /s /e /y

View File

@ -148,37 +148,53 @@ func (l *LotteryData) sendAward() {
return
}
l.IsSend = true
var lotteryAward []*welfare.PropInfo
for _, v := range l.Reward {
lotteryAward = append(lotteryAward, &welfare.PropInfo{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
}
pack := &welfare.NotifyLotteryAward{
Info: &welfare.LotteryInfo{
Id: l.CId,
StartTs: l.StartTs,
Index: int32(l.Num),
Award: lotteryAward,
SnId: l.SnId,
Name: l.Name,
RoleId: l.RoleId,
Price: l.Price,
WinCode: l.WinCode,
},
}
// 广播中奖结果
PlayerMgrSington.BroadcastMessageToPlatform(l.Platform, int(welfare.SPacketID_PACKET_NotifyLotteryAward), pack)
logger.Logger.Tracef("NotifyLotteryAward: %v", pack)
if l.IsRobot {
return
}
AddMailLottery(l.Platform, l.SnId, l.Reward)
// 通知
if p := PlayerMgrSington.GetPlayerBySnId(l.SnId); p != nil {
var lotteryAward []*welfare.PropInfo
for _, v := range l.Reward {
lotteryAward = append(lotteryAward, &welfare.PropInfo{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
}
var codes []string
info := PlayerInfoMgrSingle.Players[p.SnId]
if info != nil {
if lt := info.Lottery[l.CId]; lt != nil && lt.StartTs == l.StartTs {
codes = lt.Code
}
}
pack := &welfare.NotifyLotteryAward{
Info: &welfare.LotteryInfo{
Id: l.CId,
StartTs: l.StartTs,
EndTs: l.EndTs,
WinTs: l.WinTs,
RemainCode: int64(l.GetRemainCode()),
TotalCode: l.TotalCode,
Award: lotteryAward,
State: common.LotteryStateOver,
WinCode: l.WinCode,
SnId: l.SnId,
Name: l.Name,
Index: int32(l.Num),
Price: l.Price,
NeedRoomCard: LotteryRoomCard,
ImageURL: l.ImageURL,
CostRoomCard: l.WinCostCard,
Codes: codes,
},
}
p.SendToClient(int(welfare.SPacketID_PACKET_NotifyLotteryAward), pack)
logger.Logger.Tracef("NotifyLotteryAward: %v", pack)
}
}
func (l *LotteryData) sendRobotCode(a, b int) {
@ -255,7 +271,7 @@ func (l *LotteryData) Done() {
continue
}
t, _ := time.Parse(time.DateTime, v.GetTime())
if common.TsInSameDay(t.Unix(), l.StartTs) && int(v.GetNum()) == LotteryMgrInst.GetIndex(l.Platform, l.CId) {
if common.TsInSameDay(t.Unix(), l.StartTs) && v.GetNum() == int64(l.Num+1) {
// 必中
isMust = true
tp = 1
@ -615,7 +631,7 @@ func (l *LotteryMgr) GetList(plt string) []*welfare.LotteryInfo {
state = common.LotteryStateRun // 进行中
}
info := &welfare.LotteryInfo{
ret = append(ret, &welfare.LotteryInfo{
Id: d.CId,
StartTs: d.StartTs,
EndTs: d.EndTs,
@ -632,17 +648,7 @@ func (l *LotteryMgr) GetList(plt string) []*welfare.LotteryInfo {
Price: d.Price,
NeedRoomCard: LotteryRoomCard,
ImageURL: d.ImageURL,
}
if d.WinTs > 0 && d.WinTs > now.Unix() {
// 隐藏未发奖的中奖信息
d.WinCode = ""
d.SnId = 0
d.Name = ""
d.RoleId = 0
}
ret = append(ret, info)
})
}
sort.Slice(ret, func(i, j int) bool {

View File

@ -1208,10 +1208,6 @@ func (this *Player) GetMessageAttach(id string) {
remark = "客户端升级奖励"
gainWay = common.GainWayClientUpgrade
addItem()
case model.MSGTYPE_Lottery:
remark = "竞技管抽奖"
gainWay = common.GainWayLottery
addItem()
}
if msg.Coin > 0 {
this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark)