boss 事件处理
This commit is contained in:
parent
6854378d3b
commit
91f8df9c0c
@ -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
|
update["rooms"] = stone.Rooms
|
||||||
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
||||||
session.SendMsg(string(this.module.GetType()), "battleover", &pb.StonehengeBattleOverResp{
|
session.SendMsg(string(this.module.GetType()), "battleover", &pb.StonehengeBattleOverResp{
|
||||||
|
@ -87,11 +87,12 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1
|
stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1
|
||||||
update["userbuff"] = stone.Userbuff
|
update["userbuff"] = stone.Userbuff
|
||||||
}
|
}
|
||||||
|
stone.Rooms.Eventid[req.Eventid] = true //
|
||||||
// 校验事件有后续事件
|
// 校验事件有后续事件
|
||||||
if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中
|
if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中
|
||||||
newEvent = eventConf.PostEvent
|
newEvent = eventConf.PostEvent
|
||||||
stone.Rooms.Eventid[newEvent] = false //
|
stone.Rooms.Eventid[newEvent] = false //
|
||||||
stone.Rooms.Eventid[req.Eventid] = true //
|
|
||||||
// 如果新的事件是3选1
|
// 如果新的事件是3选1
|
||||||
if newEventConf.EventType == EventType25 {
|
if newEventConf.EventType == EventType25 {
|
||||||
for _, v := range stone.Addweight {
|
for _, v := range stone.Addweight {
|
||||||
|
@ -102,7 +102,9 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
|
|||||||
if curRoomConf.EventStoreGroup != 0 { // 商店事件组
|
if curRoomConf.EventStoreGroup != 0 { // 商店事件组
|
||||||
szEvent = append(szEvent, curRoomConf.EventStoreGroup)
|
szEvent = append(szEvent, curRoomConf.EventStoreGroup)
|
||||||
}
|
}
|
||||||
|
if curRoomConf.BossEvent != 0 { //boss事件组
|
||||||
|
stone.Rooms.Eventid[curRoomConf.BossEvent] = false
|
||||||
|
}
|
||||||
if len(szEvent) > 0 {
|
if len(szEvent) > 0 {
|
||||||
szBuff = this.module.configure.GetEventGroupDataByLottery(szEvent...)
|
szBuff = this.module.configure.GetEventGroupDataByLottery(szEvent...)
|
||||||
for _, v := range szBuff {
|
for _, v := range szBuff {
|
||||||
|
Loading…
Reference in New Issue
Block a user