秘境优化
This commit is contained in:
parent
113450be20
commit
cd3b25cbbd
@ -91,7 +91,7 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
|
||||
Index: stone.CurRoomIndes,
|
||||
Roomid: curRoomConf.RoomId, // 第一个房间的房间id读配置
|
||||
Box: map[int32]int32{}, // 重置宝箱事件
|
||||
// Shop: map[int32]int32{}, // 商店事件
|
||||
Shop: map[int32]int32{}, // 商店事件
|
||||
}
|
||||
|
||||
if curRoomConf.EventrewardGroup != 0 { // 垃圾事件组
|
||||
|
@ -45,8 +45,11 @@ func (this *apiComp) Store(session comm.IUserSession, req *pb.StonehengeStoreReq
|
||||
}
|
||||
return
|
||||
}
|
||||
if stone.Rooms.Shop == nil {
|
||||
stone.Rooms.Shop = make(map[int32]int32)
|
||||
}
|
||||
// 校验次数限制
|
||||
if stone.Rooms.Shop[req.StoreId] >= storeConf.LimitTime { // 超过购买上限
|
||||
if stone.Rooms.Shop[storeConf.EventId] >= storeConf.LimitTime { // 超过购买上限
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_StonehengeStoreMax,
|
||||
Title: pb.ErrorCode_StonehengeStoreMax.String(),
|
||||
@ -62,6 +65,7 @@ func (this *apiComp) Store(session comm.IUserSession, req *pb.StonehengeStoreReq
|
||||
return
|
||||
}
|
||||
stone.Rooms.Shop[storeConf.EventId] += 1
|
||||
|
||||
stone.Rooms.Eventid[storeConf.EventId] = false
|
||||
update["rooms"] = stone.Rooms
|
||||
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
||||
|
@ -88,6 +88,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
err = this.LoadConfigure(game_bossconf, cfg.NewGameStoneBoss)
|
||||
err = this.LoadConfigure(game_battleconf, cfg.NewGameStoneBattle)
|
||||
err = this.LoadConfigure(game_stonetalent, cfg.NewGameStoneTalent)
|
||||
err = this.LoadConfigure(game_storeconf, cfg.NewGameStoneStore)
|
||||
configure.RegisterConfigure(game_stageconf, cfg.NewGameStoneStage, this.LoadGameStoneStage)
|
||||
configure.RegisterConfigure(game_buffconf, cfg.NewGameStoneBuff, this.LoadGameStoneBuff)
|
||||
|
||||
@ -687,7 +688,7 @@ func (this *configureComp) GetStoneStoreConf(id int32) (data *cfg.GameStoneStore
|
||||
}
|
||||
}
|
||||
}
|
||||
err = comm.NewNotFoundConfErr(moduleName, game_battleconf, id)
|
||||
err = comm.NewNotFoundConfErr(moduleName, game_storeconf, id)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ func (this *apiComp) MinerFinish(session comm.IUserSession, req *pb.UiGameMinerF
|
||||
update["bReward"] = list.BReward
|
||||
this.module.modelMiner.modifyMinerListByObjId(session.GetUserId(), update) // 修改进度
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "minerFinish", &pb.UiGameMinerFinishResp{
|
||||
session.SendMsg(string(this.module.GetType()), "minerfinish", &pb.UiGameMinerFinishResp{
|
||||
Data: list,
|
||||
Atno: atno,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user