Compare commits
3 Commits
feda7fd5c1
...
f1dee4a54a
Author | SHA1 | Date |
---|---|---|
|
f1dee4a54a | |
|
c429d41900 | |
|
3526ef069f |
|
@ -68,33 +68,30 @@ func init() {
|
|||
}))
|
||||
|
||||
//删除场景
|
||||
// 立刻删除,不管游戏是否结束
|
||||
netlib.RegisterFactory(int(server.SSPacketID_PACKET_WG_DESTROYSCENE), netlib.PacketFactoryWrapper(func() interface{} {
|
||||
return &server.WGDestroyScene{}
|
||||
}))
|
||||
netlib.RegisterHandler(int(server.SSPacketID_PACKET_WG_DESTROYSCENE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
logger.Logger.Trace("receive WGDestroyScene:", pack)
|
||||
if msg, ok := pack.(*server.WGDestroyScene); ok {
|
||||
sceneId := int(msg.GetSceneId())
|
||||
s := base.SceneMgrSington.GetScene(sceneId)
|
||||
msg, ok := pack.(*server.WGDestroyScene)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
if !msg.IsGrace {
|
||||
// 立刻删除,不管游戏是否结束
|
||||
for _, v := range msg.Ids {
|
||||
s := base.SceneMgrSington.GetScene(int(v))
|
||||
if s != nil {
|
||||
if gameScene, ok := s.ExtraData.(base.GameScene); ok {
|
||||
gameScene.SceneDestroy(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}))
|
||||
|
||||
//删除场景
|
||||
netlib.RegisterFactory(int(server.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), netlib.PacketFactoryWrapper(func() interface{} {
|
||||
return &server.WGGraceDestroyScene{}
|
||||
}))
|
||||
netlib.RegisterHandler(int(server.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
logger.Logger.Trace("receive WGGraceDestroyScene:", pack)
|
||||
if msg, ok := pack.(*server.WGGraceDestroyScene); ok {
|
||||
ids := msg.GetIds()
|
||||
for _, id := range ids {
|
||||
s := base.SceneMgrSington.GetScene(int(id))
|
||||
} else {
|
||||
// 游戏结束后删除房间
|
||||
for _, v := range msg.Ids {
|
||||
s := base.SceneMgrSington.GetScene(int(v))
|
||||
if s != nil {
|
||||
if s.IsHundredScene() || s.Gaming {
|
||||
s.SetGraceDestroy(true)
|
||||
|
@ -109,6 +106,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}))
|
||||
|
||||
|
|
|
@ -1046,8 +1046,8 @@ func (this *Scene) Destroy(force bool) {
|
|||
isCompleted := this.sp.IsCompleted(this) || this.completed
|
||||
SceneMgrSington.DestroyScene(this.SceneId)
|
||||
pack := &server.GWDestroyScene{
|
||||
SceneId: proto.Int(this.SceneId),
|
||||
IsCompleted: proto.Bool(isCompleted),
|
||||
SceneId: int64(this.SceneId),
|
||||
IsCompleted: isCompleted,
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
this.SendToWorld(int(server.SSPacketID_PACKET_GW_DESTROYSCENE), pack)
|
||||
|
|
|
@ -46,18 +46,8 @@ type GameParam struct {
|
|||
InvalidRobotAccRate int //每次更换过期机器人账号的比例,百分比
|
||||
InvalidRobotDay int //机器人过期的天数
|
||||
CreatePrivateSceneCnt int //每人可以创建私有房间数量
|
||||
PrivateSceneLogLimit int //私有房间日志上限
|
||||
PrivateSceneFreeDistroySec int //私有房间免费解散时间,默认600秒
|
||||
PrivateSceneDestroyTax int //私有房间提前解散税收,百分比
|
||||
NumOfGamesConfig []int32 //私人房间局数
|
||||
BacklogGameHorseRaceLamp int //游戏内公告储备多少条,超出丢弃
|
||||
IsRobFightTest bool //是否开启机器人自己对战功能
|
||||
BullFightCtrl0108 bool //牛牛是否使用新功能规则
|
||||
OpenPoolRec bool //是否打开水池数据记录
|
||||
CoinPoolMinOutRate int32 //水池最小出分
|
||||
CoinPoolMaxOutRate int32 //水池最大出分
|
||||
MaxRTP float64 //最大rtp
|
||||
AddRTP float64 //附加rtp
|
||||
PlayerWatchNum int32 //百人游戏允许围观的局数
|
||||
NotifyPlayerWatchNum int32 //百人游戏围观多少局的时候开始提示
|
||||
CgAddr string //后台cg工程地址
|
||||
|
@ -65,7 +55,6 @@ type GameParam struct {
|
|||
MaxAudienceNum int //最大观战人数
|
||||
IsFindRoomByGroup bool //查询房间列表时是否使用互通查询,默认是不使用
|
||||
NoOpTimes int32 //对战场允许托管的局数
|
||||
UseBevRobot bool //是否使用行为树机器人
|
||||
ClosePreCreateRoom bool //关闭予创建房间
|
||||
CloseQMThr bool //关闭全民三方流水计算
|
||||
ErrResetMongo bool //发生主从问题,是否重置连接
|
||||
|
@ -129,15 +118,6 @@ func InitGameParam() {
|
|||
if GameParamData.KickoutDefaultFreezeMinute == 0 {
|
||||
GameParamData.KickoutDefaultFreezeMinute = 5
|
||||
}
|
||||
|
||||
if GameParamData.MaxRTP <= 0.00001 {
|
||||
GameParamData.MaxRTP = 0.999999
|
||||
}
|
||||
|
||||
if GameParamData.AddRTP <= 0.00001 {
|
||||
GameParamData.AddRTP = 0.1
|
||||
}
|
||||
|
||||
mgo.SetDebug(GameParamData.MongoDebug)
|
||||
if GameParamData.RbAutoBalance {
|
||||
if GameParamData.RbAutoBalanceRate == 0 {
|
||||
|
@ -168,26 +148,6 @@ func InitGameParam() {
|
|||
if GameParamData.CreatePrivateSceneCnt == 0 {
|
||||
GameParamData.CreatePrivateSceneCnt = 20
|
||||
}
|
||||
if GameParamData.PrivateSceneLogLimit == 0 {
|
||||
GameParamData.PrivateSceneLogLimit = 7000
|
||||
}
|
||||
if GameParamData.PrivateSceneFreeDistroySec == 0 {
|
||||
GameParamData.PrivateSceneFreeDistroySec = 600
|
||||
}
|
||||
if GameParamData.PrivateSceneDestroyTax == 0 {
|
||||
GameParamData.PrivateSceneDestroyTax = 5
|
||||
}
|
||||
if len(GameParamData.NumOfGamesConfig) == 0 {
|
||||
GameParamData.NumOfGamesConfig = []int32{5, 10, 20, 50}
|
||||
}
|
||||
if GameParamData.CoinPoolMinOutRate == 0 {
|
||||
GameParamData.CoinPoolMinOutRate = 33
|
||||
}
|
||||
|
||||
if GameParamData.CoinPoolMaxOutRate == 0 {
|
||||
GameParamData.CoinPoolMaxOutRate = 66
|
||||
}
|
||||
|
||||
if GameParamData.PlayerWatchNum <= 2 {
|
||||
GameParamData.PlayerWatchNum = 20
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -42,7 +42,7 @@ enum SSPacketID {
|
|||
PACKET_WG_AUDIENCESIT = 1123;
|
||||
PACKET_WG_RECHARGE = 1124;
|
||||
PACKET_GW_SCENESTATE = 1125;
|
||||
PACKET_WG_GRACE_DESTROYSCENE = 1126;
|
||||
PACKET_WG_GRACE_DESTROYSCENE = 1126; // 废弃
|
||||
PACKET_GW_SCENEEND = 1127;
|
||||
PACKET_GW_FISHRECORD = 1128;
|
||||
PACKET_GW_PLAYERFORCELEAVE = 1129;
|
||||
|
@ -189,20 +189,16 @@ message WGCreateScene {
|
|||
|
||||
//PACKET_WG_DESTROYSCENE
|
||||
message WGDestroyScene {
|
||||
int32 SceneId = 1;
|
||||
bool IsCompleted = 2;
|
||||
repeated int64 Ids = 1;
|
||||
bool IsGrace = 2; // 游戏结束后删除
|
||||
}
|
||||
|
||||
//PACKET_GW_DESTROYSCENE
|
||||
message GWDestroyScene {
|
||||
int32 SceneId = 1;
|
||||
int64 SceneId = 1;
|
||||
bool IsCompleted = 2;
|
||||
}
|
||||
|
||||
//PACKET_WG_GRACE_DESTROYSCENE
|
||||
message WGGraceDestroyScene {
|
||||
repeated int32 Ids = 1;
|
||||
}
|
||||
message RebateTask {
|
||||
bool RebateSwitch = 1; //返利开关
|
||||
repeated string RebateGameCfg = 2; //已打开的游戏配置 gameid+gamemode
|
||||
|
|
|
@ -398,6 +398,7 @@ type TMInfo struct {
|
|||
Rule string `protobuf:"bytes,19,opt,name=Rule,proto3" json:"Rule,omitempty"`
|
||||
SortId int32 `protobuf:"varint,20,opt,name=SortId,proto3" json:"SortId,omitempty"`
|
||||
OnChannelName []string `protobuf:"bytes,21,rep,name=OnChannelName,proto3" json:"OnChannelName,omitempty"` //在哪个渠道开启
|
||||
ShowId int32 `protobuf:"varint,22,opt,name=ShowId,proto3" json:"ShowId,omitempty"` // 比赛区分
|
||||
}
|
||||
|
||||
func (x *TMInfo) Reset() {
|
||||
|
@ -579,7 +580,85 @@ func (x *TMInfo) GetOnChannelName() []string {
|
|||
return nil
|
||||
}
|
||||
|
||||
//比赛场场次 激战人数刷新也走这个
|
||||
func (x *TMInfo) GetShowId() int32 {
|
||||
if x != nil {
|
||||
return x.ShowId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type MatchTypeInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 名称
|
||||
SortId int32 `protobuf:"varint,2,opt,name=SortId,proto3" json:"SortId,omitempty"` // 排序序号
|
||||
On bool `protobuf:"varint,3,opt,name=On,proto3" json:"On,omitempty"` // 开关
|
||||
Id int32 `protobuf:"varint,4,opt,name=Id,proto3" json:"Id,omitempty"` // 类型id
|
||||
}
|
||||
|
||||
func (x *MatchTypeInfo) Reset() {
|
||||
*x = MatchTypeInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MatchTypeInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MatchTypeInfo) ProtoMessage() {}
|
||||
|
||||
func (x *MatchTypeInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MatchTypeInfo.ProtoReflect.Descriptor instead.
|
||||
func (*MatchTypeInfo) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *MatchTypeInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MatchTypeInfo) GetSortId() int32 {
|
||||
if x != nil {
|
||||
return x.SortId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MatchTypeInfo) GetOn() bool {
|
||||
if x != nil {
|
||||
return x.On
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *MatchTypeInfo) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//比赛场场次
|
||||
//PACKET_TM_SCTMInfos
|
||||
type SCTMInfos struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -587,13 +666,13 @@ type SCTMInfos struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TMInfo []*TMInfo `protobuf:"bytes,1,rep,name=TMInfo,proto3" json:"TMInfo,omitempty"` //比赛场场次信息
|
||||
TypeList []int32 `protobuf:"varint,2,rep,packed,name=TypeList,proto3" json:"TypeList,omitempty"` // 所有玩法类型 1.锦标赛 2.实物赛 3.vip比赛 4.话费赛
|
||||
TypeList []*MatchTypeInfo `protobuf:"bytes,2,rep,name=TypeList,proto3" json:"TypeList,omitempty"` // 比赛类型列表
|
||||
}
|
||||
|
||||
func (x *SCTMInfos) Reset() {
|
||||
*x = SCTMInfos{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[4]
|
||||
mi := &file_tournament_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -606,7 +685,7 @@ func (x *SCTMInfos) String() string {
|
|||
func (*SCTMInfos) ProtoMessage() {}
|
||||
|
||||
func (x *SCTMInfos) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[4]
|
||||
mi := &file_tournament_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -619,7 +698,7 @@ func (x *SCTMInfos) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCTMInfos.ProtoReflect.Descriptor instead.
|
||||
func (*SCTMInfos) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{4}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *SCTMInfos) GetTMInfo() []*TMInfo {
|
||||
|
@ -629,7 +708,7 @@ func (x *SCTMInfos) GetTMInfo() []*TMInfo {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *SCTMInfos) GetTypeList() []int32 {
|
||||
func (x *SCTMInfos) GetTypeList() []*MatchTypeInfo {
|
||||
if x != nil {
|
||||
return x.TypeList
|
||||
}
|
||||
|
@ -649,7 +728,7 @@ type CSTMRankList struct {
|
|||
func (x *CSTMRankList) Reset() {
|
||||
*x = CSTMRankList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[5]
|
||||
mi := &file_tournament_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -662,7 +741,7 @@ func (x *CSTMRankList) String() string {
|
|||
func (*CSTMRankList) ProtoMessage() {}
|
||||
|
||||
func (x *CSTMRankList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[5]
|
||||
mi := &file_tournament_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -675,7 +754,7 @@ func (x *CSTMRankList) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSTMRankList.ProtoReflect.Descriptor instead.
|
||||
func (*CSTMRankList) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{5}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *CSTMRankList) GetTMId() int32 {
|
||||
|
@ -698,7 +777,7 @@ type TMRank struct {
|
|||
func (x *TMRank) Reset() {
|
||||
*x = TMRank{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[6]
|
||||
mi := &file_tournament_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -711,7 +790,7 @@ func (x *TMRank) String() string {
|
|||
func (*TMRank) ProtoMessage() {}
|
||||
|
||||
func (x *TMRank) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[6]
|
||||
mi := &file_tournament_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -724,7 +803,7 @@ func (x *TMRank) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use TMRank.ProtoReflect.Descriptor instead.
|
||||
func (*TMRank) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{6}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *TMRank) GetRankId() int32 {
|
||||
|
@ -762,7 +841,7 @@ type SCTMRankList struct {
|
|||
func (x *SCTMRankList) Reset() {
|
||||
*x = SCTMRankList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[7]
|
||||
mi := &file_tournament_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -775,7 +854,7 @@ func (x *SCTMRankList) String() string {
|
|||
func (*SCTMRankList) ProtoMessage() {}
|
||||
|
||||
func (x *SCTMRankList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[7]
|
||||
mi := &file_tournament_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -788,7 +867,7 @@ func (x *SCTMRankList) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCTMRankList.ProtoReflect.Descriptor instead.
|
||||
func (*SCTMRankList) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{7}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *SCTMRankList) GetTMId() int32 {
|
||||
|
@ -826,7 +905,7 @@ type CSSignRace struct {
|
|||
func (x *CSSignRace) Reset() {
|
||||
*x = CSSignRace{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[8]
|
||||
mi := &file_tournament_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -839,7 +918,7 @@ func (x *CSSignRace) String() string {
|
|||
func (*CSSignRace) ProtoMessage() {}
|
||||
|
||||
func (x *CSSignRace) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[8]
|
||||
mi := &file_tournament_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -852,7 +931,7 @@ func (x *CSSignRace) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSSignRace.ProtoReflect.Descriptor instead.
|
||||
func (*CSSignRace) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{8}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *CSSignRace) GetOpCode() int32 {
|
||||
|
@ -883,7 +962,7 @@ type SCSignRace struct {
|
|||
func (x *SCSignRace) Reset() {
|
||||
*x = SCSignRace{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[9]
|
||||
mi := &file_tournament_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -896,7 +975,7 @@ func (x *SCSignRace) String() string {
|
|||
func (*SCSignRace) ProtoMessage() {}
|
||||
|
||||
func (x *SCSignRace) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[9]
|
||||
mi := &file_tournament_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -909,7 +988,7 @@ func (x *SCSignRace) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCSignRace.ProtoReflect.Descriptor instead.
|
||||
func (*SCSignRace) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{9}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *SCSignRace) GetOpCode() int32 {
|
||||
|
@ -947,7 +1026,7 @@ type SCSyncSignNum struct {
|
|||
func (x *SCSyncSignNum) Reset() {
|
||||
*x = SCSyncSignNum{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[10]
|
||||
mi := &file_tournament_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -960,7 +1039,7 @@ func (x *SCSyncSignNum) String() string {
|
|||
func (*SCSyncSignNum) ProtoMessage() {}
|
||||
|
||||
func (x *SCSyncSignNum) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[10]
|
||||
mi := &file_tournament_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -973,7 +1052,7 @@ func (x *SCSyncSignNum) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCSyncSignNum.ProtoReflect.Descriptor instead.
|
||||
func (*SCSyncSignNum) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{10}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *SCSyncSignNum) GetSignNum() int32 {
|
||||
|
@ -1003,7 +1082,7 @@ type SCTMStart struct {
|
|||
func (x *SCTMStart) Reset() {
|
||||
*x = SCTMStart{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[11]
|
||||
mi := &file_tournament_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1016,7 +1095,7 @@ func (x *SCTMStart) String() string {
|
|||
func (*SCTMStart) ProtoMessage() {}
|
||||
|
||||
func (x *SCTMStart) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[11]
|
||||
mi := &file_tournament_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1029,7 +1108,7 @@ func (x *SCTMStart) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCTMStart.ProtoReflect.Descriptor instead.
|
||||
func (*SCTMStart) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{11}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *SCTMStart) GetMatchId() int32 {
|
||||
|
@ -1052,7 +1131,7 @@ type RankAward struct {
|
|||
func (x *RankAward) Reset() {
|
||||
*x = RankAward{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[12]
|
||||
mi := &file_tournament_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1065,7 +1144,7 @@ func (x *RankAward) String() string {
|
|||
func (*RankAward) ProtoMessage() {}
|
||||
|
||||
func (x *RankAward) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[12]
|
||||
mi := &file_tournament_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1078,7 +1157,7 @@ func (x *RankAward) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use RankAward.ProtoReflect.Descriptor instead.
|
||||
func (*RankAward) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{12}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *RankAward) GetItemInfo() []*ItemInfo {
|
||||
|
@ -1123,7 +1202,7 @@ type SCPromotionInfo struct {
|
|||
func (x *SCPromotionInfo) Reset() {
|
||||
*x = SCPromotionInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[13]
|
||||
mi := &file_tournament_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1136,7 +1215,7 @@ func (x *SCPromotionInfo) String() string {
|
|||
func (*SCPromotionInfo) ProtoMessage() {}
|
||||
|
||||
func (x *SCPromotionInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[13]
|
||||
mi := &file_tournament_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1149,7 +1228,7 @@ func (x *SCPromotionInfo) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCPromotionInfo.ProtoReflect.Descriptor instead.
|
||||
func (*SCPromotionInfo) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{13}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *SCPromotionInfo) GetRetCode() int32 {
|
||||
|
@ -1225,7 +1304,7 @@ type CSTMSeasonInfo struct {
|
|||
func (x *CSTMSeasonInfo) Reset() {
|
||||
*x = CSTMSeasonInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[14]
|
||||
mi := &file_tournament_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1238,7 +1317,7 @@ func (x *CSTMSeasonInfo) String() string {
|
|||
func (*CSTMSeasonInfo) ProtoMessage() {}
|
||||
|
||||
func (x *CSTMSeasonInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[14]
|
||||
mi := &file_tournament_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1251,7 +1330,7 @@ func (x *CSTMSeasonInfo) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSTMSeasonInfo.ProtoReflect.Descriptor instead.
|
||||
func (*CSTMSeasonInfo) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{14}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
type SCTMSeasonInfo struct {
|
||||
|
@ -1269,7 +1348,7 @@ type SCTMSeasonInfo struct {
|
|||
func (x *SCTMSeasonInfo) Reset() {
|
||||
*x = SCTMSeasonInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[15]
|
||||
mi := &file_tournament_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1282,7 +1361,7 @@ func (x *SCTMSeasonInfo) String() string {
|
|||
func (*SCTMSeasonInfo) ProtoMessage() {}
|
||||
|
||||
func (x *SCTMSeasonInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[15]
|
||||
mi := &file_tournament_proto_msgTypes[16]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1295,7 +1374,7 @@ func (x *SCTMSeasonInfo) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCTMSeasonInfo.ProtoReflect.Descriptor instead.
|
||||
func (*SCTMSeasonInfo) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{15}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
func (x *SCTMSeasonInfo) GetId() int32 {
|
||||
|
@ -1348,7 +1427,7 @@ type SeasonRank struct {
|
|||
func (x *SeasonRank) Reset() {
|
||||
*x = SeasonRank{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[16]
|
||||
mi := &file_tournament_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1361,7 +1440,7 @@ func (x *SeasonRank) String() string {
|
|||
func (*SeasonRank) ProtoMessage() {}
|
||||
|
||||
func (x *SeasonRank) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[16]
|
||||
mi := &file_tournament_proto_msgTypes[17]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1374,7 +1453,7 @@ func (x *SeasonRank) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SeasonRank.ProtoReflect.Descriptor instead.
|
||||
func (*SeasonRank) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{16}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
func (x *SeasonRank) GetSnid() int32 {
|
||||
|
@ -1414,7 +1493,7 @@ type CSTMSeasonRank struct {
|
|||
func (x *CSTMSeasonRank) Reset() {
|
||||
*x = CSTMSeasonRank{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[17]
|
||||
mi := &file_tournament_proto_msgTypes[18]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1427,7 +1506,7 @@ func (x *CSTMSeasonRank) String() string {
|
|||
func (*CSTMSeasonRank) ProtoMessage() {}
|
||||
|
||||
func (x *CSTMSeasonRank) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[17]
|
||||
mi := &file_tournament_proto_msgTypes[18]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1440,7 +1519,7 @@ func (x *CSTMSeasonRank) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSTMSeasonRank.ProtoReflect.Descriptor instead.
|
||||
func (*CSTMSeasonRank) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{17}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{18}
|
||||
}
|
||||
|
||||
type SCTMSeasonRank struct {
|
||||
|
@ -1454,7 +1533,7 @@ type SCTMSeasonRank struct {
|
|||
func (x *SCTMSeasonRank) Reset() {
|
||||
*x = SCTMSeasonRank{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[18]
|
||||
mi := &file_tournament_proto_msgTypes[19]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1467,7 +1546,7 @@ func (x *SCTMSeasonRank) String() string {
|
|||
func (*SCTMSeasonRank) ProtoMessage() {}
|
||||
|
||||
func (x *SCTMSeasonRank) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[18]
|
||||
mi := &file_tournament_proto_msgTypes[19]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1480,7 +1559,7 @@ func (x *SCTMSeasonRank) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCTMSeasonRank.ProtoReflect.Descriptor instead.
|
||||
func (*SCTMSeasonRank) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{18}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{19}
|
||||
}
|
||||
|
||||
func (x *SCTMSeasonRank) GetReasonRanks() []*SeasonRank {
|
||||
|
@ -1502,7 +1581,7 @@ type CSTMSeasonAward struct {
|
|||
func (x *CSTMSeasonAward) Reset() {
|
||||
*x = CSTMSeasonAward{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[19]
|
||||
mi := &file_tournament_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1515,7 +1594,7 @@ func (x *CSTMSeasonAward) String() string {
|
|||
func (*CSTMSeasonAward) ProtoMessage() {}
|
||||
|
||||
func (x *CSTMSeasonAward) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[19]
|
||||
mi := &file_tournament_proto_msgTypes[20]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1528,7 +1607,7 @@ func (x *CSTMSeasonAward) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSTMSeasonAward.ProtoReflect.Descriptor instead.
|
||||
func (*CSTMSeasonAward) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{19}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{20}
|
||||
}
|
||||
|
||||
func (x *CSTMSeasonAward) GetLv() int32 {
|
||||
|
@ -1550,7 +1629,7 @@ type SCTMSeasonAward struct {
|
|||
func (x *SCTMSeasonAward) Reset() {
|
||||
*x = SCTMSeasonAward{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tournament_proto_msgTypes[20]
|
||||
mi := &file_tournament_proto_msgTypes[21]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -1563,7 +1642,7 @@ func (x *SCTMSeasonAward) String() string {
|
|||
func (*SCTMSeasonAward) ProtoMessage() {}
|
||||
|
||||
func (x *SCTMSeasonAward) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tournament_proto_msgTypes[20]
|
||||
mi := &file_tournament_proto_msgTypes[21]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -1576,7 +1655,7 @@ func (x *SCTMSeasonAward) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCTMSeasonAward.ProtoReflect.Descriptor instead.
|
||||
func (*SCTMSeasonAward) Descriptor() ([]byte, []int) {
|
||||
return file_tournament_proto_rawDescGZIP(), []int{20}
|
||||
return file_tournament_proto_rawDescGZIP(), []int{21}
|
||||
}
|
||||
|
||||
func (x *SCTMSeasonAward) GetLv() int32 {
|
||||
|
@ -1616,7 +1695,7 @@ var file_tournament_proto_rawDesc = []byte{
|
|||
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x55, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x55, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x44, 0x6f, 0x77, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x09, 0x44, 0x6f, 0x77, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xfe, 0x05,
|
||||
0x28, 0x05, 0x52, 0x09, 0x44, 0x6f, 0x77, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x96, 0x06,
|
||||
0x0a, 0x06, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65,
|
||||
0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61,
|
||||
|
@ -1664,12 +1743,21 @@ var file_tournament_proto_rawDesc = []byte{
|
|||
0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x6e, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x53,
|
||||
0x0a, 0x09, 0x53, 0x43, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x2a, 0x0a, 0x06, 0x54,
|
||||
0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f,
|
||||
0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x06, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4c,
|
||||
0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x53, 0x68, 0x6f, 0x77, 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x0d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54,
|
||||
0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53,
|
||||
0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x6f, 0x72,
|
||||
0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x02, 0x4f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x02, 0x49, 0x64, 0x22, 0x6e, 0x0a, 0x09, 0x53, 0x43, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x73,
|
||||
0x12, 0x2a, 0x0a, 0x06, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x12, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x4d,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x08,
|
||||
0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
|
||||
0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x0c, 0x43, 0x53, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x06, 0x54, 0x4d, 0x52, 0x61, 0x6e,
|
||||
|
@ -1819,7 +1907,7 @@ func file_tournament_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_tournament_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_tournament_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
||||
var file_tournament_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
||||
var file_tournament_proto_goTypes = []interface{}{
|
||||
(TOURNAMENTID)(0), // 0: tournament.TOURNAMENTID
|
||||
(SignRaceCode)(0), // 1: tournament.SignRaceCode
|
||||
|
@ -1827,40 +1915,42 @@ var file_tournament_proto_goTypes = []interface{}{
|
|||
(*ItemInfo)(nil), // 3: tournament.ItemInfo
|
||||
(*MatchInfoAward)(nil), // 4: tournament.MatchInfoAward
|
||||
(*TMInfo)(nil), // 5: tournament.TMInfo
|
||||
(*SCTMInfos)(nil), // 6: tournament.SCTMInfos
|
||||
(*CSTMRankList)(nil), // 7: tournament.CSTMRankList
|
||||
(*TMRank)(nil), // 8: tournament.TMRank
|
||||
(*SCTMRankList)(nil), // 9: tournament.SCTMRankList
|
||||
(*CSSignRace)(nil), // 10: tournament.CSSignRace
|
||||
(*SCSignRace)(nil), // 11: tournament.SCSignRace
|
||||
(*SCSyncSignNum)(nil), // 12: tournament.SCSyncSignNum
|
||||
(*SCTMStart)(nil), // 13: tournament.SCTMStart
|
||||
(*RankAward)(nil), // 14: tournament.RankAward
|
||||
(*SCPromotionInfo)(nil), // 15: tournament.SCPromotionInfo
|
||||
(*CSTMSeasonInfo)(nil), // 16: tournament.CSTMSeasonInfo
|
||||
(*SCTMSeasonInfo)(nil), // 17: tournament.SCTMSeasonInfo
|
||||
(*SeasonRank)(nil), // 18: tournament.SeasonRank
|
||||
(*CSTMSeasonRank)(nil), // 19: tournament.CSTMSeasonRank
|
||||
(*SCTMSeasonRank)(nil), // 20: tournament.SCTMSeasonRank
|
||||
(*CSTMSeasonAward)(nil), // 21: tournament.CSTMSeasonAward
|
||||
(*SCTMSeasonAward)(nil), // 22: tournament.SCTMSeasonAward
|
||||
nil, // 23: tournament.SCPromotionInfo.RecordEntry
|
||||
(*MatchTypeInfo)(nil), // 6: tournament.MatchTypeInfo
|
||||
(*SCTMInfos)(nil), // 7: tournament.SCTMInfos
|
||||
(*CSTMRankList)(nil), // 8: tournament.CSTMRankList
|
||||
(*TMRank)(nil), // 9: tournament.TMRank
|
||||
(*SCTMRankList)(nil), // 10: tournament.SCTMRankList
|
||||
(*CSSignRace)(nil), // 11: tournament.CSSignRace
|
||||
(*SCSignRace)(nil), // 12: tournament.SCSignRace
|
||||
(*SCSyncSignNum)(nil), // 13: tournament.SCSyncSignNum
|
||||
(*SCTMStart)(nil), // 14: tournament.SCTMStart
|
||||
(*RankAward)(nil), // 15: tournament.RankAward
|
||||
(*SCPromotionInfo)(nil), // 16: tournament.SCPromotionInfo
|
||||
(*CSTMSeasonInfo)(nil), // 17: tournament.CSTMSeasonInfo
|
||||
(*SCTMSeasonInfo)(nil), // 18: tournament.SCTMSeasonInfo
|
||||
(*SeasonRank)(nil), // 19: tournament.SeasonRank
|
||||
(*CSTMSeasonRank)(nil), // 20: tournament.CSTMSeasonRank
|
||||
(*SCTMSeasonRank)(nil), // 21: tournament.SCTMSeasonRank
|
||||
(*CSTMSeasonAward)(nil), // 22: tournament.CSTMSeasonAward
|
||||
(*SCTMSeasonAward)(nil), // 23: tournament.SCTMSeasonAward
|
||||
nil, // 24: tournament.SCPromotionInfo.RecordEntry
|
||||
}
|
||||
var file_tournament_proto_depIdxs = []int32{
|
||||
3, // 0: tournament.MatchInfoAward.ItemInfo:type_name -> tournament.ItemInfo
|
||||
4, // 1: tournament.TMInfo.Award:type_name -> tournament.MatchInfoAward
|
||||
3, // 2: tournament.TMInfo.SignupCostItem:type_name -> tournament.ItemInfo
|
||||
5, // 3: tournament.SCTMInfos.TMInfo:type_name -> tournament.TMInfo
|
||||
8, // 4: tournament.SCTMRankList.TMRank:type_name -> tournament.TMRank
|
||||
3, // 5: tournament.RankAward.ItemInfo:type_name -> tournament.ItemInfo
|
||||
23, // 6: tournament.SCPromotionInfo.Record:type_name -> tournament.SCPromotionInfo.RecordEntry
|
||||
14, // 7: tournament.SCPromotionInfo.RankAward:type_name -> tournament.RankAward
|
||||
18, // 8: tournament.SCTMSeasonRank.ReasonRanks:type_name -> tournament.SeasonRank
|
||||
9, // [9:9] is the sub-list for method output_type
|
||||
9, // [9:9] is the sub-list for method input_type
|
||||
9, // [9:9] is the sub-list for extension type_name
|
||||
9, // [9:9] is the sub-list for extension extendee
|
||||
0, // [0:9] is the sub-list for field type_name
|
||||
6, // 4: tournament.SCTMInfos.TypeList:type_name -> tournament.MatchTypeInfo
|
||||
9, // 5: tournament.SCTMRankList.TMRank:type_name -> tournament.TMRank
|
||||
3, // 6: tournament.RankAward.ItemInfo:type_name -> tournament.ItemInfo
|
||||
24, // 7: tournament.SCPromotionInfo.Record:type_name -> tournament.SCPromotionInfo.RecordEntry
|
||||
15, // 8: tournament.SCPromotionInfo.RankAward:type_name -> tournament.RankAward
|
||||
19, // 9: tournament.SCTMSeasonRank.ReasonRanks:type_name -> tournament.SeasonRank
|
||||
10, // [10:10] is the sub-list for method output_type
|
||||
10, // [10:10] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
10, // [10:10] is the sub-list for extension extendee
|
||||
0, // [0:10] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_tournament_proto_init() }
|
||||
|
@ -1918,7 +2008,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTMInfos); i {
|
||||
switch v := v.(*MatchTypeInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1930,7 +2020,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSTMRankList); i {
|
||||
switch v := v.(*SCTMInfos); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1942,7 +2032,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TMRank); i {
|
||||
switch v := v.(*CSTMRankList); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1954,7 +2044,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTMRankList); i {
|
||||
switch v := v.(*TMRank); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1966,7 +2056,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSSignRace); i {
|
||||
switch v := v.(*SCTMRankList); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1978,7 +2068,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCSignRace); i {
|
||||
switch v := v.(*CSSignRace); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1990,7 +2080,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCSyncSignNum); i {
|
||||
switch v := v.(*SCSignRace); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2002,7 +2092,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTMStart); i {
|
||||
switch v := v.(*SCSyncSignNum); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2014,7 +2104,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RankAward); i {
|
||||
switch v := v.(*SCTMStart); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2026,7 +2116,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCPromotionInfo); i {
|
||||
switch v := v.(*RankAward); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2038,7 +2128,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSTMSeasonInfo); i {
|
||||
switch v := v.(*SCPromotionInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2050,7 +2140,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTMSeasonInfo); i {
|
||||
switch v := v.(*CSTMSeasonInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2062,7 +2152,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SeasonRank); i {
|
||||
switch v := v.(*SCTMSeasonInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2074,7 +2164,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSTMSeasonRank); i {
|
||||
switch v := v.(*SeasonRank); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2086,7 +2176,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTMSeasonRank); i {
|
||||
switch v := v.(*CSTMSeasonRank); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2098,7 +2188,7 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSTMSeasonAward); i {
|
||||
switch v := v.(*SCTMSeasonRank); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -2110,6 +2200,18 @@ func file_tournament_proto_init() {
|
|||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSTMSeasonAward); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_tournament_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTMSeasonAward); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -2128,7 +2230,7 @@ func file_tournament_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_tournament_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 22,
|
||||
NumMessages: 23,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -63,12 +63,21 @@ message TMInfo{
|
|||
string Rule = 19;
|
||||
int32 SortId = 20;
|
||||
repeated string OnChannelName = 21;//在哪个渠道开启
|
||||
int32 ShowId = 22; // 比赛区分
|
||||
}
|
||||
|
||||
message MatchTypeInfo{
|
||||
string Name = 1; // 名称
|
||||
int32 SortId = 2; // 排序序号
|
||||
bool On = 3; // 开关
|
||||
int32 Id = 4; // 类型id
|
||||
}
|
||||
|
||||
//比赛场场次
|
||||
//PACKET_TM_SCTMInfos
|
||||
message SCTMInfos{
|
||||
repeated TMInfo TMInfo = 1;//比赛场场次信息
|
||||
repeated int32 TypeList = 2; // 所有玩法类型 1.锦标赛 2.实物赛 3.vip比赛 4.话费赛
|
||||
repeated MatchTypeInfo TypeList = 2; // 比赛类型列表
|
||||
}
|
||||
//单场次排行榜
|
||||
//PACKET_TM_CSTMRankList
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -446,6 +446,7 @@ message GameMatchDate {
|
|||
int32 MatchLevel = 22; // 难度等级
|
||||
repeated string OnChannelName = 23; // 开启的渠道名称
|
||||
int32 CardType = 24; // 手机卡类型
|
||||
int32 ShowId = 25; // 比赛区分
|
||||
}
|
||||
|
||||
// etcd /game/game_match
|
||||
|
@ -454,10 +455,17 @@ message GameMatchDateList{
|
|||
string Platform = 2;
|
||||
}
|
||||
|
||||
message MatchTypeInfo{
|
||||
string Name = 1; // 名称
|
||||
int32 SortId = 2; // 序号
|
||||
bool On = 3; // 开关
|
||||
int32 Id = 4; // 类型id
|
||||
}
|
||||
|
||||
// etcd /game/match_type
|
||||
message GameMatchType{
|
||||
string Platform = 1;
|
||||
repeated int32 List = 2; // 所有玩法类型 1.锦标赛 2.实物赛 3.vip比赛 4.话费赛
|
||||
repeated MatchTypeInfo List = 2; // 比赛类型列表
|
||||
}
|
||||
|
||||
message WelfareDate {
|
||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit 38b1c8928c52249a60d1340372a2d9bd6d2eee01
|
||||
Subproject commit e26134143eba5c7ced96afc84bde42705a9297be
|
|
@ -20,6 +20,13 @@ func init() {
|
|||
netlib.Register(int(gamehallproto.GameHallPacketID_PACKET_SC_QUITGAME), gamehallproto.SCQuitGame{}, SCQuitGame)
|
||||
}
|
||||
|
||||
func cleanRoomState(s *netlib.Session) {
|
||||
s.RemoveAttribute(SessionAttributeScene)
|
||||
s.RemoveAttribute(SessionAttributeSceneId)
|
||||
s.RemoveAttribute(SessionAttributeEnteringScene)
|
||||
s.RemoveAttribute(SessionAttributeEnteringMatchScene)
|
||||
}
|
||||
|
||||
func SCEnterRoom(s *netlib.Session, packid int, pack interface{}) error {
|
||||
logger.Logger.Trace("SCEnterRoom ", pack)
|
||||
msg, ok := pack.(*gamehallproto.SCEnterRoom)
|
||||
|
@ -44,10 +51,7 @@ func SCDestroyRoom(s *netlib.Session, packid int, pack interface{}) error {
|
|||
}
|
||||
|
||||
if msg.GetOpRetCode() == gamehallproto.OpResultCode_Game_OPRC_Sucess_Game {
|
||||
s.RemoveAttribute(SessionAttributeScene)
|
||||
s.RemoveAttribute(SessionAttributeSceneId)
|
||||
s.RemoveAttribute(SessionAttributeEnteringScene)
|
||||
s.RemoveAttribute(SessionAttributeEnteringMatchScene)
|
||||
cleanRoomState(s)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -72,10 +76,7 @@ func SCLeaveRoom(s *netlib.Session, packid int, pack interface{}) error {
|
|||
scene.DelPlayer(p.GetSnId())
|
||||
}
|
||||
}
|
||||
s.RemoveAttribute(SessionAttributeScene)
|
||||
s.RemoveAttribute(SessionAttributeSceneId)
|
||||
s.RemoveAttribute(SessionAttributeEnteringScene)
|
||||
s.RemoveAttribute(SessionAttributeEnteringMatchScene)
|
||||
cleanRoomState(s)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -118,10 +119,7 @@ func SCQuitGame(s *netlib.Session, packid int, pack interface{}) error {
|
|||
scene.DelPlayer(p.GetSnId())
|
||||
}
|
||||
}
|
||||
s.RemoveAttribute(SessionAttributeScene)
|
||||
s.RemoveAttribute(SessionAttributeSceneId)
|
||||
s.RemoveAttribute(SessionAttributeEnteringScene)
|
||||
s.RemoveAttribute(SessionAttributeEnteringMatchScene)
|
||||
cleanRoomState(s)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1237,36 +1237,6 @@ func RefreshTransferThird2SystemTask(p *Player) {
|
|||
})
|
||||
}
|
||||
|
||||
type CSGetPrivateRoomHistoryPacketFactory struct {
|
||||
}
|
||||
type CSGetPrivateRoomHistoryHandler struct {
|
||||
}
|
||||
|
||||
func (this *CSGetPrivateRoomHistoryPacketFactory) CreatePacket() interface{} {
|
||||
pack := &gamehall.CSGetPrivateRoomHistory{}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (this *CSGetPrivateRoomHistoryHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSGetPrivateRoomHistoryHandler Process recv ", data)
|
||||
if msg, ok := data.(*gamehall.CSGetPrivateRoomHistory); ok {
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warn("CSGetPrivateRoomHistoryHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
|
||||
pps := PrivateSceneMgrSington.GetOrCreatePlayerPrivateScene(p)
|
||||
if pps == nil {
|
||||
logger.Logger.Warnf("CSGetPrivateRoomHistoryHandler PrivateSceneMgrSington.GetOrCreatePlayerPrivateScene(%v)", p.SnId)
|
||||
return nil
|
||||
}
|
||||
|
||||
pps.LoadLogs(p, msg.GetQueryTime())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CSQueryRoomInfoPacketFactory struct {
|
||||
}
|
||||
type CSQueryRoomInfoHandler struct {
|
||||
|
|
|
@ -260,7 +260,6 @@ func init() {
|
|||
scene.starting = msg.GetStart()
|
||||
scene.currRound = msg.GetCurrRound()
|
||||
scene.totalRound = msg.GetMaxRound()
|
||||
scene.lastTime = time.Now()
|
||||
if scene.starting {
|
||||
if scene.currRound == 1 {
|
||||
scene.startTime = time.Now()
|
||||
|
|
|
@ -8,13 +8,11 @@ import (
|
|||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
"mongo.games.com/goserver/core/transact"
|
||||
"mongo.games.com/goserver/srvlib"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/proto"
|
||||
hall_proto "mongo.games.com/game/protocol/gamehall"
|
||||
"mongo.games.com/game/protocol/server"
|
||||
server_proto "mongo.games.com/game/protocol/server"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/game/srvdata"
|
||||
)
|
||||
|
@ -465,16 +463,15 @@ func (this *CoinSceneMgr) OnPlatformDestroy(p *Platform) {
|
|||
if p == nil {
|
||||
return
|
||||
}
|
||||
var ids []int
|
||||
if v, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
for _, csp := range v {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
for _, scene := range csp.scenes {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
}
|
||||
// 房间中记录的有游服连接,广播的方式也可以
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
}
|
||||
}
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
|
||||
func (this *CoinSceneMgr) OnPlatformChangeDisabled(p *Platform, disabled bool) {
|
||||
|
@ -501,12 +498,11 @@ func (this *CoinSceneMgr) OnPlatformGameFreeUpdate(p *Platform, oldCfg, newCfg *
|
|||
|
||||
if cps, ok := ss[newCfg.DbGameFree.Id]; ok {
|
||||
cps.dbGameFree = newCfg.DbGameFree
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
var ids []int
|
||||
for _, scene := range cps.scenes {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE),
|
||||
pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
this.TouchCreateRoom(p.IdStr, newCfg.DbGameFree.Id)
|
||||
}
|
||||
}
|
||||
|
@ -516,15 +512,15 @@ func (this *CoinSceneMgr) OnPlatformDestroyByGameFreeId(p *Platform, gameFreeId
|
|||
return
|
||||
}
|
||||
if csps, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
var ids []int
|
||||
for _, csp := range csps {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
for _, scene := range csp.scenes {
|
||||
if scene.dbGameFree.Id == gameFreeId {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
}
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -550,11 +546,11 @@ func (this *CoinSceneMgr) OnGameGroupUpdate(oldCfg, newCfg *webapi.GameConfigGro
|
|||
//TODO 预创建房间配置更新,unsupport group model
|
||||
cps.dbGameFree = newCfg.DbGameFree
|
||||
if needDestroy {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
var ids []int
|
||||
for _, scene := range cps.scenes {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ func (csp *CoinScenePool) OnPlayerLeave(s *Scene, p *Player) {
|
|||
// 玩家离开结算空房间的私人房
|
||||
if s.IsPrivateScene() {
|
||||
if s.IsEmpty() {
|
||||
s.ForceDelete(false)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ func (csp *CoinScenePool) OnPlayerLeave(s *Scene, p *Player) {
|
|||
}
|
||||
}
|
||||
if hasCnt > int(csp.dbGameFree.GetCreateRoomNum()) {
|
||||
s.ForceDelete(false)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,18 +2,18 @@ package main
|
|||
|
||||
import (
|
||||
"math/rand"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
gamehall_proto "mongo.games.com/game/protocol/gamehall"
|
||||
server_proto "mongo.games.com/game/protocol/server"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/game/srvdata"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
"mongo.games.com/goserver/srvlib"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -555,11 +555,11 @@ func (this *HundredSceneMgr) OnPlatformDestroy(p *Platform) {
|
|||
return
|
||||
}
|
||||
if ss, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
var ids []int
|
||||
for _, scene := range ss {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -569,11 +569,11 @@ func (this *HundredSceneMgr) OnPlatformChangeIsolated(p *Platform, isolated bool
|
|||
this.OnPlatformCreate(p) //预创建场景
|
||||
} else {
|
||||
if ss, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
var ids []int
|
||||
for _, scene := range ss {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -585,11 +585,11 @@ func (this *HundredSceneMgr) OnPlatformChangeDisabled(p *Platform, disabled bool
|
|||
}
|
||||
if disabled {
|
||||
if ss, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
var ids []int
|
||||
for _, scene := range ss {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -600,25 +600,15 @@ func (this *HundredSceneMgr) OnPlatformGameFreeUpdate(p *Platform, oldCfg, newCf
|
|||
}
|
||||
if oldCfg.GroupId != newCfg.GroupId || oldCfg.GroupId != 0 {
|
||||
if scenes, exist := this.scenesOfGroup[oldCfg.GroupId]; exist {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
if s, ok := scenes[newCfg.DbGameFree.Id]; ok {
|
||||
pack.Ids = append(pack.Ids, int32(s.sceneId))
|
||||
}
|
||||
if len(pack.Ids) > 0 {
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE),
|
||||
pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
if scenes, exist := this.scenesOfPlatform[p.IdStr]; exist {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
if s, ok := scenes[newCfg.DbGameFree.Id]; ok {
|
||||
pack.Ids = append(pack.Ids, int32(s.sceneId))
|
||||
}
|
||||
if len(pack.Ids) > 0 {
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE),
|
||||
pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -639,9 +629,7 @@ func (this *HundredSceneMgr) OnGameGroupUpdate(oldCfg, newCfg *webapi.GameConfig
|
|||
needDestroy = true
|
||||
}
|
||||
if needDestroy {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
pack.Ids = append(pack.Ids, int32(s.sceneId))
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
SceneMgrSingleton.DoDelete([]int{s.sceneId}, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -726,13 +714,13 @@ func (this *HundredSceneMgr) OnPlatformDestroyByGameFreeId(p *Platform, gameFree
|
|||
return
|
||||
}
|
||||
if scenes, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
var ids []int
|
||||
for _, scene := range scenes {
|
||||
pack := &server_proto.WGGraceDestroyScene{}
|
||||
if scene.dbGameFree.Id == gameFreeId {
|
||||
pack.Ids = append(pack.Ids, int32(scene.sceneId))
|
||||
ids = append(ids, scene.sceneId)
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
}
|
||||
SceneMgrSingleton.DoDelete(ids, true)
|
||||
}
|
||||
}
|
||||
func init() {
|
||||
|
|
|
@ -177,7 +177,7 @@ func (ms *MatchSceneMgr) MatchStop(tm *TmMatch) {
|
|||
if SceneMgrSingleton.scenes != nil && tm != nil {
|
||||
for _, scene := range SceneMgrSingleton.scenes {
|
||||
if scene.IsMatchScene() && scene.matchId == tm.SortId {
|
||||
scene.ForceDelete(false)
|
||||
scene.DoDelete(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,334 +0,0 @@
|
|||
package main
|
||||
|
||||
//
|
||||
//import (
|
||||
// "mongo.games.com/game/common"
|
||||
// "mongo.games.com/game/proto"
|
||||
// "mongo.games.com/game/protocol/mngame"
|
||||
// server_proto "mongo.games.com/game/protocol/server"
|
||||
// webapi_proto "mongo.games.com/game/protocol/webapi"
|
||||
// "mongo.games.com/game/srvdata"
|
||||
// "mongo.games.com/goserver/core/logger"
|
||||
// "mongo.games.com/goserver/srvlib"
|
||||
// srvlibproto "mongo.games.com/goserver/srvlib/protocol"
|
||||
//)
|
||||
//
|
||||
//var MiniGameMgrSington = &MiniGameMgr{
|
||||
// //按平台管理
|
||||
// scenesOfPlatform: make(map[string]map[int32]*Scene),
|
||||
// //玩家当前打开的小游戏列表
|
||||
// playerGaming: make(map[int32]map[int32]*Scene),
|
||||
// matchAutoId: common.MiniGameSceneStartId,
|
||||
//}
|
||||
//
|
||||
//type MiniGameMgr struct {
|
||||
// BasePlayerListener
|
||||
// //按平台管理
|
||||
// scenesOfPlatform map[string]map[int32]*Scene
|
||||
// //玩家当前打开的小游戏列表
|
||||
// playerGaming map[int32]map[int32]*Scene
|
||||
// matchAutoId int
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) GenOneSceneId() int {
|
||||
// this.matchAutoId++
|
||||
// if this.matchAutoId > common.MiniGameSceneMaxId {
|
||||
// this.matchAutoId = common.MiniGameSceneStartId
|
||||
// }
|
||||
// return this.matchAutoId
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) PlayerEnter(p *Player, id int32) mngame.MNGameOpResultCode {
|
||||
// plt := p.GetPlatform()
|
||||
// s := this.GetScene(plt, id)
|
||||
// if s == nil {
|
||||
// return mngame.MNGameOpResultCode_MNGAME_OPRC_Error
|
||||
// }
|
||||
//
|
||||
// if !s.PlayerEnterMiniGame(p) {
|
||||
// return mngame.MNGameOpResultCode_MNGAME_OPRC_Error
|
||||
// }
|
||||
//
|
||||
// gamings, ok := this.playerGaming[p.SnId]
|
||||
// if !ok {
|
||||
// gamings = make(map[int32]*Scene)
|
||||
// this.playerGaming[p.SnId] = gamings
|
||||
// }
|
||||
// gamings[id] = s
|
||||
//
|
||||
// return mngame.MNGameOpResultCode_MNGAME_OPRC_Sucess
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) PlayerLeave(p *Player, id int32) mngame.MNGameOpResultCode {
|
||||
// plt := p.GetPlatform()
|
||||
// s := this.GetScene(plt, id)
|
||||
// if s == nil {
|
||||
// return mngame.MNGameOpResultCode_MNGAME_OPRC_Error
|
||||
// }
|
||||
//
|
||||
// if !s.PlayerLeaveMiniGame(p) {
|
||||
// return mngame.MNGameOpResultCode_MNGAME_OPRC_Error
|
||||
// }
|
||||
//
|
||||
// gamings, ok := this.playerGaming[p.SnId]
|
||||
// if ok {
|
||||
// delete(gamings, id)
|
||||
// }
|
||||
//
|
||||
// return mngame.MNGameOpResultCode_MNGAME_OPRC_Sucess
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) PlayerMsgDispatcher(p *Player, msg *mngame.CSMNGameDispatcher) {
|
||||
// plt := p.GetPlatform()
|
||||
// s := this.GetScene(plt, msg.GetId())
|
||||
// if s == nil {
|
||||
// logger.Logger.Errorf("MiniGameMgr.PlayerMsgDispatcher Can't find scene! plt:%v gameId:%v", plt, msg.GetId())
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// //minigamesrv 重启容错
|
||||
// if !s.HasPlayer(p) {
|
||||
// this.PlayerEnter(p, msg.GetId())
|
||||
// }
|
||||
// s.RedirectMiniGameMsg(p, msg)
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) GetScene(p *Platform, id int32) *Scene {
|
||||
// scenes, ok := this.scenesOfPlatform[p.IdStr]
|
||||
// if !ok {
|
||||
// scenes = make(map[int32]*Scene)
|
||||
// this.scenesOfPlatform[p.IdStr] = scenes
|
||||
// }
|
||||
//
|
||||
// s, ok := scenes[id]
|
||||
// if !ok {
|
||||
// cfg := PlatformMgrSingleton.GetGameFree(p.IdStr, id)
|
||||
// if cfg != nil && cfg.Status && cfg.DbGameFree.GetGameType() == common.GameType_Mini {
|
||||
// s = this.CreateSceneByPlatform(p, cfg)
|
||||
// if s != nil {
|
||||
// scenes[cfg.DbGameFree.Id] = s
|
||||
// } else {
|
||||
// return nil
|
||||
// }
|
||||
// return s
|
||||
// } else {
|
||||
// return nil
|
||||
// }
|
||||
// } else {
|
||||
// return s
|
||||
// }
|
||||
// //return nil
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) CreateSceneByPlatform(p *Platform, cfg *webapi_proto.GameFree) *Scene {
|
||||
// sceneId := this.GenOneSceneId()
|
||||
// gameId := int(cfg.DbGameFree.GetGameId())
|
||||
// gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
// if gs == nil {
|
||||
// logger.Logger.Errorf("MiniGameMgr.CreateSceneByPlatform Get %v game min session failed.", gameId)
|
||||
// return nil
|
||||
// }
|
||||
// if gs != nil {
|
||||
// gameMode := cfg.DbGameFree.GetGameMode()
|
||||
// dbGameRule := srvdata.PBDB_GameRuleMgr.GetData(cfg.DbGameFree.GetGameRule())
|
||||
// params := dbGameRule.GetParams()
|
||||
// scene := SceneMgrSington.CreateScene(0, 0, sceneId, gameId, int(gameMode), common.SceneMode_Public, 1, -1, params,
|
||||
// gs, p, cfg.GroupId, cfg.DbGameFree, cfg.DbGameFree.Id)
|
||||
// if scene != nil {
|
||||
// scene.hallId = cfg.DbGameFree.Id
|
||||
// return scene
|
||||
// }
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlatformCreate(p *Platform) {
|
||||
// if p == nil {
|
||||
// return
|
||||
// }
|
||||
// scenes := make(map[int32]*Scene)
|
||||
// this.scenesOfPlatform[p.IdStr] = scenes
|
||||
//
|
||||
// gps := PlatformMgrSingleton.GetGameFrees(p.IdStr)
|
||||
// for _, v := range gps {
|
||||
// if v.Status && v.DbGameFree.GetGameType() == common.GameType_Mini {
|
||||
// s := this.CreateSceneByPlatform(p, v)
|
||||
// if s != nil {
|
||||
// scenes[v.DbGameFree.Id] = s
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlatformDestroy(p *Platform) {
|
||||
// if p == nil {
|
||||
// return
|
||||
// }
|
||||
// if scenes, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
// for _, s := range scenes {
|
||||
// pack := &server_proto.WGGraceDestroyScene{}
|
||||
// pack.Ids = append(pack.Ids, int32(s.sceneId))
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack)
|
||||
// }
|
||||
// delete(this.scenesOfPlatform, p.IdStr)
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlatformChangeIsolated(p *Platform, isolated bool) {
|
||||
// if p == nil {
|
||||
// return
|
||||
// }
|
||||
// if !isolated {
|
||||
// this.OnPlatformDestroy(p)
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlatformChangeDisabled(p *Platform, disabled bool) {
|
||||
// if p == nil {
|
||||
// return
|
||||
// }
|
||||
// if disabled {
|
||||
// this.OnPlatformDestroy(p)
|
||||
// } else {
|
||||
// this.OnPlatformCreate(p)
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlatformGameFreeUpdate(p *Platform, oldCfg, newCfg *webapi_proto.GameFree) {
|
||||
// if p == nil {
|
||||
// return
|
||||
// }
|
||||
// if scenes, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
// if oldCfg != nil {
|
||||
// if s, ok := scenes[oldCfg.DbGameFree.Id]; ok {
|
||||
// pack := &server_proto.WGGraceDestroyScene{}
|
||||
// pack.Ids = append(pack.Ids, int32(s.sceneId))
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack)
|
||||
// delete(scenes, oldCfg.DbGameFree.Id)
|
||||
// }
|
||||
// } else if newCfg != nil {
|
||||
// if newCfg.Status && newCfg.DbGameFree.GetGameType() == common.GameType_Mini {
|
||||
// s := this.CreateSceneByPlatform(p, newCfg)
|
||||
// if s != nil {
|
||||
// scenes[newCfg.DbGameFree.Id] = s
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnGameGroupUpdate(oldCfg, newCfg *webapi_proto.GameConfigGroup) {
|
||||
// //donothing
|
||||
//}
|
||||
//
|
||||
///*
|
||||
//获取platform下面对应的 player SnId所在的scene
|
||||
//*/
|
||||
//func (this *MiniGameMgr) GetAllSceneByPlayer(p *Player) map[int32]*Scene {
|
||||
// if gameingScenes, ok := this.playerGaming[p.SnId]; ok {
|
||||
// return gameingScenes
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlayerDropLine(p *Player) {
|
||||
// this.BasePlayerListener.OnPlayerDropLine(p)
|
||||
// if gamingScenes, ok := this.playerGaming[p.SnId]; ok {
|
||||
// for _, s := range gamingScenes {
|
||||
// pack := &server_proto.WGPlayerDropLine{
|
||||
// Id: proto.Int32(p.SnId),
|
||||
// SceneId: proto.Int(s.sceneId),
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_WG_PLAYERDROPLINE), pack)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlayerRehold(p *Player) {
|
||||
// this.BasePlayerListener.OnPlayerRehold(p)
|
||||
// var gateSid int64
|
||||
// if p.gateSess != nil {
|
||||
// if srvInfo, ok := p.gateSess.GetAttribute(srvlib.SessionAttributeServerInfo).(*srvlibproto.SSSrvRegiste); ok && srvInfo != nil {
|
||||
// sessionId := srvlib.NewSessionIdEx(srvInfo.GetAreaId(), srvInfo.GetType(), srvInfo.GetId(), 0)
|
||||
// gateSid = sessionId.Get()
|
||||
// }
|
||||
// }
|
||||
// if gamingScenes, ok := this.playerGaming[p.SnId]; ok {
|
||||
// for _, s := range gamingScenes {
|
||||
// pack := &server_proto.WGPlayerRehold{
|
||||
// Id: proto.Int32(p.SnId),
|
||||
// Sid: proto.Int64(p.sid),
|
||||
// SceneId: proto.Int(s.sceneId),
|
||||
// GateSid: proto.Int64(gateSid),
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_WG_PLAYERREHOLD), pack)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//func (this *MiniGameMgr) OnPlayerReturnScene(p *Player) {
|
||||
// this.BasePlayerListener.OnPlayerReturnScene(p)
|
||||
// if gameingScenes, ok := this.playerGaming[p.SnId]; ok {
|
||||
// for _, s := range gameingScenes {
|
||||
// pack := &server_proto.WGPlayerReturn{
|
||||
// PlayerId: p.SnId,
|
||||
// RoomId: int32(s.sceneId),
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_WG_PLAYERRETURN), pack)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnDestroyScene(s *Scene) {
|
||||
//
|
||||
// if pltScenes, ok := this.scenesOfPlatform[s.limitPlatform.IdStr]; ok {
|
||||
// delete(pltScenes, s.dbGameFree.Id)
|
||||
// }
|
||||
//
|
||||
// for snid, _ := range s.players {
|
||||
// if scenes, ok := this.playerGaming[snid]; ok {
|
||||
// delete(scenes, s.dbGameFree.Id)
|
||||
// if len(scenes) == 0 {
|
||||
// delete(this.playerGaming, snid)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) ClrPlayerWhiteBlackState(p *Player) {
|
||||
// if gamings, ok := this.playerGaming[p.SnId]; ok {
|
||||
// for _, s := range gamings {
|
||||
// pack := &server_proto.WGSetPlayerBlackLevel{
|
||||
// SnId: proto.Int32(p.SnId),
|
||||
// SceneId: proto.Int32(int32(s.sceneId)),
|
||||
// ResetTotalCoin: proto.Bool(true),
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_GW_AUTORELIEVEWBLEVEL), pack)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func (this *MiniGameMgr) OnPlatformDestroyByGameFreeId(p *Platform, gameFreeId int32) {
|
||||
// if p == nil {
|
||||
// return
|
||||
// }
|
||||
// if scenes, ok := this.scenesOfPlatform[p.IdStr]; ok {
|
||||
// for _, s := range scenes {
|
||||
// if s.dbGameFree.Id == gameFreeId {
|
||||
// pack := &server_proto.WGGraceDestroyScene{}
|
||||
// pack.Ids = append(pack.Ids, int32(s.sceneId))
|
||||
// s.SendToGame(int(server_proto.SSPacketID_PACKET_WG_GRACE_DESTROYSCENE), pack)
|
||||
// delete(scenes, gameFreeId)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//func init() {
|
||||
// RegistePlayerListener(MiniGameMgrSington)
|
||||
// PlatformMgrSingleton.RegisterObserver(MiniGameMgrSington)
|
||||
// PlatformGameGroupMgrSington.RegisterObserver(MiniGameMgrSington)
|
||||
//}
|
|
@ -1,276 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
"fmt"
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
hall_proto "mongo.games.com/game/protocol/gamehall"
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/task"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
PrivateSceneState_Deleting = iota //删除中
|
||||
PrivateSceneState_Deleted //已删除
|
||||
)
|
||||
|
||||
var PrivateSceneMgrSington = &PrivateSceneMgr{
|
||||
pps: make(map[int32]*PlayerPrivateScene),
|
||||
}
|
||||
|
||||
type PlayerPrivateScene struct {
|
||||
snid int32 // 玩家id
|
||||
creatorName string //创建人昵称
|
||||
platform string // 平台名称
|
||||
channel string // 渠道名称
|
||||
promoter string // 推广员
|
||||
packageTag string // 推广包标识
|
||||
scenes map[int]*Scene
|
||||
logsByDay map[int]*list.List
|
||||
dupLog map[string]struct{}
|
||||
loaded bool
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) AddScene(s *Scene) {
|
||||
pps.scenes[s.sceneId] = s
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) GetScene(sceneId int) *Scene {
|
||||
if s, exist := pps.scenes[sceneId]; exist {
|
||||
return s
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) GetCount() int {
|
||||
return len(pps.scenes)
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) CanDelete() bool {
|
||||
return !pps.loaded && len(pps.scenes) == 0
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) OnPlayerLogin(p *Player) {
|
||||
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) OnPlayerLogout(p *Player) {
|
||||
pps.logsByDay = nil
|
||||
pps.loaded = false
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) OnCreateScene(p *Player, s *Scene) {
|
||||
pps.scenes[s.sceneId] = s
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) LoadLogs(p *Player, yyyymmdd int32) {
|
||||
if !pps.loaded {
|
||||
var logs []*model.PrivateSceneLog
|
||||
var err error
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
logs, err = model.GetPrivateSceneLogBySnId(p.Platform, p.SnId, model.GameParamData.PrivateSceneLogLimit)
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
if err == nil {
|
||||
pps.loaded = true
|
||||
pps.TidyLog(logs)
|
||||
pps.SendLogs(p, yyyymmdd)
|
||||
}
|
||||
}), "GetPrivateSceneLogBySnId").Start()
|
||||
} else {
|
||||
pps.SendLogs(p, yyyymmdd)
|
||||
}
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) TidyLog(logs []*model.PrivateSceneLog) {
|
||||
if pps.logsByDay == nil {
|
||||
pps.logsByDay = make(map[int]*list.List)
|
||||
}
|
||||
|
||||
for _, log := range logs {
|
||||
if _, exist := pps.dupLog[log.LogId.Hex()]; exist {
|
||||
continue
|
||||
}
|
||||
y, m, d := log.CreateTime.Date()
|
||||
day := y*10000 + int(m)*100 + d
|
||||
if lst, exist := pps.logsByDay[day]; exist {
|
||||
lst.PushBack(log)
|
||||
} else {
|
||||
lst = list.New()
|
||||
pps.logsByDay[day] = lst
|
||||
lst.PushBack(log)
|
||||
}
|
||||
}
|
||||
pps.dupLog = nil
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) SendLogs(p *Player, yyyymmdd int32) {
|
||||
pack := &hall_proto.SCGetPrivateRoomHistory{
|
||||
QueryTime: proto.Int32(yyyymmdd),
|
||||
}
|
||||
if logs, exist := pps.logsByDay[int(yyyymmdd)]; exist {
|
||||
for e := logs.Front(); e != nil; e = e.Next() {
|
||||
if log, ok := e.Value.(*model.PrivateSceneLog); ok {
|
||||
data := &hall_proto.PrivateRoomHistory{
|
||||
GameFreeId: proto.Int32(log.GameFreeId),
|
||||
RoomId: proto.Int32(log.SceneId),
|
||||
CreateTime: proto.Int32(int32(log.CreateTime.Unix())),
|
||||
DestroyTime: proto.Int32(int32(log.DestroyTime.Unix())),
|
||||
CreateFee: proto.Int32(log.CreateFee),
|
||||
}
|
||||
pack.Datas = append(pack.Datas, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(hall_proto.GameHallPacketID_PACKET_SC_GETPRIVATEROOMHISTORY), pack)
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) PushLog(log *model.PrivateSceneLog) {
|
||||
if log == nil {
|
||||
return
|
||||
}
|
||||
|
||||
y, m, d := log.CreateTime.Date()
|
||||
day := y*10000 + int(m)*100 + d
|
||||
if lst, exist := pps.logsByDay[day]; exist {
|
||||
lst.PushFront(log)
|
||||
} else {
|
||||
lst = list.New()
|
||||
pps.logsByDay[day] = lst
|
||||
lst.PushFront(log)
|
||||
}
|
||||
if !pps.loaded {
|
||||
pps.dupLog[log.LogId.Hex()] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
func (pps *PlayerPrivateScene) SendPrivateScenes(p *Player) {
|
||||
pack := &hall_proto.SCGetPrivateRoomList{}
|
||||
for sceneid, s := range pps.scenes {
|
||||
data := &hall_proto.PrivateRoomInfo{
|
||||
GameFreeId: proto.Int32(s.dbGameFree.GetId()),
|
||||
RoomId: proto.Int(sceneid),
|
||||
CurrRound: proto.Int32(s.currRound),
|
||||
MaxRound: proto.Int32(s.totalRound),
|
||||
CurrNum: proto.Int(len(s.players)),
|
||||
MaxPlayer: proto.Int(s.playerNum),
|
||||
CreateTs: proto.Int32(int32(s.createTime.Unix())),
|
||||
}
|
||||
pack.Datas = append(pack.Datas, data)
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(hall_proto.GameHallPacketID_PACKET_SC_GETPRIVATEROOMLIST), pack)
|
||||
}
|
||||
|
||||
type PrivateSceneMgr struct {
|
||||
pps map[int32]*PlayerPrivateScene
|
||||
}
|
||||
|
||||
func (psm *PrivateSceneMgr) GetOrCreatePlayerPrivateScene(p *Player) *PlayerPrivateScene {
|
||||
snid := p.SnId
|
||||
if pps, exist := psm.pps[snid]; exist {
|
||||
return pps
|
||||
}
|
||||
|
||||
pps := &PlayerPrivateScene{
|
||||
snid: snid,
|
||||
creatorName: p.Name,
|
||||
platform: p.Platform,
|
||||
channel: p.Channel,
|
||||
promoter: strconv.Itoa(int(p.PromoterTree)),
|
||||
packageTag: p.PackageID,
|
||||
scenes: make(map[int]*Scene),
|
||||
logsByDay: make(map[int]*list.List),
|
||||
dupLog: make(map[string]struct{}),
|
||||
}
|
||||
|
||||
psm.pps[snid] = pps
|
||||
return pps
|
||||
}
|
||||
|
||||
func (psm *PrivateSceneMgr) GetPlayerPrivateScene(snid int32) *PlayerPrivateScene {
|
||||
if pps, exist := psm.pps[snid]; exist {
|
||||
return pps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (psm *PrivateSceneMgr) OnDestroyScene(scene *Scene) {
|
||||
if scene == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if !scene.IsPrivateScene() {
|
||||
return
|
||||
}
|
||||
|
||||
pps := psm.GetPlayerPrivateScene(scene.creator)
|
||||
if pps != nil {
|
||||
if pps.GetScene(scene.sceneId) == scene {
|
||||
delete(pps.scenes, scene.sceneId)
|
||||
var tax int32
|
||||
var returnCoin int32
|
||||
p := PlayerMgrSington.GetPlayerBySnId(scene.creator)
|
||||
|
||||
if scene.currRound == 0 && !scene.starting && scene.createFee > 0 { //未开始
|
||||
if scene.manualDelete && time.Now().Sub(scene.createTime) < time.Second*time.Duration(model.GameParamData.PrivateSceneFreeDistroySec) { //低于指定时间,要扣除部分费用
|
||||
tax = scene.createFee * int32(model.GameParamData.PrivateSceneDestroyTax) / 100
|
||||
returnCoin = scene.createFee - tax
|
||||
} else {
|
||||
returnCoin = scene.createFee
|
||||
}
|
||||
if returnCoin > 0 {
|
||||
if p != nil {
|
||||
var remark string
|
||||
if tax > 0 {
|
||||
remark = fmt.Sprintf("提前解散扣除费用%.02f", float32(tax)/100.0)
|
||||
}
|
||||
p.AddCoin(int64(returnCoin), 0, common.GainWay_PrivateSceneReturn, "", remark)
|
||||
} else {
|
||||
//TODO 发送邮件
|
||||
//sendClubMail_ClubCreateRoomRefund(scene.creator, scene.limitPlatform.Name, int32(scene.sceneId), int64(tax), int64(returnCoin))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if p != nil {
|
||||
pack := &hall_proto.SCDestroyPrivateRoom{
|
||||
OpRetCode: hall_proto.OpResultCode_Game_OPRC_Sucess_Game,
|
||||
RoomId: proto.Int(scene.sceneId),
|
||||
State: proto.Int(PrivateSceneState_Deleted),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(hall_proto.GameHallPacketID_PACKET_SC_DESTROYPRIVATEROOM), pack)
|
||||
}
|
||||
|
||||
//写log
|
||||
log := model.NewPrivateSceneLog()
|
||||
if log != nil {
|
||||
log.SnId = pps.snid
|
||||
log.Platform = pps.platform
|
||||
log.Channel = pps.channel
|
||||
log.Promoter = pps.promoter
|
||||
log.GameFreeId = scene.dbGameFree.GetId()
|
||||
log.SceneId = int32(scene.sceneId)
|
||||
log.CreateTime = scene.createTime
|
||||
log.DestroyTime = time.Now()
|
||||
if returnCoin > 0 {
|
||||
log.CreateFee = tax
|
||||
} else {
|
||||
log.CreateFee = scene.createFee
|
||||
}
|
||||
//PrivateSceneLogChannelSington.Write(log)
|
||||
pps.PushLog(log)
|
||||
}
|
||||
|
||||
if pps.CanDelete() && p == nil {
|
||||
delete(psm.pps, scene.creator)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -92,7 +92,6 @@ type Scene struct {
|
|||
clubRoomPos int32 //
|
||||
clubRoomTax int32 //
|
||||
createFee int32 //创建房间的费用
|
||||
manualDelete bool //是否手动解散
|
||||
GameLog []int32 //游戏服务器同步的录单
|
||||
JackPotFund int64 //游戏服务器同步的奖池
|
||||
State int32 //当前游戏状态,后期放到ScenePolicy里去处理
|
||||
|
@ -503,6 +502,7 @@ func (this *Scene) PlayerEnter(p *Player, pos int, ischangeroom bool) bool {
|
|||
enterTs: p.enterts.Unix(),
|
||||
totalConvertibleFlow: p.TotalConvertibleFlow,
|
||||
}
|
||||
this.lastTime = time.Now()
|
||||
}
|
||||
msg.TakeCoin = proto.Int64(takeCoin)
|
||||
msg.ExpectLeaveCoin = proto.Int64(leaveCoin)
|
||||
|
@ -552,7 +552,6 @@ func (this *Scene) PlayerEnter(p *Player, pos int, ischangeroom bool) bool {
|
|||
proto.SetDefaults(msg)
|
||||
this.SendToGame(int(serverproto.SSPacketID_PACKET_WG_PLAYERENTER), msg)
|
||||
logger.Logger.Tracef("SSPacketID_PACKET_WG_PLAYERENTER Scene:%v ;PlayerEnter(%v, %v)", this.sceneId, p.SnId, pos)
|
||||
this.lastTime = time.Now()
|
||||
FirePlayerEnterScene(p, this)
|
||||
return true
|
||||
} else {
|
||||
|
@ -603,8 +602,9 @@ func (this *Scene) PlayerLeave(p *Player, reason int) {
|
|||
|
||||
// 玩家最后所在游戏
|
||||
p.LastGameId = int(this.dbGameFree.GetGameId())
|
||||
|
||||
if !p.IsRob {
|
||||
this.lastTime = time.Now()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Scene) DelPlayer(p *Player) bool {
|
||||
|
@ -701,6 +701,7 @@ func (this *Scene) AudienceEnter(p *Player, ischangeroom bool) bool {
|
|||
enterTs: p.enterts.Unix(),
|
||||
totalConvertibleFlow: p.TotalConvertibleFlow,
|
||||
}
|
||||
this.lastTime = time.Now()
|
||||
}
|
||||
|
||||
takeCoin := p.Coin
|
||||
|
@ -709,7 +710,6 @@ func (this *Scene) AudienceEnter(p *Player, ischangeroom bool) bool {
|
|||
proto.SetDefaults(msg)
|
||||
this.SendToGame(int(serverproto.SSPacketID_PACKET_WG_AUDIENCEENTER), msg)
|
||||
p.enterts = time.Now()
|
||||
this.lastTime = time.Now()
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -728,7 +728,9 @@ func (this *Scene) AudienceLeave(p *Player, reason int) {
|
|||
p.SendToClient(int(hallproto.GameHallPacketID_PACKET_SC_LEAVEROOM), pack)
|
||||
//观众直接从房间退出来
|
||||
this.DelAudience(p)
|
||||
if !p.IsRob {
|
||||
this.lastTime = time.Now()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Scene) DelAudience(p *Player) bool {
|
||||
|
@ -808,12 +810,6 @@ func (this *Scene) AudienceSit(p *Player, pos int) bool {
|
|||
p.scene = this
|
||||
this.players[p.SnId] = p
|
||||
|
||||
//NpcServerAgentSington.OnPlayerEnterScene(this, p)
|
||||
if this.IsCoinScene() {
|
||||
//CoinSceneMgrSingleton.OnPlayerEnter(p, this.dbGameFree.GetId())
|
||||
} else if this.IsHallScene() {
|
||||
|
||||
}
|
||||
msg := &serverproto.WGAudienceSit{
|
||||
SnId: proto.Int32(p.SnId),
|
||||
SceneId: proto.Int(this.sceneId),
|
||||
|
@ -823,7 +819,9 @@ func (this *Scene) AudienceSit(p *Player, pos int) bool {
|
|||
msg.TakeCoin = proto.Int64(p.Coin)
|
||||
proto.SetDefaults(msg)
|
||||
this.SendToGame(int(serverproto.SSPacketID_PACKET_WG_AUDIENCESIT), msg)
|
||||
if !p.IsRob {
|
||||
this.lastTime = time.Now()
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -935,23 +933,24 @@ func (this *Scene) BilledRoomCard(snid []int32) {
|
|||
|
||||
func (this *Scene) IsLongTimeInactive() bool {
|
||||
tNow := time.Now()
|
||||
//删除超过指定不活跃时间的房间
|
||||
if len(this.players) == 0 && tNow.Sub(this.lastTime) > time.Second*time.Duration(model.GameParamData.SceneMaxIdle) {
|
||||
// 房间没有真人,没有观众,长时间没有真人进出房间
|
||||
if this.GetTruePlayerCnt() == 0 && this.GetAudienceCnt() == 0 && tNow.Sub(this.lastTime) > time.Second*time.Duration(model.GameParamData.SceneMaxIdle) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (this *Scene) ForceDelete(isManual bool) {
|
||||
this.manualDelete = isManual
|
||||
func (this *Scene) DoDelete(isGrace bool) {
|
||||
if !isGrace {
|
||||
this.deleting = true
|
||||
this.force = true
|
||||
pack := &serverproto.WGDestroyScene{
|
||||
SceneId: proto.Int(this.sceneId),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
pack := &serverproto.WGDestroyScene{
|
||||
Ids: []int64{int64(this.sceneId)},
|
||||
IsGrace: isGrace,
|
||||
}
|
||||
this.SendToGame(int(serverproto.SSPacketID_PACKET_WG_DESTROYSCENE), pack)
|
||||
logger.Logger.Warnf("(this *Scene) ForceDelete() sceneid=%v", this.sceneId)
|
||||
logger.Logger.Tracef("WG_DESTROYSCENE: %v", pack)
|
||||
}
|
||||
|
||||
func (this *Scene) Shutdown() {
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"sort"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/srvlib"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
|
@ -351,6 +352,26 @@ func (m *SceneMgr) OnPlayerLeaveScene(s *Scene, p *Player) {
|
|||
}
|
||||
}
|
||||
|
||||
func (m *SceneMgr) DoDelete(sceneId []int, isGrace bool) {
|
||||
if len(sceneId) == 0 {
|
||||
return
|
||||
}
|
||||
var ids []int64
|
||||
for _, v := range sceneId {
|
||||
ids = append(ids, int64(v))
|
||||
s, ok := m.scenes[v]
|
||||
if !isGrace && ok && s != nil {
|
||||
s.deleting = true
|
||||
s.force = true
|
||||
}
|
||||
}
|
||||
pack := &serverproto.WGDestroyScene{
|
||||
Ids: ids,
|
||||
IsGrace: isGrace,
|
||||
}
|
||||
srvlib.ServerSessionMgrSington.Broadcast(int(serverproto.SSPacketID_PACKET_WG_DESTROYSCENE), pack, common.GetSelfAreaId(), srvlib.GameServerType)
|
||||
}
|
||||
|
||||
// GetThirdScene 获取三方游戏房间
|
||||
//func (m *SceneMgr) GetThirdScene(i webapi.IThirdPlatform) *Scene {
|
||||
// if i == nil {
|
||||
|
@ -393,18 +414,18 @@ func (m *SceneMgr) OnMiniTimer() {
|
|||
case s.IsCoinScene():
|
||||
if s.IsLongTimeInactive() {
|
||||
if s.dbGameFree.GetCreateRoomNum() == 0 {
|
||||
logger.Logger.Warnf("SceneMgr.DeleteLongTimeInactive CoinScene ForceDelete scene:%v IsLongTimeInactive", s.sceneId)
|
||||
s.ForceDelete(false)
|
||||
logger.Logger.Warnf("SceneMgr.DeleteLongTimeInactive CoinScene DoDelete scene:%v IsLongTimeInactive", s.sceneId)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
if s.dbGameFree.GetCreateRoomNum() > 0 && s.csp != nil && s.csp.GetRoomNum() > int(s.dbGameFree.GetCreateRoomNum()) {
|
||||
logger.Logger.Warnf("SceneMgr.DeleteLongTimeInactive CoinScene ForceDelete scene:%v IsLongTimeInactive", s.sceneId)
|
||||
s.ForceDelete(false)
|
||||
logger.Logger.Warnf("SceneMgr.DeleteLongTimeInactive CoinScene DoDelete scene:%v IsLongTimeInactive", s.sceneId)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
case s.IsPrivateScene():
|
||||
if s.IsLongTimeInactive() {
|
||||
logger.Logger.Warnf("SceneMgr.DeleteLongTimeInactive PrivateScene ForceDelete scene:%v IsLongTimeInactive", s.sceneId)
|
||||
s.ForceDelete(false)
|
||||
logger.Logger.Warnf("SceneMgr.DeleteLongTimeInactive PrivateScene DoDelete scene:%v IsLongTimeInactive", s.sceneId)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,9 +179,7 @@ func (spd *ScenePolicyData) OnPlayerLeave(s *Scene, p *Player) {
|
|||
|
||||
// 系统维护关闭事件
|
||||
func (spd *ScenePolicyData) OnShutdown(s *Scene) {
|
||||
if s.IsPrivateScene() {
|
||||
PrivateSceneMgrSington.OnDestroyScene(s)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 获得场景的匹配因子(值越大越优先选择)
|
||||
|
|
|
@ -84,7 +84,7 @@ type PlayerRoundInfo struct {
|
|||
|
||||
type Tournament struct {
|
||||
BaseClockSinker
|
||||
TypeList map[string][]int32 // 比赛类型列表 平台id:比赛类型
|
||||
TypeList map[string]*webapiproto.GameMatchType // 比赛类型列表 平台id:比赛类型列表
|
||||
GameMatchDateList map[string]map[int32]*webapiproto.GameMatchDate // 比赛配置,platform:比赛场配置id:比赛配置
|
||||
singleSignupPlayers map[int32]*SignupInfo // 开启机器人时,报名的玩家,玩家Id:报名信息
|
||||
signupPlayers map[string]map[int32]*SignInfo // 报名的玩家 platform:比赛配置id:报名人
|
||||
|
@ -97,7 +97,7 @@ type Tournament struct {
|
|||
|
||||
func NewTournament() *Tournament {
|
||||
ret := &Tournament{
|
||||
TypeList: make(map[string][]int32),
|
||||
TypeList: make(map[string]*webapiproto.GameMatchType),
|
||||
GameMatchDateList: make(map[string]map[int32]*webapiproto.GameMatchDate),
|
||||
singleSignupPlayers: make(map[int32]*SignupInfo),
|
||||
signupPlayers: make(map[string]map[int32]*SignInfo),
|
||||
|
@ -254,26 +254,7 @@ func (this *Tournament) UpdateTypeList(init bool, data *webapiproto.GameMatchTyp
|
|||
if data.Platform == "0" {
|
||||
return
|
||||
}
|
||||
|
||||
isModify := false
|
||||
d, ok := this.TypeList[data.Platform]
|
||||
if !ok || len(d) != len(data.GetList()) {
|
||||
this.TypeList[data.Platform] = data.GetList()
|
||||
isModify = true
|
||||
} else {
|
||||
for k, v := range data.GetList() {
|
||||
if d[k] != v {
|
||||
this.TypeList[data.Platform] = data.GetList()
|
||||
isModify = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !isModify {
|
||||
return
|
||||
}
|
||||
|
||||
this.TypeList[data.Platform] = data
|
||||
if !init {
|
||||
//todo 优化
|
||||
for _, v := range PlayerMgrSington.playerOfPlatform[data.Platform] {
|
||||
|
@ -1406,6 +1387,7 @@ func (this *Tournament) GetSCTMInfosPack(platform, channelName string) *tourname
|
|||
Rule: info.Rule,
|
||||
SortId: info.SortId,
|
||||
OnChannelName: info.OnChannelName,
|
||||
ShowId: info.ShowId,
|
||||
}
|
||||
if info.MatchTimeWeek != nil && len(info.MatchTimeWeek) > 0 {
|
||||
for _, week := range info.MatchTimeWeek {
|
||||
|
@ -1454,7 +1436,16 @@ func (this *Tournament) GetSCTMInfosPack(platform, channelName string) *tourname
|
|||
pack.TMInfo = append(pack.TMInfo, tMInfo)
|
||||
}
|
||||
}
|
||||
pack.TypeList = this.TypeList[platform]
|
||||
if l := this.TypeList[platform]; l != nil {
|
||||
for _, v := range l.GetList() {
|
||||
pack.TypeList = append(pack.TypeList, &tournament.MatchTypeInfo{
|
||||
Name: v.GetName(),
|
||||
SortId: v.GetSortId(),
|
||||
On: v.GetOn(),
|
||||
Id: v.GetId(),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
return pack
|
||||
}
|
||||
|
|
|
@ -2394,7 +2394,7 @@ func init() {
|
|||
if s != nil && !s.deleting && len(s.players) == 0 {
|
||||
logger.Logger.Warnf("WebService SpecailEmptySceneId destroyroom scene:%v", s.sceneId)
|
||||
s.TryForceDelectMatchInfo()
|
||||
s.ForceDelete(false)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
case 2: //删除所有未开始的房间
|
||||
|
@ -2405,7 +2405,7 @@ func init() {
|
|||
if s != nil && !s.deleting && !s.starting && !s.IsHundredScene() {
|
||||
logger.Logger.Warnf("WebService SpecailUnstartSceneId destroyroom scene:%v", s.sceneId)
|
||||
s.TryForceDelectMatchInfo()
|
||||
s.ForceDelete(false)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
default: //删除指定房间
|
||||
|
@ -2428,7 +2428,7 @@ func init() {
|
|||
}
|
||||
logger.Logger.Warnf("WebService destroyroom scene:%v", s.sceneId)
|
||||
s.TryForceDelectMatchInfo()
|
||||
s.ForceDelete(false)
|
||||
s.DoDelete(false)
|
||||
}
|
||||
}
|
||||
return common.ResponseTag_Ok, pack
|
||||
|
|
Loading…
Reference in New Issue