fruit服务

This commit is contained in:
fatiao 2025-06-12 22:04:02 +08:00
parent a4f5291600
commit f6f3a041b9
16 changed files with 1975 additions and 1921 deletions

View File

@ -6,27 +6,23 @@
<component name="ChangeListManager">
<list default="true" id="d78b3961-331c-4a35-ae41-f23409fbe1fd" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/../doc/etcd-v3.5.17-windows-amd64/default.etcd/member/snap/db" beforeDir="false" afterPath="$PROJECT_DIR$/../doc/etcd-v3.5.17-windows-amd64/default.etcd/member/snap/db" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../doc/etcd-v3.5.17-windows-amd64/default.etcd/member/wal/0.tmp" beforeDir="false" afterPath="$PROJECT_DIR$/../doc/etcd-v3.5.17-windows-amd64/default.etcd/member/wal/0.tmp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../doc/etcd-v3.5.17-windows-amd64/default.etcd/member/wal/0000000000000000-0000000000000000.wal" beforeDir="false" afterPath="$PROJECT_DIR$/../doc/etcd-v3.5.17-windows-amd64/default.etcd/member/wal/0000000000000000-0000000000000000.wal" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/baseserver/router/route_table.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/baseserver/router/route_table.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/config/csv/FruitNormalAwardCfg.csv" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/config/csv/FruitSpecialAwardCfg.csv" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/config/csv/FruitSpecialAwardCfg.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/config/fruit_config.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/config/fruit_config.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/fruit/model/fruit_player.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/fruit/model/fruit_player.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/config/csv/FruitAwardCfg.csv" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/config/csv/FruitAwardCfg.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/config/csv/FruitSlotTypeCfg.csv" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/config/csv/FruitSlotTypeCfg.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/fruit/model/fruit_manager.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/fruit/model/fruit_manager.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/fruit/model/fruit_room.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/fruit/model/fruit_room.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/fruit/msg/fruit_msg.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/fruit/msg/fruit_msg.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/game/msg/fruit_msg.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/game/msg/fruit_msg.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/pprof/guildmem.pprof/mem.pprof" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/pprof/guildmem.pprof/mem.pprof" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/config_csv.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/config_csv.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/buildproto.bat" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/buildproto.bat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/login.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/login.pb.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/login.proto" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/login.proto" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/messagedef.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/messagedef.pb.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/messagedef.proto" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/messagedef.proto" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/messagedefclient.proto" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/messagedefclient.proto" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/pbbind_gen.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/pbbind_gen.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/user.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/user.pb.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/roserver/serverproto/user.proto" beforeDir="false" afterPath="$PROJECT_DIR$/roserver/serverproto/user.proto" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -467,11 +463,6 @@
<line>74</line>
<option name="timeStamp" value="464" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
<url>file://$PROJECT_DIR$/roserver/baseserver/model/base_config.go</url>
<line>17</line>
<option name="timeStamp" value="477" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<watches-manager>

View File

@ -341,7 +341,7 @@ func init(){
addRule("SCFruitBetAck","game,fruit","game",1759)
addRule("SCFruitSettleNtf","game,fruit","game",1760)
addRule("SCFruitSecTickNtf","game,fruit","game",1761)
addRule("SCFruitAwardRankNtf","game,fruit","game",1762)
addRule("SCFruitPlayerAwardRankNtf","game,fruit","game",1762)
addRule("SSCrossYuanHangTrialViewListReq","crossserver","crossserver",6002)
addRule("SSCrossYuanHangTrialReq","crossserver","crossserver",6004)
addRule("SSCrossYuanHangTrialChallengeReq","crossserver","crossserver",6006)

View File

@ -17,6 +17,7 @@ int,list,int,int,int,string
14,14,330,80,6,big star
15,15,270,60,5,big 77
16,16,100,25,5,big BAR
100,9;10;11;12;13;14;15;8;16,400,80,10,bonus
101,1;2;3;4;5;6;7,6000,6000,100,small ManGuan
102,9;9;9;9,1300,1300,30,big SiXi
103,10;11;12,1000,1600,30,small SanYuan

1 Slot Id Slot类型 基础权重 坐庄权重 动态权重 提示
17 14 14 330 80 6 big star
18 15 15 270 60 5 big 77
19 16 16 100 25 5 big BAR
20 100 9;10;11;12;13;14;15;8;16 400 80 10 bonus
21 101 1;2;3;4;5;6;7 6000 6000 100 small ManGuan
22 102 9;9;9;9 1300 1300 30 big SiXi
23 103 10;11;12 1000 1600 30 small SanYuan

View File

@ -1,19 +1,19 @@
Slot类型,Slot集合,倍数,押注类型,提示
Id,Slots,Times,BetType,Tips
int,list,int,int,string
1,20,2,1,small apple
2,14,2,2,small orange
3,8,2,3,small papaya
4,2,2,4,small bell
5,17,2,5,small watermelon
6,5,2,6,small star
7,11,2,7,small 77
8,23,60,8,small BAR
9,3;9;15;21,5,1,big apple
1,6,2,1,small apple
2,12,2,2,small orange
3,24,2,3,small papaya
4,18,2,4,small bell
5,9,2,5,small watermelon
6,21,2,6,small star
7,15,2,7,small 77
8,3,60,8,small BAR
9,5;11;17;23,5,1,big apple
10,1;13,10,2,big orange
11,7;19,15,3,big papaya
12,12;24,20,4,big bell
13,18,20,5,big watermelon
14,6,30,6,big star
15,10,40,7,big 77
16,22,120,8,big BAR
11,2;14,15,3,big papaya
12,7;19,20,4,big bell
13,8,20,5,big watermelon
14,20,30,6,big star
15,16,40,7,big 77
16,4,120,8,big BAR

1 Slot类型 Slot集合 倍数 押注类型 提示
2 Id Slots Times BetType Tips
3 int list int int string
4 1 20 6 2 1 small apple
5 2 14 12 2 2 small orange
6 3 8 24 2 3 small papaya
7 4 2 18 2 4 small bell
8 5 17 9 2 5 small watermelon
9 6 5 21 2 6 small star
10 7 11 15 2 7 small 77
11 8 23 3 60 8 small BAR
12 9 3;9;15;21 5;11;17;23 5 1 big apple
13 10 1;13 10 2 big orange
14 11 7;19 2;14 15 3 big papaya
15 12 12;24 7;19 20 4 big bell
16 13 18 8 20 5 big watermelon
17 14 6 20 30 6 big star
18 15 10 16 40 7 big 77
19 16 22 4 120 8 big BAR

View File

@ -31,7 +31,10 @@ func (self *FruitManager) AddPlayer(uid uint64, name string) {
func (self *FruitManager) RemovePlayer(uid uint64) {
//delete(self.players, uid)
self.players[uid].Online = false
_, exist := self.players[uid]
if exist {
self.players[uid].Online = false
}
}
func (self *FruitManager) GetPlayer(uid uint64) *FruitPlayer {

View File

@ -11,8 +11,8 @@ import (
const (
ROOM_STAGE_BET = 1 //押注阶段
ROOM_STAGE_SETTLE = 2 //开奖阶段
DURATION_BET_SEC = 2
DURATION_SETTLE_SEC = 1
DURATION_BET_SEC = 15
DURATION_SETTLE_SEC = 5
MAX_POOL_CHIP = 10000
MAX_SETTLE_HISTORY_COUNT = 7
AWARD_TYPE_NORMAL = 1
@ -20,17 +20,18 @@ const (
)
type FruitRoom struct {
roomId int32
stage int32
sec int32
uidList []uint64
PoolChipNum int32
TotalBetInfo map[int32]int32
settleHistory []int32
currAwardType int32
currAwardSlots []int32
currStartSlot int32
currTargetSlot int32
roomId int32
Stage int32
Sec int32
uidList []uint64
PoolChipNum int32
TotalBetInfo map[int32]int32
SettleHistory []int32
CurrAwardType int32
CurrAwardSlots []int32
CurrStartSlot int32
CurrTargetSlot int32
CurrPlayerAwardRank []*serverproto.FruitPlayerAwardInfo
}
type FruitRateInfo struct {
@ -45,16 +46,16 @@ type FruitRateInfo struct {
func newFruitRoom(roomId int32) *FruitRoom {
room := &FruitRoom{
roomId: roomId,
stage: ROOM_STAGE_BET,
sec: 0,
Stage: ROOM_STAGE_BET,
Sec: 0,
uidList: make([]uint64, 0),
PoolChipNum: 0,
TotalBetInfo: make(map[int32]int32),
settleHistory: make([]int32, 0),
currAwardType: 16,
currAwardSlots: []int32{4},
currStartSlot: 4,
currTargetSlot: 4,
SettleHistory: make([]int32, 0),
CurrAwardType: 16,
CurrAwardSlots: []int32{4},
CurrStartSlot: 4,
CurrTargetSlot: 4,
}
room.ResetTotalBetInfo()
return room
@ -95,7 +96,7 @@ func (self *FruitRoom) Leave(uid uint64) {
}
func (self *FruitRoom) Bet(uid uint64, betInfo []*serverproto.FruitSlotBetInfo) serverproto.ErrorCode {
if self.stage != ROOM_STAGE_BET {
if self.Stage != ROOM_STAGE_BET {
return serverproto.ErrorCode_ERROR_FRUIT_CURR_STAGE_CANNOT_BET
}
player := FruitMgr.GetPlayer(uid)
@ -115,8 +116,8 @@ func (self *FruitRoom) Bet(uid uint64, betInfo []*serverproto.FruitSlotBetInfo)
}
func (self *FruitRoom) JumpStage(stage int32) {
self.stage = stage
self.sec = 0
self.Stage = stage
self.Sec = 0
switch stage {
case ROOM_STAGE_BET:
self.StartBet()
@ -188,30 +189,48 @@ func (self *FruitRoom) Settle() {
}
rollResult := self.Roll(rateItems)
self.RecordSettleHistory(rollResult.AwardType)
awardSlots := make([]string, 0)
for _, v := range rollResult.SlotTypes {
slotType, _ := strconv.Atoi(v)
self.CurrAwardType = rollResult.AwardType
if rollResult.AwardType == 100 {
slotTypeStr := rollResult.SlotTypes[rand.Intn(len(rollResult.SlotTypes))]
slotType, _ := strconv.Atoi(slotTypeStr)
awardSlots := make([]string, 0)
slotTypeCfg := serverproto.FruitSlotTypeCfgLoader[int32(slotType)]
awardSlot := self.RandomSlot(slotTypeCfg.Slots, awardSlots)
awardSlots = append(awardSlots, awardSlot)
tempAwardSlots := make([]int32, 0)
for _, v := range awardSlots {
slot, _ := strconv.Atoi(v)
tempAwardSlots = append(tempAwardSlots, int32(slot))
}
self.CurrAwardSlots = tempAwardSlots
self.CurrStartSlot = self.CurrTargetSlot
} else if rollResult.AwardType >= 101 {
awardSlots := make([]string, 0)
for _, v := range rollResult.SlotTypes {
slotType, _ := strconv.Atoi(v)
slotTypeCfg := serverproto.FruitSlotTypeCfgLoader[int32(slotType)]
awardSlot := self.RandomSlot(slotTypeCfg.Slots, awardSlots)
awardSlots = append(awardSlots, awardSlot)
}
tempAwardSlots := make([]int32, 0)
for _, v := range awardSlots {
slot, _ := strconv.Atoi(v)
tempAwardSlots = append(tempAwardSlots, int32(slot))
}
self.CurrAwardSlots = tempAwardSlots
self.CurrStartSlot = self.CurrTargetSlot
}
tempAwardSlots := make([]int32, 0)
for _, v := range awardSlots {
slot, _ := strconv.Atoi(v)
tempAwardSlots = append(tempAwardSlots, int32(slot))
}
self.currAwardType = rollResult.AwardType
self.currAwardSlots = tempAwardSlots
self.currStartSlot = self.currTargetSlot
if self.currAwardType >= 1 && self.currAwardType <= 8 {
// normal small award
self.currTargetSlot = self.currAwardSlots[len(self.currAwardSlots)-1]
} else if self.currAwardType >= 9 && self.currAwardType <= 16 {
// normal big award
self.currTargetSlot = self.currAwardSlots[len(self.currAwardSlots)-1]
if self.CurrAwardType >= 1 && self.CurrAwardType <= 16 {
// normal award
self.CurrTargetSlot = self.CurrAwardSlots[0]
} else {
// special award
self.currTargetSlot = self.currAwardSlots[len(self.currAwardSlots)-1]
if rand.Intn(2) == 0 {
self.CurrTargetSlot = 10
} else {
self.CurrTargetSlot = 22
}
}
awardRank := make([]*serverproto.FruitPlayerAwardInfo, 0)
@ -242,24 +261,24 @@ func (self *FruitRoom) Settle() {
ntfMsg := &serverproto.SCFruitSettleNtf{
Uid: uid,
MyChipNum: player.ChipNum,
AwardType: self.currAwardType,
AwardType: self.CurrAwardType,
AwardChipNum: player.CurrAwardChipNum,
AwardSlots: self.currAwardSlots,
SettleHistory: self.settleHistory,
StartSlot: self.currStartSlot,
TargetSlot: self.currTargetSlot,
AwardSlots: self.CurrAwardSlots,
SettleHistory: self.SettleHistory,
StartSlot: self.CurrStartSlot,
TargetSlot: self.CurrTargetSlot,
AwardItems: make([]int32, 0),
}
SendToAllGame(ntfMsg)
}
awardPlayerRank := self.GetPlayerRank(awardRank)
if len(awardPlayerRank) > 0 {
self.CurrPlayerAwardRank = self.GetPlayerRank(awardRank)
if len(self.CurrPlayerAwardRank) > 0 {
for _, player := range FruitMgr.players {
awardRankNtfMsg := serverproto.SCFruitAwardRankNtf{
Uid: player.Uid,
AwardType: self.currAwardType,
AwardRank: awardPlayerRank,
awardRankNtfMsg := &serverproto.SCFruitPlayerAwardRankNtf{
Uid: player.Uid,
AwardType: self.CurrAwardType,
PlayerAwardRank: self.CurrPlayerAwardRank,
}
SendToAllGame(awardRankNtfMsg)
}
@ -267,15 +286,15 @@ func (self *FruitRoom) Settle() {
}
func (self *FruitRoom) RecordSettleHistory(awardType int32) {
if len(self.settleHistory) < MAX_SETTLE_HISTORY_COUNT {
self.settleHistory = append(self.settleHistory, awardType)
if len(self.SettleHistory) < MAX_SETTLE_HISTORY_COUNT {
self.SettleHistory = append(self.SettleHistory, awardType)
} else {
newSettleHistory := make([]int32, 0)
for i := 1; i < len(self.settleHistory); i++ {
newSettleHistory = append(newSettleHistory, self.settleHistory[i])
for i := 1; i < len(self.SettleHistory); i++ {
newSettleHistory = append(newSettleHistory, self.SettleHistory[i])
}
newSettleHistory = append(newSettleHistory, awardType)
self.settleHistory = newSettleHistory
self.SettleHistory = newSettleHistory
}
}
func (self *FruitRoom) RandomSlot(slots []string, excludeSlots []string) string {
@ -310,7 +329,7 @@ func (self *FruitRoom) SecTick() {
uid := self.uidList[i]
ntfMsg := &serverproto.SCFruitSecTickNtf{
Uid: uid,
Sec: self.sec,
Sec: DURATION_BET_SEC - self.Sec,
PoolChipNum: uint32(self.PoolChipNum),
TotalBetInfo: totalBetInfo,
}
@ -323,19 +342,19 @@ func (self *FruitRoom) Update() {
//return
}
self.sec++
self.Sec++
//log.Println(self.stage, self.sec)
switch self.stage {
switch self.Stage {
case ROOM_STAGE_BET:
if self.sec > DURATION_BET_SEC {
if self.Sec > DURATION_BET_SEC {
self.JumpStage(ROOM_STAGE_SETTLE)
break
}
self.SecTick()
case ROOM_STAGE_SETTLE:
if self.sec > DURATION_SETTLE_SEC {
if self.Sec > DURATION_SETTLE_SEC {
self.JumpStage(ROOM_STAGE_BET)
break
}

View File

@ -28,8 +28,36 @@ func init() {
msg := ev.Msg().(*serverproto.CSFruitJoinReq)
util.InfoF("receive CSFruitJoinReq msg:%v", msg)
model2.FruitMgr.Room.Join(msg.Uid)
player := model2.FruitMgr.GetPlayer(msg.Uid)
player.ChipNum = 10000
totalBetInfo := make([]*serverproto.FruitSlotBetInfo, 0)
for slot := 1; slot <= 8; slot++ {
betNum := model2.FruitMgr.Room.TotalBetInfo[int32(slot)]
totalBetInfo = append(totalBetInfo, &serverproto.FruitSlotBetInfo{
Slot: int32(slot),
BetNum: betNum,
})
}
myBetInfo := make([]*serverproto.FruitSlotBetInfo, 0)
for slot := 1; slot <= 8; slot++ {
betNum := player.CurrBetInfo[int32(slot)]
myBetInfo = append(myBetInfo, &serverproto.FruitSlotBetInfo{
Slot: int32(slot),
BetNum: betNum,
})
}
ackMsg := &serverproto.SCFruitJoinAck{
Error: 0,
Uid: msg.Uid,
Error: 0,
Stage: model2.FruitMgr.Room.Stage,
Sec: model2.FruitMgr.Room.Sec,
MyChipNum: player.ChipNum,
PoolChipNum: model2.FruitMgr.Room.PoolChipNum,
TotalBetInfo: totalBetInfo,
MyBetInfo: myBetInfo,
SettleHistory: model2.FruitMgr.Room.SettleHistory,
CurrAwardSlots: model2.FruitMgr.Room.CurrAwardSlots,
PlayerAwardRank: model2.FruitMgr.Room.CurrPlayerAwardRank,
}
model.ServiceReplay(ev, ackMsg)
})
@ -39,6 +67,7 @@ func init() {
util.InfoF("receive CSFruitLeaveReq msg:%v", msg)
model2.FruitMgr.Room.Leave(msg.Uid)
ackMsg := &serverproto.SCFruitLeaveAck{
Uid: msg.Uid,
Error: 0,
}
model.ServiceReplay(ev, ackMsg)
@ -66,6 +95,7 @@ func init() {
})
}
ackMsg := &serverproto.SCFruitBetAck{
Uid: msg.Uid,
Error: int32(errCode),
MyChipNum: player.ChipNum,
PoolChipNum: uint32(model2.FruitMgr.Room.PoolChipNum),

View File

@ -9,28 +9,28 @@ import (
)
func init() {
serverproto.Handle_FRUIT_CSFruitJoinReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_CSFruitJoinReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.CSFruitJoinReq)
role := model2.RoleMag.GetRoleOrKick(cliId, ev)
if role == nil {
return
}
util.InfoF("uid=%v receive CSBuildGuildReq msg=%v", role.GetUUid(), msg)
util.InfoF("uid=%v receive CSFruitJoinReq msg=%v", role.GetUUid(), msg)
msg.Uid = role.GetUUid()
role.(*model2.Role).SendAllFruit(msg)
})
serverproto.Handle_FRUIT_SCFruitJoinAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_SCFruitJoinAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCFruitJoinAck)
newCliId := &model.ClientID{SessID: msg.Uid}
role := model2.RoleMag.GetRole(*newCliId)
util.InfoF("uid=%v receive SCFruitJoinAck msg=%v", role.GetUUid(), msg)
if role == nil {
return
}
util.InfoF("uid=%v receive SSGuildDemonFightAck msg=%v", role.GetUUid(), msg)
role.ReplayGate(msg, true)
})
serverproto.Handle_FRUIT_CSFruitLeaveReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_CSFruitLeaveReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.CSFruitLeaveReq)
role := model2.RoleMag.GetRoleOrKick(cliId, ev)
if role == nil {
@ -40,7 +40,7 @@ func init() {
msg.Uid = role.GetUUid()
role.(*model2.Role).SendAllFruit(msg)
})
serverproto.Handle_FRUIT_SCFruitLeaveAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_SCFruitLeaveAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCFruitLeaveAck)
newCliId := &model.ClientID{SessID: msg.Uid}
role := model2.RoleMag.GetRole(*newCliId)
@ -51,7 +51,7 @@ func init() {
role.ReplayGate(msg, true)
})
serverproto.Handle_FRUIT_CSFruitBetReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_CSFruitBetReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.CSFruitBetReq)
role := model2.RoleMag.GetRoleOrKick(cliId, ev)
if role == nil {
@ -61,7 +61,7 @@ func init() {
msg.Uid = role.GetUUid()
role.(*model2.Role).SendAllFruit(msg)
})
serverproto.Handle_FRUIT_SCFruitBetAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_SCFruitBetAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCFruitBetAck)
newCliId := &model.ClientID{SessID: msg.Uid}
role := model2.RoleMag.GetRole(*newCliId)
@ -72,24 +72,34 @@ func init() {
role.ReplayGate(msg, true)
})
serverproto.Handle_FRUIT_SCFruitSettleNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_SCFruitSettleNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCFruitSettleNtf)
util.InfoF("uid=%v receive SCFruitSettleNtf msg=%v", msg.Uid, msg)
newCliId := &model.ClientID{SessID: msg.Uid}
role := model2.RoleMag.GetRole(*newCliId)
if role == nil {
return
}
util.InfoF("uid=%v receive SCFruitSettleNtf msg=%v", role.GetUUid(), msg)
role.ReplayGate(msg, true)
})
serverproto.Handle_FRUIT_SCFruitSecTickNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
serverproto.Handle_GAME_SCFruitSecTickNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCFruitSecTickNtf)
util.InfoF("uid=%v receive SCFruitSecTickNtf msg=%v", msg.Uid, msg)
newCliId := &model.ClientID{SessID: msg.Uid}
role := model2.RoleMag.GetRole(*newCliId)
if role == nil {
return
}
role.ReplayGate(msg, true)
})
serverproto.Handle_GAME_SCFruitPlayerAwardRankNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCFruitPlayerAwardRankNtf)
util.InfoF("uid=%v receive SCFruitPlayerAwardRankNtf msg=%v", msg.Uid, msg)
newCliId := &model.ClientID{SessID: msg.Uid}
role := model2.RoleMag.GetRole(*newCliId)
if role == nil {
return
}
util.InfoF("uid=%v receive SCFruitSecTickNtf msg=%v", role.GetUUid(), msg)
role.ReplayGate(msg, true)
})
}

View File

@ -10,5 +10,5 @@ for /r %CD% %%i in (*.proto) do (
)
)
echo "build config info"
python config_cmd.py -d ../config
REM echo "build config info"
REM python config_cmd.py -d ../config

File diff suppressed because it is too large Load Diff

View File

@ -3782,8 +3782,8 @@ message SCFruitJoinAck { //project game|fruit //RouteRule game
repeated FruitSlotBetInfo total_bet_info = 7; //
repeated FruitSlotBetInfo my_bet_info = 8; //
repeated int32 settle_history = 9; //
repeated int32 last_award_slots = 10; //
repeated FruitPlayerAwardInfo last_player_award_info = 11;
repeated int32 curr_award_slots = 10; //
repeated FruitPlayerAwardInfo player_award_rank = 11;
}
message CSFruitLeaveReq { //project game|fruit //RouteRule game
uint64 uid = 1;
@ -3816,14 +3816,14 @@ message SCFruitSettleNtf { //project game|fruit //RouteRule game
int32 target_slot = 8;
repeated int32 award_items = 9;
}
message SCFruitAwardRankNtf { //project game|fruit //RouteRule game
uint64 uid = 1;
int32 award_type = 2;
repeated FruitPlayerAwardInfo award_rank = 3;
}
message SCFruitSecTickNtf { //project game|fruit //RouteRule game
uint64 uid = 1;
int32 sec = 2;
uint32 pool_chip_num = 3;
repeated FruitSlotBetInfo total_bet_info = 4;
}
message SCFruitPlayerAwardRankNtf { //project game|fruit //RouteRule game
uint64 uid = 1;
int32 award_type = 2;
repeated FruitPlayerAwardInfo player_award_rank = 3;
}

File diff suppressed because it is too large Load Diff

View File

@ -741,7 +741,7 @@ enum protoMsgId{
SC_FRUIT_BET_ACK = 1759; // SCFruitBetAck **SCFruitBetAck **login.proto **game,fruit [SCFruitBetAck]
SC_FRUIT_SETTLE_NTF = 1760; // SCFruitSettleNtf **SCFruitSettleNtf **login.proto **game,fruit [SCFruitSettleNtf]
SC_FRUIT_SEC_TICK_NTF = 1761; // SCFruitSecTickNtf **SCFruitSecTickNtf **login.proto **game,fruit [SCFruitSecTickNtf]
SC_FRUIT_AWARD_RANK_NTF = 1762; // SCFruitAwardRankNtf **SCFruitAwardRankNtf **login.proto **game,fruit [SCFruitAwardRankNtf]
SC_FRUIT_PLAYER_AWARD_RANK_NTF = 1762; // SCFruitPlayerAwardRankNtf **SCFruitPlayerAwardRankNtf **login.proto **game,fruit [SCFruitPlayerAwardRankNtf]
SS_WEB_GM_CHAT_MSG_NTF = 3000; // SSWebGMChatMsgNtf **SSWebGMChatMsgNtf **logic.proto **db [SSWebGMChatMsgNtf]
SS_WEB_GM_ADD_MAIL_NTF = 3001; // SSWebGMAddMailNtf **SSWebGMAddMailNtf **logic.proto **social,game,db [SSWebGMAddMailNtf]
SS_WEB_GM_BAN_NTF = 3002; // SSWebGMBanNtf **SSWebGMBanNtf **logic.proto **social,game [SSWebGMBanNtf]

View File

@ -719,6 +719,6 @@ enum protoMsgId{
SC_FRUIT_BET_ACK = 1759; // SCFruitBetAck **SCFruitBetAck **login.proto **game,fruit [SCFruitBetAck]
SC_FRUIT_SETTLE_NTF = 1760; // SCFruitSettleNtf **SCFruitSettleNtf **login.proto **game,fruit [SCFruitSettleNtf]
SC_FRUIT_SEC_TICK_NTF = 1761; // SCFruitSecTickNtf **SCFruitSecTickNtf **login.proto **game,fruit [SCFruitSecTickNtf]
SC_FRUIT_AWARD_RANK_NTF = 1762; // SCFruitAwardRankNtf **SCFruitAwardRankNtf **login.proto **game,fruit [SCFruitAwardRankNtf]
SC_FRUIT_PLAYER_AWARD_RANK_NTF = 1762; // SCFruitPlayerAwardRankNtf **SCFruitPlayerAwardRankNtf **login.proto **game,fruit [SCFruitPlayerAwardRankNtf]
}

View File

@ -172,7 +172,7 @@ var(
Handle_FRUIT_SCFruitBetAck =func(e rocommon.ProcEvent){panic("SCFruitBetAck not implements")}
Handle_FRUIT_SCFruitSettleNtf =func(e rocommon.ProcEvent){panic("SCFruitSettleNtf not implements")}
Handle_FRUIT_SCFruitSecTickNtf =func(e rocommon.ProcEvent){panic("SCFruitSecTickNtf not implements")}
Handle_FRUIT_SCFruitAwardRankNtf =func(e rocommon.ProcEvent){panic("SCFruitAwardRankNtf not implements")}
Handle_FRUIT_SCFruitPlayerAwardRankNtf =func(e rocommon.ProcEvent){panic("SCFruitPlayerAwardRankNtf not implements")}
Handle_FRUIT_SSPlayerOnlineNtf =func(e rocommon.ProcEvent){panic("SSPlayerOnlineNtf not implements")}
Handle_FRUIT_SSPlayerOfflineNtf =func(e rocommon.ProcEvent){panic("SSPlayerOfflineNtf not implements")}
Handle_FRUIT_Default func(e rocommon.ProcEvent)
@ -565,7 +565,7 @@ var(
Handle_GAME_SCFruitBetAck =func(e rocommon.ProcEvent){panic("SCFruitBetAck not implements")}
Handle_GAME_SCFruitSettleNtf =func(e rocommon.ProcEvent){panic("SCFruitSettleNtf not implements")}
Handle_GAME_SCFruitSecTickNtf =func(e rocommon.ProcEvent){panic("SCFruitSecTickNtf not implements")}
Handle_GAME_SCFruitAwardRankNtf =func(e rocommon.ProcEvent){panic("SCFruitAwardRankNtf not implements")}
Handle_GAME_SCFruitPlayerAwardRankNtf =func(e rocommon.ProcEvent){panic("SCFruitPlayerAwardRankNtf not implements")}
Handle_GAME_SSWebGMAddMailNtf =func(e rocommon.ProcEvent){panic("SSWebGMAddMailNtf not implements")}
Handle_GAME_SSWebGMBanNtf =func(e rocommon.ProcEvent){panic("SSWebGMBanNtf not implements")}
Handle_GAME_SSWebGMNoticeNtf =func(e rocommon.ProcEvent){panic("SSWebGMNoticeNtf not implements")}
@ -1142,7 +1142,7 @@ func GetMessageHandler(sreviceName string) rocommon.EventCallBack {
case *SCFruitBetAck: Handle_FRUIT_SCFruitBetAck(e)
case *SCFruitSettleNtf: Handle_FRUIT_SCFruitSettleNtf(e)
case *SCFruitSecTickNtf: Handle_FRUIT_SCFruitSecTickNtf(e)
case *SCFruitAwardRankNtf: Handle_FRUIT_SCFruitAwardRankNtf(e)
case *SCFruitPlayerAwardRankNtf: Handle_FRUIT_SCFruitPlayerAwardRankNtf(e)
case *SSPlayerOnlineNtf: Handle_FRUIT_SSPlayerOnlineNtf(e)
case *SSPlayerOfflineNtf: Handle_FRUIT_SSPlayerOfflineNtf(e)
default:
@ -1540,7 +1540,7 @@ func GetMessageHandler(sreviceName string) rocommon.EventCallBack {
case *SCFruitBetAck: Handle_GAME_SCFruitBetAck(e)
case *SCFruitSettleNtf: Handle_GAME_SCFruitSettleNtf(e)
case *SCFruitSecTickNtf: Handle_GAME_SCFruitSecTickNtf(e)
case *SCFruitAwardRankNtf: Handle_GAME_SCFruitAwardRankNtf(e)
case *SCFruitPlayerAwardRankNtf: Handle_GAME_SCFruitPlayerAwardRankNtf(e)
case *SSWebGMAddMailNtf: Handle_GAME_SSWebGMAddMailNtf(e)
case *SSWebGMBanNtf: Handle_GAME_SSWebGMBanNtf(e)
case *SSWebGMNoticeNtf: Handle_GAME_SSWebGMNoticeNtf(e)
@ -2697,7 +2697,7 @@ func init() {
registerInfo(1759, reflect.TypeOf((*SCFruitBetAck)(nil)).Elem(), 0)
registerInfo(1760, reflect.TypeOf((*SCFruitSettleNtf)(nil)).Elem(), 0)
registerInfo(1761, reflect.TypeOf((*SCFruitSecTickNtf)(nil)).Elem(), 0)
registerInfo(1762, reflect.TypeOf((*SCFruitAwardRankNtf)(nil)).Elem(), 0)
registerInfo(1762, reflect.TypeOf((*SCFruitPlayerAwardRankNtf)(nil)).Elem(), 0)
registerInfo(3000, reflect.TypeOf((*SSWebGMChatMsgNtf)(nil)).Elem(), 0)
registerInfo(3001, reflect.TypeOf((*SSWebGMAddMailNtf)(nil)).Elem(), 0)
registerInfo(3002, reflect.TypeOf((*SSWebGMBanNtf)(nil)).Elem(), 0)