秘境随机事件修复

This commit is contained in:
meixiongfeng 2023-08-23 17:45:15 +08:00
parent 322d0130c7
commit 5d95f02dbe
2 changed files with 10 additions and 10 deletions

View File

@ -28,7 +28,7 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt
portal int32 // 生成传送门 构造房间数据 portal int32 // 生成传送门 构造房间数据
confStage *cfg.GameStoneStageData confStage *cfg.GameStoneStageData
curRoomConf *cfg.GameStoneRoomData // 当前房间 curRoomConf *cfg.GameStoneRoomData // 当前房间
szBuff []int32 //szBuff []int32
err error err error
szEvent []int32 szEvent []int32
roles []*pb.BattleRole roles []*pb.BattleRole
@ -135,11 +135,11 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt
} }
if len(szEvent) > 0 { if len(szEvent) > 0 {
szBuff = this.module.configure.GetEventGroupDataByLottery(szEvent...) event := this.module.configure.GetEventGroupDataByLottery(szEvent...)
for _, v := range szBuff { for _, v := range event {
stone.Rooms.Eventid[v] = false stone.Rooms.Eventid[v] = false
} }
this.module.modelStonehenge.AddNewEvent(szEvent, stone) this.module.modelStonehenge.AddNewEvent(event, stone)
} }
// 特权校验 // 特权校验
for _, v := range stone.Privilege { for _, v := range stone.Privilege {

View File

@ -115,11 +115,11 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
stone.Rooms.Eventid[curRoomConf.BossEvent] = false stone.Rooms.Eventid[curRoomConf.BossEvent] = false
} }
if len(szEvent) > 0 { if len(szEvent) > 0 {
szEvent = this.module.configure.GetEventGroupDataByLottery(szEvent...) event := this.module.configure.GetEventGroupDataByLottery(szEvent...)
for _, v := range szEvent { for _, v := range event {
stone.Rooms.Eventid[v] = false stone.Rooms.Eventid[v] = false
} }
this.module.modelStonehenge.AddNewEvent(szEvent, stone) this.module.modelStonehenge.AddNewEvent(event, stone)
} }
//stone.Rooms.Portal = this.module.configure.GetRoomGroupDataByLottery(req.Portal) //stone.Rooms.Portal = this.module.configure.GetRoomGroupDataByLottery(req.Portal)