Compare commits
No commits in common. "d16e49448f989dd4f326d8e4347020c3376480c1" and "4880d41aa3947202bf0456d892320148254e8ad8" have entirely different histories.
d16e49448f
...
4880d41aa3
Binary file not shown.
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
BIN
data/DB_VIP.dat
BIN
data/DB_VIP.dat
Binary file not shown.
|
@ -674,6 +674,11 @@
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"PrivilegeShow": 17000
|
"PrivilegeShow": 17000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ParamName": [
|
||||||
|
""
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
2
public
2
public
|
@ -1 +1 @@
|
||||||
Subproject commit ad1f72f58fe9edb6d812dd58066366cf586332eb
|
Subproject commit d789cca81a36ddbaf30e5414b6c4fe530e0631f6
|
|
@ -8,7 +8,6 @@ import (
|
||||||
"mongo.games.com/game/srvdata"
|
"mongo.games.com/game/srvdata"
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
"mongo.games.com/goserver/core/netlib"
|
"mongo.games.com/goserver/core/netlib"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type CSHundredSceneGetPlayerNumPacketFactory struct {
|
type CSHundredSceneGetPlayerNumPacketFactory struct {
|
||||||
|
@ -211,38 +210,38 @@ func (this *CSGameObservePacketFactory) CreatePacket() interface{} {
|
||||||
|
|
||||||
func (this *CSGameObserveHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
func (this *CSGameObserveHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||||
logger.Logger.Trace("CSGameObserveHandler Process recv ", data)
|
logger.Logger.Trace("CSGameObserveHandler Process recv ", data)
|
||||||
if msg, ok := data.(*gamehall.CSGameObserve); ok {
|
if _, ok := data.(*gamehall.CSGameObserve); ok {
|
||||||
p := PlayerMgrSington.GetPlayer(sid)
|
p := PlayerMgrSington.GetPlayer(sid)
|
||||||
if p != nil {
|
if p != nil {
|
||||||
if msg.GetStartOrEnd() {
|
//if msg.GetStartOrEnd() {
|
||||||
gameStateMgr.PlayerRegiste(p, msg.GetGameId(), msg.GetStartOrEnd())
|
// gameStateMgr.PlayerRegiste(p, msg.GetGameId(), msg.GetStartOrEnd())
|
||||||
pack := &gamehall.SCGameSubList{}
|
// pack := &gamehall.SCGameSubList{}
|
||||||
statePack := &gamehall.SCGameState{}
|
// statePack := &gamehall.SCGameState{}
|
||||||
scenes := HundredSceneMgrSington.GetPlatformScene(p.Platform, msg.GetGameId())
|
// scenes := HundredSceneMgrSington.GetPlatformScene(p.Platform, msg.GetGameId())
|
||||||
for _, value := range scenes {
|
// for _, value := range scenes {
|
||||||
pack.List = append(pack.List, &gamehall.GameSubRecord{
|
// pack.List = append(pack.List, &gamehall.GameSubRecord{
|
||||||
GameFreeId: proto.Int32(value.dbGameFree.GetId()),
|
// GameFreeId: proto.Int32(value.dbGameFree.GetId()),
|
||||||
NewLog: proto.Int32(-1),
|
// NewLog: proto.Int32(-1),
|
||||||
LogCnt: proto.Int(len(value.GameLog)),
|
// LogCnt: proto.Int(len(value.GameLog)),
|
||||||
TotleLog: value.GameLog,
|
// TotleLog: value.GameLog,
|
||||||
})
|
// })
|
||||||
leftTime := int64(value.StateSec) - (time.Now().Unix() - value.StateTs)
|
// leftTime := int64(value.StateSec) - (time.Now().Unix() - value.StateTs)
|
||||||
if leftTime < 0 {
|
// if leftTime < 0 {
|
||||||
leftTime = 0
|
// leftTime = 0
|
||||||
}
|
// }
|
||||||
statePack.List = append(statePack.List, &gamehall.GameState{
|
// statePack.List = append(statePack.List, &gamehall.GameState{
|
||||||
GameFreeId: proto.Int32(value.dbGameFree.GetId()),
|
// GameFreeId: proto.Int32(value.dbGameFree.GetId()),
|
||||||
Ts: proto.Int64(leftTime),
|
// Ts: proto.Int64(leftTime),
|
||||||
Sec: proto.Int32(value.StateSec),
|
// Sec: proto.Int32(value.StateSec),
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GAMESUBLIST), pack)
|
// p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GAMESUBLIST), pack)
|
||||||
logger.Logger.Trace("SCGameSubList:", pack)
|
// logger.Logger.Trace("SCGameSubList:", pack)
|
||||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GAMESTATE), statePack)
|
// p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GAMESTATE), statePack)
|
||||||
logger.Logger.Trace("SCGameState:", statePack)
|
// logger.Logger.Trace("SCGameState:", statePack)
|
||||||
} else {
|
//} else {
|
||||||
gameStateMgr.PlayerClear(p)
|
// gameStateMgr.PlayerClear(p)
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -177,16 +177,7 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sort.Slice(tm.robotGrades[round-1], func(i, j int) bool {
|
sort.Slice(tm.robotGrades[round-1], func(i, j int) bool {
|
||||||
if tm.robotGrades[round-1][i].copySnid > 0 && tm.robotGrades[round-1][j].copySnid == 0 {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if tm.robotGrades[round-1][i].copySnid > 0 && tm.robotGrades[round-1][j].copySnid > 0 {
|
|
||||||
return tm.robotGrades[round-1][i].grade > tm.robotGrades[round-1][j].grade
|
return tm.robotGrades[round-1][i].grade > tm.robotGrades[round-1][j].grade
|
||||||
}
|
|
||||||
if tm.robotGrades[round-1][i].copySnid == 0 && tm.robotGrades[round-1][j].copySnid > 0 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 当前轮数据
|
// 当前轮数据
|
||||||
|
@ -300,11 +291,11 @@ func (tm *TmMatch) RobotGradesDecline(round int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//logger.Logger.Tracef("======积分衰减======当前第 %v 轮============", round)
|
logger.Logger.Tracef("======积分衰减======当前第 %v 轮============", round)
|
||||||
//for i, infos := range tm.robotGrades {
|
for i, infos := range tm.robotGrades {
|
||||||
// logger.Logger.Tracef(">>>积分历史>>> 第 %v 轮", i)
|
logger.Logger.Tracef(">>>积分历史>>> 第 %v 轮", i)
|
||||||
// for _, info := range infos {
|
for _, info := range infos {
|
||||||
// logger.Logger.Trace("Snid: ", info.copySnid, " grade: ", info.grade, " copyLv: ", info.copyLv, " copyRoleId: ", info.copyRoleId)
|
logger.Logger.Trace("Snid: ", info.copySnid, " grade: ", info.grade, " copyLv: ", info.copyLv, " copyRoleId: ", info.copyRoleId)
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,9 +137,9 @@ func (this *Tournament) checkData(cfg *webapiproto.GameMatchDate) bool {
|
||||||
if num%4 != 0 { //必须是4的整倍数
|
if num%4 != 0 { //必须是4的整倍数
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
//if num <= cfg.MatchPromotion[i+1] { //必须递减
|
if num <= cfg.MatchPromotion[i+1] { //必须递减
|
||||||
// return false
|
return false
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -959,9 +959,7 @@ func (this *Tournament) NextRoundStartSingle(sortId int64, playerCtx *PlayerMatc
|
||||||
}
|
}
|
||||||
|
|
||||||
if promotionNum != 1 {
|
if promotionNum != 1 {
|
||||||
if int(promotionNum) < len(arr) {
|
|
||||||
arr = arr[:promotionNum]
|
arr = arr[:promotionNum]
|
||||||
}
|
|
||||||
playerCtx.tm.robotGrades[int(round)] = arr
|
playerCtx.tm.robotGrades[int(round)] = arr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
xlsx/DB_VIP.xlsx
BIN
xlsx/DB_VIP.xlsx
Binary file not shown.
Loading…
Reference in New Issue