boss 事件处理

This commit is contained in:
meixiongfeng 2023-07-27 21:05:12 +08:00
parent 6854378d3b
commit 91f8df9c0c
3 changed files with 11 additions and 4 deletions

View File

@ -100,7 +100,11 @@ func (this *apiComp) BattleOver(session comm.IUserSession, req *pb.StonehengeBat
}
}
}
// 战斗结束更新英雄信息
for _, v := range req.Report.Alive {
stone.Hero[v.HeroID] = v
}
update["hero"] = stone.Hero
update["rooms"] = stone.Rooms
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "battleover", &pb.StonehengeBattleOverResp{

View File

@ -87,11 +87,12 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1
update["userbuff"] = stone.Userbuff
}
stone.Rooms.Eventid[req.Eventid] = true //
// 校验事件有后续事件
if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中
newEvent = eventConf.PostEvent
stone.Rooms.Eventid[newEvent] = false //
stone.Rooms.Eventid[req.Eventid] = true //
// 如果新的事件是3选1
if newEventConf.EventType == EventType25 {
for _, v := range stone.Addweight {

View File

@ -102,7 +102,9 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
if curRoomConf.EventStoreGroup != 0 { // 商店事件组
szEvent = append(szEvent, curRoomConf.EventStoreGroup)
}
if curRoomConf.BossEvent != 0 { //boss事件组
stone.Rooms.Eventid[curRoomConf.BossEvent] = false
}
if len(szEvent) > 0 {
szBuff = this.module.configure.GetEventGroupDataByLottery(szEvent...)
for _, v := range szBuff {