diff --git a/data/DB_PropExchange.dat b/data/DB_PropExchange.dat index 8a38f20..bff28e2 100644 Binary files a/data/DB_PropExchange.dat and b/data/DB_PropExchange.dat differ diff --git a/data/DB_Skin.dat b/data/DB_Skin.dat index 37d6255..51b9247 100644 Binary files a/data/DB_Skin.dat and b/data/DB_Skin.dat differ diff --git a/data/DB_Skin.json b/data/DB_Skin.json index 2eeb09b..3a89a71 100644 --- a/data/DB_Skin.json +++ b/data/DB_Skin.json @@ -103,7 +103,7 @@ }, { "Id": 300006, - "SkinClass": 3, + "SkinClass": 4, "Model": "juese", "SkinPic": "icon_300006", "SkinName": "潜水员", @@ -124,7 +124,7 @@ }, { "Id": 300007, - "SkinClass": 4, + "SkinClass": 3, "Model": "juese", "SkinPic": "icon_300007", "SkinName": "冲浪健将", diff --git a/data/DB_Task.dat b/data/DB_Task.dat index 811c269..9da82a3 100644 Binary files a/data/DB_Task.dat and b/data/DB_Task.dat differ diff --git a/worldsrv/gameallconfig.go b/worldsrv/gameallconfig.go deleted file mode 100644 index 581b32a..0000000 --- a/worldsrv/gameallconfig.go +++ /dev/null @@ -1,88 +0,0 @@ -package main - -//import ( -// "mongo.games.com/game/model" -// "mongo.games.com/game/srvdata" -// "mongo.games.com/goserver/core/logger" -// "github.com/globalsign/mgo/bson" -//) -// -//func InitGameAllConfigData() error { -// c := model.GameConfigCollection() -// if c != nil { -// var datas []model.GameGlobalState -// err := c.Find(nil).All(&datas) -// if err != nil { -// logger.Logger.Trace("InitGameAllConfigData err:", err) -// return err -// } -// for i := 0; i < len(datas); i++ { -// model.GameAllConfig[datas[i].LogicId] = &datas[i] -// } -// logger.Logger.Trace("InitGameAllConfigData:", model.GameAllConfig) -// -// //把dbFree中的数据写入数据库 -// arr := srvdata.PBDB_GameFreeMgr.Datas.GetArr() -// for _, dbGame := range arr { -// if dbGame.GetGameId() > 0 { -// name := dbGame.GetName() -// if name != dbGame.GetTitle() { -// name = dbGame.GetName() + dbGame.GetTitle() -// } -// if data, exist := model.GameAllConfig[dbGame.GetId()]; exist { -// data.Name = name -// data.GameId = dbGame.GetGameId() -// data.GameMode = dbGame.GetGameMode() -// cu := model.GameConfigCollection() -// if cu != nil { -// info, err := cu.Upsert(bson.M{"logicid": dbGame.GetId()}, data) -// if err != nil { -// logger.Logger.Trace("InitGameAllConfigData :", info, err) -// return err -// } -// } -// } else { -// name := dbGame.GetName() -// if name != dbGame.GetTitle() { -// name = dbGame.GetName() + dbGame.GetTitle() -// } -// data := &model.GameGlobalState{ -// Id: bson.NewObjectId(), -// LogicId: dbGame.GetId(), -// Name: name, -// GameId: dbGame.GetGameId(), -// GameMode: dbGame.GetGameMode(), -// State: 0, -// } -// model.GameAllConfig[dbGame.GetId()] = data -// ci := model.GameConfigCollection() -// if ci != nil { -// info, err := ci.Upsert(bson.M{"logicid": dbGame.GetId()}, data) -// if err != nil { -// logger.Logger.Trace("InitGameAllConfigData :", info, err) -// return err -// } -// } -// } -// } -// } -// -// //dbfree表中删除后操作 -// for k, _ := range model.GameAllConfig { -// gc := srvdata.PBDB_GameFreeMgr.GetData(k) -// if gc == nil { -// cgc := model.GameConfigCollection() -// if cgc != nil { -// err := cgc.Remove(bson.M{"logicid": k}) -// if err != nil { -// logger.Logger.Warn("RemoveGameConfig error:", err) -// return err -// } else { -// delete(model.GameAllConfig, k) -// } -// } -// } -// } -// } -// return nil -//} diff --git a/worldsrv/gamedata.go b/worldsrv/gamedata.go deleted file mode 100644 index d90df8a..0000000 --- a/worldsrv/gamedata.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "mongo.games.com/goserver/core/logger" -) - -type GameDataMgr struct { -} - -func (this *GameDataMgr) ModuleName() string { - return "GameDataMgr" -} - -func (this *GameDataMgr) Init() { - //model.InitGameData() -} - -func (this *GameDataMgr) Update() { - logger.Logger.Trace("(this *GameDataMgr) Update()") - //model.SaveGameData() -} - -func (this *GameDataMgr) Shutdown() { - //model.SaveGameData() - //module.UnregisteModule(this) -} - -func init() { - //module.RegisteModule(&GameDataMgr{}, time.Minute, 0) -} diff --git a/worldsrv/jackpotlist.go b/worldsrv/jackpotlist.go deleted file mode 100644 index 5ad2b3b..0000000 --- a/worldsrv/jackpotlist.go +++ /dev/null @@ -1,211 +0,0 @@ -package main - -// -//import ( -// "mongo.games.com/game/common" -// "mongo.games.com/game/proto" -// "mongo.games.com/game/protocol/gamehall" -// "mongo.games.com/goserver/core/logger" -// "mongo.games.com/goserver/core/timer" -// "math/rand" -// "strconv" -// "time" -//) -// -//var jackpotInterval = time.Hour * common.SCENE_BIGWINHISTORY_TIMEINTERVAL -// -//var JackpotListMgrSington = &JackpotListMgr{ -// BigWinHistoryByGameID: make(map[int][]*gamehall.BigWinHistoryInfo), -// jackpotListHandle: make(map[int]timer.TimerHandle), // 新的爆奖记录生成 -//} -// -//type JackpotListMgr struct { -// BigWinHistoryByGameID map[int][]*gamehall.BigWinHistoryInfo -// jackpotListHandle map[int]timer.TimerHandle // 新的爆奖记录生成 -//} -// -//func (this *JackpotListMgr) AddJackpotList(gameid int, data *gamehall.BigWinHistoryInfo) { -// this.BigWinHistoryByGameID[gameid] = append(this.BigWinHistoryByGameID[gameid], data) -// if len(this.BigWinHistoryByGameID[gameid]) > common.SCENE_BIGWINHISTORY_MAXNUMBER { -// this.BigWinHistoryByGameID[gameid] = this.BigWinHistoryByGameID[gameid][1:] -// } -//} -// -//func (this *JackpotListMgr) GetJackpotList(gameid int) []*gamehall.BigWinHistoryInfo { -// if this.BigWinHistoryByGameID[gameid] == nil { -// this.BigWinHistoryByGameID[gameid] = make([]*gamehall.BigWinHistoryInfo, 0) -// } -// return this.BigWinHistoryByGameID[gameid] -//} -// -//func genRandTime(sec int, circleTime time.Time) time.Time { -// //随机时间间隔 -// rand.Seed(time.Now().UnixNano() + int64(sec)) -// interval := rand.Intn(60) + 60*sec // 分钟 -// circleTime = circleTime.Add(time.Duration(-interval) * time.Minute) -// s := rand.Intn(60) //随机一个秒数 -// circleTime = circleTime.Add(time.Duration(-s) * time.Second) -// return circleTime -//} -// -//func genRoomIDAndScore(gameid int) (roomID int64, score int64) { -// // 随机从房间内读取一个场数据 -// var scenes = make([]*Scene, 0) -// for _, s := range SceneMgrSington.scenes { -// if s != nil && s.dbGameFree.GetGameId() == int32(gameid) { -// scenes = append(scenes, s) -// } -// } -// if len(scenes) < 1 { -// return -// } -// s := scenes[rand.Intn(len(scenes))] -// jackpot := s.dbGameFree.GetJackpot() -// roomID = int64(s.dbGameFree.GetBaseScore()) -// baseScore := int64(jackpot[0]) * roomID -// score = int64(baseScore) + int64(rand.Int31n(int32(baseScore/2))) -// logger.Logger.Infof("genjackpot %v score %v roomID%v baseScore%v", jackpot[0], score, s.dbGameFree.GetBaseScore(), baseScore) -// return -//} -// -//// 生成爆奖记录 -//func (this *JackpotListMgr) GenJackpot(gameid int) { -// // 首次生成初始化爆奖信息 -// if len(this.BigWinHistoryByGameID[gameid]) == 0 { -// // 直接从大厅取机器人 -// circleTime := time.Now() -// sec := common.SCENE_BIGWINHISTORY_LIMITNUMBER -// for _, p := range PlayerMgrSington.sidMap { -// if len(this.BigWinHistoryByGameID[gameid]) >= common.SCENE_BIGWINHISTORY_LIMITNUMBER { -// break -// } -// if p.IsRob { -// p.RobotRandName() -// genedTime := genRandTime(sec, circleTime).Unix() -// spinid := strconv.FormatInt(int64(p.SnId), 10) // 用户id转换成字符串 -// baseBet, priceValue := genRoomIDAndScore(gameid) -// if baseBet == 0 || priceValue == 0 { -// return -// } -// newJackpot := &gamehall.BigWinHistoryInfo{ -// SpinID: spinid, -// CreatedTime: genedTime, -// BaseBet: baseBet, -// TotalBet: baseBet, -// PriceValue: priceValue, -// UserName: p.Name, -// } -// this.AddJackpotList(gameid, newJackpot) -// sec-- -// } -// } -// } else { -// lastRecord := this.BigWinHistoryByGameID[gameid][len(this.BigWinHistoryByGameID[gameid])-1] // 当中奖纪录>10条时,随机时间差, 满足当前时间-最后一次爆奖记录时间 > 随机时间差 时重新生成一条记录 -// lastTime := time.Unix(lastRecord.GetCreatedTime(), 0) -// genNewJackpotFlag := lastTime.Add(jackpotInterval).Before(time.Now()) -// if genNewJackpotFlag { -// for _, p := range PlayerMgrSington.sidMap { -// if p.IsRob { -// p.RobotRandName() -// genedTime := time.Now().Unix() -// spinid := strconv.FormatInt(int64(p.SnId), 10) // 用户id转换成字符串 -// baseBet, priceValue := genRoomIDAndScore(gameid) -// if baseBet == 0 || priceValue == 0 { -// return -// } -// newJackpot := &gamehall.BigWinHistoryInfo{ -// SpinID: spinid, -// CreatedTime: genedTime, -// BaseBet: baseBet, -// TotalBet: baseBet, -// PriceValue: priceValue, -// UserName: p.Name, -// } -// this.AddJackpotList(gameid, newJackpot) -// break -// } -// } -// this.after(gameid) -// } -// } -//} -// -//// AddVirtualJackpot 添加虚拟爆奖记录(名字+用户id, 使用大厅机器人信息) -//func (this *JackpotListMgr) AddVirtualJackpot(gameid int, data *gamehall.BigWinHistoryInfo) { -// if len(PlayerMgrSington.sidMap) < 1 { -// logger.Logger.Error("AddVirtualJackpot not found robot") -// return -// } -// -// for _, p := range PlayerMgrSington.sidMap { -// if p.IsRob { -// p.RobotRandName() -// spinid := strconv.FormatInt(int64(p.SnId), 10) // 用户id转换成字符串 -// data.SpinID = spinid -// data.UserName = p.Name -// this.AddJackpotList(gameid, data) -// break -// } -// } -//} -// -//func (this *JackpotListMgr) start(gameid int) { -// this.jackpotListHandle[gameid], _ = timer.StartTimer(timer.TimerActionWrapper(func(h timer.TimerHandle, ud interface{}) bool { -// this.GenJackpot(gameid) -// return true -// }), nil, jackpotInterval, 1) -//} -// -//func (this *JackpotListMgr) after(gameid int) { -// interval := jackpotInterval + time.Duration(rand.Intn(2))*time.Hour + time.Duration(rand.Intn(60))*time.Minute + time.Duration(rand.Intn(60)) -// this.jackpotListHandle[gameid], _ = timer.AfterTimer(func(h timer.TimerHandle, ud interface{}) bool { -// this.GenJackpot(gameid) -// -// jackpotList := JackpotListMgrSington.GetJackpotList(gameid) -// msg := this.GetStoCMsg(jackpotList) -// logger.Logger.Infof("jackpotlist timer after gameid(%v) %v", gameid, msg) -// return true -// }, nil, interval) -//} -// -//func (this *JackpotListMgr) StopTimer(gameid int) bool { -// return timer.StopTimer(this.jackpotListHandle[gameid]) -//} -// -//func (this *JackpotListMgr) ResetAfterTimer(gameid int) { -// if this.StopTimer(gameid) { -// this.after(gameid) -// } -//} -// -//func (this *JackpotListMgr) GetStoCMsg(jackpotList []*gamehall.BigWinHistoryInfo) *gamehall.SCBigWinHistory { -// pack := &gamehall.SCBigWinHistory{} -// for i := len(jackpotList) - 1; i >= 0; i-- { -// v := jackpotList[i] -// player := &gamehall.BigWinHistoryInfo{ -// SpinID: proto.String(v.GetSpinID()), -// CreatedTime: proto.Int64(v.GetCreatedTime()), -// BaseBet: proto.Int64(v.GetBaseBet()), -// TotalBet: proto.Int64(v.GetTotalBet()), -// PriceValue: proto.Int64(int64(v.GetPriceValue())), -// UserName: proto.String(v.GetUserName()), -// Cards: v.GetCards(), -// } -// pack.BigWinHistory = append(pack.BigWinHistory, player) -// } -// -// //pack := &avengers.SCAvengersBigWinHistory{} -// //for i := len(jackpotList) - 1; i >= 0; i-- { -// // v := jackpotList[i] -// // player := &avengers.AvengersBigWinHistoryInfo{ -// // SpinID: proto.String(v.GetSpinID()), -// // CreatedTime: proto.Int64(v.GetCreatedTime()), -// // RoomID: proto.Int64(v.GetRoomID()), -// // PriceValue: proto.Int64(int64(v.GetPriceValue())), -// // UserName: proto.String(v.GetUserName()), -// // } -// // pack.BigWinHistory = append(pack.BigWinHistory, player) -// //} -// proto.SetDefaults(pack) -// return pack -//} diff --git a/worldsrv/logiclevelmgr.go b/worldsrv/logiclevelmgr.go deleted file mode 100644 index a445c99..0000000 --- a/worldsrv/logiclevelmgr.go +++ /dev/null @@ -1,121 +0,0 @@ -package main - -// -//import ( -// "encoding/json" -// "mongo.games.com/game/common" -// "mongo.games.com/game/model" -// "mongo.games.com/game/webapi" -// "mongo.games.com/goserver/core/logger" -// "io/ioutil" -// "net/http" -// "net/url" -// "strconv" -// "time" -//) -// -//var LogicLevelMgrSington = &LogicLevelMgr{ -// config: make(map[string]*LogicLevelConfig), -// client: &http.Client{Timeout: 30 * time.Second}, -//} -// -//type LogicLevelMgr struct { -// config map[string]*LogicLevelConfig -// client *http.Client -//} -//type LogicLevelConfig struct { -// Platform string -// LogicLevelInfo map[int32]*LogicLevelInfo -//} -//type LogicLevelInfo struct { -// Id int32 //分层id -// ClusterName string //分层名称 -// StartAct int32 //分层开关 1开启 0关闭 -// CheckActIds []int32 //分层包含的活动id -// CheckPay []string //分层包含的充值类型 -//} -// -//func (this *LogicLevelMgr) GetConfig(platform string) *LogicLevelConfig { -// return this.config[platform] -//} -// -//func (this *LogicLevelMgr) UpdateConfig(cfg *LogicLevelConfig) { -// logger.Logger.Trace("++++++++++++++UpdateConfig++++++++++++++") -// this.config[cfg.Platform] = cfg -// -// if playersOL, ok := PlayerMgrSington.playerOfPlatform[cfg.Platform]; ok { -// for _, player := range playersOL { -// if player != nil && !player.IsRob { -// player.layered = make(map[int]bool) -// for _, v := range player.layerlevels { -// if td, ok := cfg.LogicLevelInfo[int32(v)]; ok { -// if td.StartAct == 1 { -// for _, id := range td.CheckActIds { -// player.layered[int(id)] = true -// } -// } -// } -// } -// //player.ActStateSend2Client() -// } -// } -// } -//} -// -//type NewMsg struct { -// Platform string -// SnId int -// Levels []int -//} -// -//func (this *LogicLevelMgr) SendPostBySnIds(platform string, snids []int32) []NewMsg { -// client := this.client -// form := make(url.Values) -// form.Set("Platform", platform) -// str := "" -// for k, snid := range snids { -// str += strconv.Itoa(int(snid)) -// if k+1 < len(snids) { -// str += "," -// } -// } -// form.Set("SnIds", str) -// form.Set("PltName", common.CustomConfig.GetString("PltName")) -// logicLevelUrl := common.CustomConfig.GetString("LogicLevelUrl") -// resp, err := client.PostForm(logicLevelUrl+"/QueryDataBySnIds", form) -// if resp != nil && resp.Status == "200 OK" && err == nil { -// defer resp.Body.Close() -// body, _ := io.ReadAll(resp.Body) -// logger.Logger.Trace(string(body)) -// var data []NewMsg -// json.Unmarshal(body, &data) -// return data -// } -// return nil -//} -//func (this *LogicLevelMgr) LoadConfig() { -// logger.Logger.Trace("++++++++++++++LoadConfig++++++++++++++") -// type LogicLevelConfigData struct { -// Tag int -// Msg []*LogicLevelConfig -// } -// if !model.GameParamData.UseEtcd { -// logger.Logger.Trace("API_GetGradeShopConfigData") -// buff, err := webapi.API_GetLogicLevelConfigData(common.GetAppId()) -// if err == nil { -// var data LogicLevelConfigData -// err = json.Unmarshal(buff, &data) -// if err == nil && data.Tag == 0 { -// for _, cfg := range data.Msg { -// this.UpdateConfig(cfg) -// } -// } else { -// logger.Logger.Error("Unmarshal LogicLevelConfigData config data error:", err, string(buff)) -// } -// } else { -// logger.Logger.Error("Get LogicLevelConfigData config data error:", err) -// } -// } else { -// EtcdMgrSington.InitLogicLevelConfig() -// } -//} diff --git a/xlsx/DB_Skin.xlsx b/xlsx/DB_Skin.xlsx index c778487..94e7628 100644 Binary files a/xlsx/DB_Skin.xlsx and b/xlsx/DB_Skin.xlsx differ