直播礼物

This commit is contained in:
fatiao 2026-01-08 12:45:09 +08:00
parent cf2d2953f6
commit db10a7171c
20 changed files with 2387 additions and 1932 deletions

View File

@ -356,7 +356,6 @@ func init(){
addRule("SCLiveRoomTimerNtf","game,fruit","game",1776)
addRule("CSLiveRoomSendGiftReq","game,fruit","game",1777)
addRule("SCLiveRoomSendGiftAck","game,fruit","game",1778)
addRule("SCLiveRoomGiftRankNtf","game,fruit","game",1779)
addRule("CSLiveRoomGetReadyReq","game,fruit","game",1783)
addRule("SCLiveRoomGetReadyAck","game,fruit","game",1784)
addRule("SCLiveRoomGetReadyNtf","game,fruit","game",1785)
@ -367,6 +366,9 @@ func init(){
addRule("SCLiveRoomShowSubmitAck","game,fruit","game",1797)
addRule("SCLiveRoomShowDataNtf","game,fruit","game",1798)
addRule("SCLiveRoomResultNtf","game,fruit","game",1799)
addRule("SCLiveRoomSendGiftNtf","game,fruit","game",1800)
addRule("SCLiveRoomGiftRankAck","game,fruit","game",1802)
addRule("CSLiveRoomGiftRankReq","game,fruit","game",1803)
addRule("SSCrossYuanHangTrialViewListReq","crossserver","crossserver",6002)
addRule("SSCrossYuanHangTrialReq","crossserver","crossserver",6004)
addRule("SSCrossYuanHangTrialChallengeReq","crossserver","crossserver",6006)

View File

@ -0,0 +1,19 @@
礼物ID,名称,图标,价格,"奖励物品(绿色1-3阶装备:比重, 蓝色1-3阶装备:比重, 紫色1-3阶装备:比重)",礼物贡献点数
Id,Name,Icon,Price,RewardItems,GiftPoint
int,string,string,string,string,int
1,烟花棒,YanHuaBang,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
2,玫瑰花,Rose,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
3,灯牌,DengPai,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
4,咖啡,Coffee,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
5,盲盒,MangHe,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
6,蛋糕,Cake,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
7,泡泡机,PaoPaoJi,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
8,布娃娃,BuWaWa,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
9,红酒,Wine,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
10,糖果,Sugar,51000:1,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
11,话筒,Mike,51000:10,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,1
12,摩托,Moto,51000:100,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,5
13,跑车,Car,51000:100,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,30
14,飞机,Airplane,51000:1000,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,60
15,钢琴,Piano,51000:100,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,10
16,城堡,Castle,51000:1000,-1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0,100
1 礼物ID 名称 图标 价格 奖励物品(绿色1-3阶装备:比重, 蓝色1-3阶装备:比重, 紫色1-3阶装备:比重) 礼物贡献点数
2 Id Name Icon Price RewardItems GiftPoint
3 int string string string string int
4 1 烟花棒 YanHuaBang 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
5 2 玫瑰花 Rose 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
6 3 灯牌 DengPai 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
7 4 咖啡 Coffee 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
8 5 盲盒 MangHe 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
9 6 蛋糕 Cake 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
10 7 泡泡机 PaoPaoJi 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
11 8 布娃娃 BuWaWa 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
12 9 红酒 Wine 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
13 10 糖果 Sugar 51000:1 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
14 11 话筒 Mike 51000:10 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 1
15 12 摩托 Moto 51000:100 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 5
16 13 跑车 Car 51000:100 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 30
17 14 飞机 Airplane 51000:1000 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 60
18 15 钢琴 Piano 51000:100 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 10
19 16 城堡 Castle 51000:1000 -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0 100

View File

@ -89,8 +89,8 @@ func (self *LiveGameRoom) HasShowData() bool {
// 返回游戏过程中的状态数据
func (self *LiveGameRoom) GetShowData(readyUidList []uint64, uid uint64) []*serverproto.KeyValueType64 {
submitResult := make([]*serverproto.KeyValueType64, 0)
return submitResult
//submitResult := make([]*serverproto.KeyValueType64, 0)
return self.scoreRank
}
// 处理玩家在游戏过程中提交的输入,比如玩家的得分;返回自己的排名

View File

@ -3,8 +3,10 @@ package model
import (
"fmt"
"math"
"math/rand"
"rocommon/util"
"roserver/baseserver/model"
model2 "roserver/game/model"
"roserver/serverproto"
"sort"
"strconv"
@ -18,7 +20,7 @@ type LiveRoomInterface interface {
Leave(uid uint64)
GetReady(uid uint64) bool
IsReady(uid uint64) bool
SendGift(uid uint64, giftId uint32)
SendGift(uid uint64, giftId uint32) int32
RoomId() uint32
RoomType() uint32
StageSec() uint32
@ -26,6 +28,7 @@ type LiveRoomInterface interface {
Stage() uint32
HasPlayer(uid uint64) bool
IsFree(uid uint64) bool
GiftRecords() []*serverproto.LiveRoomPlayerInfo
GiftRank() []*serverproto.LiveRoomPlayerInfo
ChatRecords() []*serverproto.LiveRoomChatData
GetReadyPlayerInfoList(uid uint64) []*serverproto.LiveRoomPlayerInfo
@ -70,9 +73,10 @@ type LiveRoom struct {
tickIntervalMS uint32 //1000ms, 100ms
stage uint32
roomCfg *serverproto.LiveRoomCfg
giftPoint int32
sumGiftPoint int32
giftRankResetTime uint64
giftRank []*serverproto.LiveRoomPlayerInfo
giftRecords []*serverproto.LiveRoomPlayerInfo
chatRecords []*serverproto.LiveRoomChatData
idleTimeline map[int32]*TimelineFrame
readyTimeline map[int32]*TimelineFrame
@ -109,8 +113,9 @@ func newLiveRoom(roomId uint32, roomType uint32, tickInterval uint32) LiveRoom {
tickIntervalMS: tickInterval,
stage: LIVEROOM_STAGE_NULL,
roomCfg: serverproto.LiveRoomCfgLoader[int32(roomType)],
giftPoint: 0,
sumGiftPoint: 0,
giftRank: make([]*serverproto.LiveRoomPlayerInfo, 0),
giftRecords: make([]*serverproto.LiveRoomPlayerInfo, 0),
chatRecords: make([]*serverproto.LiveRoomChatData, 0),
}
liveRoom.BaseSetVF()
@ -283,6 +288,12 @@ func (self *LiveRoom) ChangeStage(newStage uint32) {
self.stage = newStage
}
func (self *LiveRoom) makeTalkParams(cfg *serverproto.LiveRoomTalkCfg, player string, gift int32, item int32) string {
actIdx := rand.Intn(len(cfg.Params1)) + 1
talkIdx := rand.Intn(len(cfg.Params2)) + 1
return fmt.Sprintf("act:%d;talk:%d;player:%s;gift:%d;item:%d", actIdx, talkIdx, player, gift, item)
}
func (self *LiveRoom) HandleCMD(sn int32, cfg *serverproto.LiveRoomTalkCfg) {
switch cfg.CMD {
case LIVEROOM_CMD_TALK:
@ -291,7 +302,7 @@ func (self *LiveRoom) HandleCMD(sn int32, cfg *serverproto.LiveRoomTalkCfg) {
Uid: uid,
RoomId: self.roomId,
TalkId: uint32(cfg.Id),
TalkParams: "",
TalkParams: self.makeTalkParams(cfg, "nil", 0, 0),
}
})
case LIVEROOM_CMD_PLAY:
@ -311,12 +322,12 @@ func (self *LiveRoom) LIVEROOM_STAGE_IDLE_Enter() {
util.InfoF("LIVEROOM_STAGE_IDLE_Enter")
self.readyUidList = make([]uint64, 0)
self.submitDataList = make([]*LiveRoomSubmitData, 0)
self.giftPoint = 0
self.sumGiftPoint = 0
}
func (self *LiveRoom) LIVEROOM_STAGE_IDLE_Update(deltaMS uint32) {
if self.stageTick >= self.CalcTimelineSec(self.idleTimeline) {
if self.giftPoint >= serverproto.LiveRoomCfgLoader[int32(self.roomType)].MaxGiftPoint {
if self.sumGiftPoint >= serverproto.LiveRoomCfgLoader[int32(self.roomType)].MaxGiftPoint {
self.ChangeStage(LIVEROOM_STAGE_READY)
} else {
self.ChangeStage(LIVEROOM_STAGE_IDLE)
@ -480,6 +491,7 @@ func (self *LiveRoom) GetReady(currUid uint64) bool {
// 1. 添加当前玩家的信息
currPlayer := RoomMgr.GetPlayer(currUid)
readyPlayerInfoList = append(readyPlayerInfoList, &serverproto.LiveRoomPlayerInfo{
Uid: currUid,
Nickname: currPlayer.Name,
Level: currPlayer.Level,
HeadId: currPlayer.HeadId,
@ -491,6 +503,7 @@ func (self *LiveRoom) GetReady(currUid uint64) bool {
if tmpUid != currUid {
player := RoomMgr.GetPlayer(tmpUid)
readyPlayerInfoList = append(readyPlayerInfoList, &serverproto.LiveRoomPlayerInfo{
Uid: tmpUid,
Nickname: player.Name,
Level: player.Level,
HeadId: player.HeadId,
@ -506,6 +519,7 @@ func (self *LiveRoom) GetReady(currUid uint64) bool {
tmpUid := self.readyUidList[i]
player := RoomMgr.GetPlayer(tmpUid)
readyPlayerInfoList = append(readyPlayerInfoList, &serverproto.LiveRoomPlayerInfo{
Uid: tmpUid,
Nickname: player.Name,
Level: player.Level,
HeadId: player.HeadId,
@ -582,17 +596,22 @@ func (self *LiveRoom) GetReadyPlayerInfoList(uid uint64) []*serverproto.LiveRoom
}
func (self *LiveRoom) GiftRank() []*serverproto.LiveRoomPlayerInfo {
sort.Slice(self.giftRank, func(i, j int) bool {
return self.giftRank[i].Data > self.giftRank[j].Data
})
topCount := 10
var rank []*serverproto.LiveRoomPlayerInfo
if len(self.giftRank) >= topCount {
rank = self.giftRank[:topCount]
} else {
rank = self.giftRank
}
return rank
return self.giftRank
}
func (self *LiveRoom) GiftRecords() []*serverproto.LiveRoomPlayerInfo {
//sort.Slice(self.giftRank, func(i, j int) bool {
// return self.giftRank[i].Data > self.giftRank[j].Data
//})
//topCount := 10
//var rank []*serverproto.LiveRoomPlayerInfo
//if len(self.giftRank) >= topCount {
// rank = self.giftRank[:topCount]
//} else {
// rank = self.giftRank
//}
//return rank
return self.giftRecords
}
func (self *LiveRoom) ChatRecords() []*serverproto.LiveRoomChatData {
@ -668,22 +687,52 @@ func (self *LiveRoom) ShowSubmit(uid uint64, data []*serverproto.KeyValueType64)
return self.VF_HandleShowSubmit(uid, data)
}
func (self *LiveRoom) SendGift(uid uint64, giftId uint32) {
func (self *LiveRoom) SendGift(uid uint64, giftId uint32) int32 {
player := RoomMgr.GetPlayer(uid)
giftCfg := serverproto.LiveRoomGiftCfgLoader[int32(giftId)]
costItemId, costItemNum := model.Str2Res(giftCfg.Price)
if player.GameChipNum < uint32(costItemNum) {
util.InfoF("[SendGift] Err: GameChipNum=%d < CostItemNum=%d", player.GameChipNum, costItemNum)
return int32(serverproto.ErrorCode_ERROR_RES_NOT_ENOUGH)
}
rewardItemId, _ := RollForRateCfg(giftCfg.RewardItems)
util.InfoF("[SendGift] RollForRateCfg rewardItemId = %d", rewardItemId)
giftRewardStatus := 0
if rewardItemId != -1 {
giftRewardStatus = 1
addItems := make([]*serverproto.KeyValueType, 0)
addItems = append(addItems, &serverproto.KeyValueType{Key: int32(rewardItemId), Value: 1})
self.AddItemList(uid, addItems, int32(model2.AddFrom_LiveRoom_Gift), true)
}
costItems := make([]*serverproto.KeyValueType, 0)
costItems = append(costItems, &serverproto.KeyValueType{Key: int32(costItemId), Value: costItemNum})
self.DeleteItemList(uid, costItems, int32(model2.AddFrom_LiveRoom_Gift), true)
sendGiftInfo := &serverproto.LiveRoomPlayerInfo{
Uid: uid,
Data: fmt.Sprintf("%d:%d", giftId, giftRewardStatus),
}
self.giftRecords = append(self.giftRecords, sendGiftInfo)
if len(self.giftRecords) > 10 {
self.giftRecords = self.giftRecords[1:]
}
isFind := false
currGiftPoint := 1
self.giftPoint += int32(currGiftPoint)
currGiftPoint := giftCfg.GiftPoint
self.sumGiftPoint += int32(currGiftPoint)
for _, v := range self.giftRank {
if v.Uid == player.Uid {
giftNum, _ := strconv.Atoi(v.Data)
giftNum += currGiftPoint
giftNum += int(currGiftPoint)
isFind = true
break
}
}
if isFind == false {
playerInfo := MakeLiveRoomPlayerInfo(uid)
playerInfo.Data = string(1)
playerInfo.Data = string(currGiftPoint)
self.giftRank = append(self.giftRank, playerInfo)
}
sort.Slice(self.giftRank, func(i, j int) bool {
@ -691,21 +740,27 @@ func (self *LiveRoom) SendGift(uid uint64, giftId uint32) {
val2, _ := strconv.Atoi(self.giftRank[j].Data)
return val1 > val2
})
if len(self.giftRank) > 20 {
self.giftRank = self.giftRank[1:]
}
sendGiftTalkCfg := serverproto.LiveRoomTalkCfgLoader[LIVEROOM_TYPE_SEND_GIFT]
self.SendAllPlayers(func(uid uint64) interface{} {
return &serverproto.SCLiveRoomCMDTalkNtf{
Uid: uid,
RoomId: self.roomId,
TalkId: uint32(sendGiftTalkCfg.Id),
TalkParams: fmt.Sprintf("%s:%s", player.Name, giftId),
TalkParams: self.makeTalkParams(sendGiftTalkCfg, player.Name, int32(giftId), int32(rewardItemId)),
}
})
self.SendAllPlayers(func(uid uint64) interface{} {
return &serverproto.SCLiveRoomGiftRankNtf{
Uid: uid,
GiftRank: self.giftRank[:10],
return &serverproto.SCLiveRoomSendGiftNtf{
Uid: uid,
RoomId: self.roomId,
SendGiftInfo: sendGiftInfo,
}
})
return 0
}
func (self *LiveRoom) SendAllPlayers(makeNtfMsgFunc MakeNtfMsgFunc) {

View File

@ -4,6 +4,7 @@ import (
"fmt"
"math/rand"
"roserver/serverproto"
"strconv"
"strings"
)
@ -108,6 +109,16 @@ func SliceContains[T any](slice []T, predicate func(T) bool) bool {
return false
}
func SliceFind[T any](slice []T, predicate func(T) bool) (T, bool) {
for _, v := range slice {
if predicate(v) {
return v, true
}
}
var zero T
return zero, false
}
// 从 map 中随机选择 N 个键
func RandomKeys[K comparable, V any](m map[K]V, n int) []K {
if n <= 0 || len(m) == 0 {
@ -188,3 +199,89 @@ func GetFirstN[T any](slice []T, n int) []T {
copy(result, slice[:n])
return result
}
type ProbabilityItem struct {
ID int
Probability int
}
func parseProbabilityStr(str string) ([]ProbabilityItem, error) {
if str == "" {
return nil, fmt.Errorf("概率字符串为空")
}
items := make([]ProbabilityItem, 0)
pairs := strings.Split(str, ";")
for _, pair := range pairs {
if pair == "" {
continue
}
parts := strings.Split(pair, ":")
if len(parts) != 2 {
return nil, fmt.Errorf("格式错误: %s", pair)
}
id, err := strconv.Atoi(strings.TrimSpace(parts[0]))
if err != nil {
return nil, fmt.Errorf("ID转换错误: %s", parts[0])
}
prob, err := strconv.Atoi(strings.TrimSpace(parts[1]))
if err != nil {
return nil, fmt.Errorf("概率转换错误: %s", parts[1])
}
if prob < 0 {
return nil, fmt.Errorf("概率不能为负数: %d", prob)
}
items = append(items, ProbabilityItem{
ID: id,
Probability: prob,
})
}
return items, nil
}
// SelectByProbability 根据概率随机选择一项
func selectByProbability(items []ProbabilityItem) (int, error) {
if len(items) == 0 {
return 0, fmt.Errorf("概率项列表为空")
}
// 计算总概率
totalProb := 0
for _, item := range items {
totalProb += item.Probability
}
if totalProb <= 0 {
// 如果所有概率都为0则从所有ID中随机选择一个
randIdx := rand.Intn(len(items))
return items[randIdx].ID, nil
}
// 生成随机数
randomValue := rand.Intn(totalProb)
// 根据概率选择
currentSum := 0
for _, item := range items {
currentSum += item.Probability
if randomValue < currentSum {
return item.ID, nil
}
}
// 理论上不会执行到这里
return items[len(items)-1].ID, nil
}
// -1:50;601:50;602:30;603:10;604:10;605:5;606:5;607:0;608:0;609:0
func RollForRateCfg(str string) (int, error) {
items, _ := parseProbabilityStr(str)
return selectByProbability(items)
}

View File

@ -8,10 +8,10 @@ import (
const (
FRUIT_ROOM_NUM = 0
LIVE_CARD_ROOM_NUM = 1
LIVE_SELL_ROOM_NUM = 0
LIVE_ANSWER_ROOM_NUM = 0
LIVE_GAME_ROOM_NUM = 0
LIVE_BID_ROOM_NUM = 0
LIVE_SELL_ROOM_NUM = 1
LIVE_ANSWER_ROOM_NUM = 1
LIVE_GAME_ROOM_NUM = 1
LIVE_BID_ROOM_NUM = 1
LIVEROOM_UPDATE_DELTA_MS = 100
)

View File

@ -176,7 +176,7 @@ func init() {
StageTimerSec: liveRoom.StageTimerSec(),
Stage: liveRoom.Stage(),
IsReady: liveRoom.IsReady(msg.Uid),
GiftRank: liveRoom.GiftRank(),
GiftRecords: liveRoom.GiftRecords(),
ChatDatas: liveRoom.ChatRecords(),
ReadyPlayerInfoList: liveRoom.GetReadyPlayerInfoList(msg.Uid),
}
@ -231,7 +231,7 @@ func init() {
liveRoom, _ := model2.RoomMgr.GetLiveRoomByRoomId(msg.RoomId)
if liveRoom != nil {
errCode := int32(serverproto.ErrorCode_ERROR_OK)
liveRoom.SendGift(msg.Uid, msg.GiftId)
errCode = liveRoom.SendGift(msg.Uid, msg.GiftId)
ackMsg := &serverproto.SCLiveRoomSendGiftAck{
Uid: msg.Uid,
RoomId: msg.RoomId,
@ -242,6 +242,20 @@ func init() {
}
})
serverproto.Handle_FRUIT_CSLiveRoomGiftRankReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.CSLiveRoomGiftRankReq)
util.InfoF("receive CSLiveRoomGiftRankReq msg:%v", msg)
liveRoom, _ := model2.RoomMgr.GetLiveRoomByRoomId(msg.RoomId)
if liveRoom != nil {
ackMsg := &serverproto.SCLiveRoomGiftRankAck{
Uid: msg.Uid,
RoomId: msg.RoomId,
GiftRank: liveRoom.GiftRank(),
}
model.ServiceReplay(ev, ackMsg)
}
})
serverproto.Handle_FRUIT_CSLiveRoomShowSubmitReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.CSLiveRoomShowSubmitReq)
util.InfoF("receive CSLiveRoomSubmitReq msg:%v", msg)
@ -249,7 +263,7 @@ func init() {
if liveRoom != nil {
errCode := int32(serverproto.ErrorCode_ERROR_OK)
submitResult := liveRoom.ShowSubmit(msg.Uid, msg.SubmitData)
if submitResult != nil {
if submitResult == nil {
errCode = int32(serverproto.ErrorCode_ERROR_FAIL)
}
ackMsg := &serverproto.SCLiveRoomShowSubmitAck{

View File

@ -907,6 +907,11 @@ func (this *Role) SetCreateData(msg *serverproto.CSCreateRoleReq) {
this.base.roleBase.Sex = msg.Sex
this.base.roleBase.Country = msg.Country
if msg.UseUserInput {
this.base.roleBase.NickName = msg.Nickname
this.base.roleBase.RoleData.HeadId = msg.HeadId
}
//JobId
this.base.roleBase.RoleData.HeroData.ConfigId = msg.JobId
@ -2088,7 +2093,7 @@ func (this *Role) SetRoleStory(story *serverproto.KeyValueType) {
preStoryVal := this.GetRoleBase().GetStoryVal(storyId)
newStoryVal := preStoryVal | (1 << uint32(storyStoreType))
if newStoryVal == preStoryVal {
util.InfoF("SetRoleStory: reward has been got, storyId=%d storyRewardId=%d ", storyId, storyRewardId)
util.InfoF("SetRoleStory: reward has been got, storyId=%d storyRewardId=%d preStoryVal=%d", storyId, storyRewardId, preStoryVal)
return
}
util.InfoF("SetRoleStory: storyId=%d storyBitVal=%d, preStoryVal=%d, storyVal=%d", storyId, storyStoreType, preStoryVal, newStoryVal)
@ -3614,10 +3619,11 @@ func (this *Role) GetRoleVipLevel() int32 {
}
func (this *Role) GetHeadId() int32 {
if this.roleHead != nil {
return this.roleHead.GetHeadIdIng()
}
return 0
//if this.roleHead != nil {
// return this.roleHead.GetHeadIdIng()
//}
//return 0
return this.GetRoleBase().roleBase.RoleData.HeadId
}
func (this *Role) GetHeadMag() *RoleHead {

View File

@ -103,6 +103,7 @@ const (
AddFrom_StoryChat
AddFrom_LiveRoom_Card
AddFrom_LiveRoom_Answer
AddFrom_LiveRoom_Gift
)
type RoleBag struct {

View File

@ -308,9 +308,9 @@ func (this *RoleBattle) Load(msg interface{}) bool {
this.incomeTime = proRole.RoleBattle.LastIncomeTime
this.fruitIncomeRewardPoint = proRole.RoleBattle.FruitIncomeRewardPoint
if this.incomeTime <= 0 {
//创建新号后默认赠送1次挂机宝箱计数 送4分钟
//创建新号后默认赠送1次挂机宝箱计数 送4分钟 x 2
globalIncomeTime := uint64(model.GlobalIncomeTime) * 1000
this.incomeTime = this.role.RegisterTime - globalIncomeTime
this.incomeTime = this.role.RegisterTime - globalIncomeTime*2
globalData, ok := serverproto.GlobalCfgLoader[int32(serverproto.GlobalType_Global_Battle_Limit_Time)]
if ok {

View File

@ -152,7 +152,7 @@ func (this *Role) createRole() int32 {
Id: this.uuid,
Coin: 0, //默认值通过配置表处理
Rmb: 0,
NickName: "",
NickName: this.base.roleBase.NickName,
Sex: data.Sex,
Country: data.Country,
@ -172,6 +172,7 @@ func (this *Role) createRole() int32 {
HeroId: 1,
},
},
HeadId: this.base.roleBase.RoleData.HeadId,
},
FashionData: data.FashionData,
}
@ -243,11 +244,11 @@ func (this *Role) createDbRoleSuccess() int32 {
return ROLE_STATE_SELECT_ROLE
}
func (this *Role)WriteMiaojuCreateRoleLog(regTime uint64) {
func (this *Role) WriteMiaojuCreateRoleLog(regTime uint64) {
//写妙聚日志。
createRoleLog := &MiaojuLogCreateRole{
Properties: CreateRole{
PkgName: "",
PkgName: "",
},
}
createRoleLog.UUID = ""
@ -265,7 +266,7 @@ func (this *Role)WriteMiaojuCreateRoleLog(regTime uint64) {
createRoleLog.Properties.RoleName = this.GetNickName()
createRoleLog.Properties.RoleLevel = int(this.GetRoleLevel())
createRoleLog.Properties.VIPLevel = int(this.GetRoleVipLevel())
createRoleLog.Properties.RegisterCountry = ""
createRoleLog.Properties.RegisterCountry = ""
createRoleLog.Properties.CurTime = time.Unix(int64(util.GetTimeSeconds()), 0).Format(util.DATE_FORMAT)
createRoleLog.Properties.RegistTime = time.Unix(int64(regTime/1000), 0).Format(util.DATE_FORMAT)

View File

@ -303,9 +303,29 @@ func init() {
}
role.ReplayGate(msg, true)
})
serverproto.Handle_GAME_SCLiveRoomGiftRankNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCLiveRoomGiftRankNtf)
util.InfoF("uid=%v receive SCLiveRoomGiftRankNtf msg=%v", msg.Uid, msg)
serverproto.Handle_GAME_SCLiveRoomSendGiftNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCLiveRoomSendGiftNtf)
util.InfoF("uid=%v receive SCLiveRoomSendGiftNtf msg=%v", msg.Uid, msg)
role := model2.RoleMag.GetRoleFromUUid(msg.Uid)
if role == nil {
return
}
role.ReplayGate(msg, true)
})
serverproto.Handle_GAME_CSLiveRoomGiftRankReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.CSLiveRoomGiftRankReq)
role := model2.RoleMag.GetRoleOrKick(cliId, ev)
if role == nil {
return
}
util.InfoF("uid=%v receive CSLiveRoomGiftRankReq msg=%v", role.GetUUid(), msg)
msg.Uid = role.GetUUid()
role.(*model2.Role).SendAllFruit(msg)
})
serverproto.Handle_GAME_SCLiveRoomGiftRankAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCLiveRoomGiftRankAck)
util.InfoF("uid=%v receive SCLiveRoomGiftRankAck msg=%v", msg.Uid, msg)
role := model2.RoleMag.GetRoleFromUUid(msg.Uid)
if role == nil {
return
@ -361,6 +381,15 @@ func init() {
}
role.ReplayGate(msg, true)
})
serverproto.Handle_GAME_SCLiveRoomShowDataNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCLiveRoomShowDataNtf)
util.InfoF("uid=%v receive SCLiveRoomShowDataNtf msg=%v", msg.Uid, msg)
role := model2.RoleMag.GetRoleFromUUid(msg.Uid)
if role == nil {
return
}
role.ReplayGate(msg, true)
})
serverproto.Handle_GAME_SCLiveRoomCMDTalkNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
msg := ev.Msg().(*serverproto.SCLiveRoomCMDTalkNtf)

View File

@ -7,6 +7,7 @@ import (
"roserver/baseserver/model"
model2 "roserver/game/model"
"roserver/serverproto"
"unicode/utf8"
)
func init() {
@ -343,6 +344,37 @@ func init() {
}
}
if msg.UseUserInput {
nameLen := utf8.RuneCountInString(msg.Nickname)
globalCfg, ok := serverproto.GlobalCfgLoader[int32(serverproto.GlobalType_Global_Max_Name_Len)]
if !ok || globalCfg == nil {
retErr := int32(serverproto.ErrorCode_ERROR_RENAME_NAME_LEN_ERROR)
ackMsg := &serverproto.SCCreateRoleAck{
Error: retErr,
}
role.ReplayGate(ackMsg, true)
util.ErrorF("CSCreateRoleReq activeCode err=%v activeCode=%v openId=%v", retErr, msg.ActiveCode, msg.OpenId)
return
}
if nameLen <= 0 || nameLen > int(globalCfg.IVal) || msg.Nickname == role.(*model2.Role).GetRoleBase().GetRoleName() {
retErr := int32(serverproto.ErrorCode_ERROR_RENAME_NAME_LEN_ERROR)
ackMsg := &serverproto.SCCreateRoleAck{
Error: retErr,
}
role.ReplayGate(ackMsg, true)
util.ErrorF("CSCreateRoleReq activeCode err=%v activeCode=%v openId=%v", retErr, msg.ActiveCode, msg.OpenId)
return
}
//屏蔽字过滤
if model2.SensitiveUtil.IsMatch(msg.Nickname) {
ackMsg := &serverproto.SCCreateRoleAck{
Error: int32(serverproto.ErrorCode_ERROR_RENAME_NAME_INVALID),
}
role.ReplayGate(ackMsg, true)
return
}
}
//创建角色
role.SetCreateData(msg)
role.SwitchState(model2.ROLE_STATE_CREATE, nil)

View File

@ -84,6 +84,7 @@ const (
CFG_LineMissionCfg = "LineMissionCfg.csv"
CFG_LiveRoomBidCfg = "LiveRoomBidCfg.csv"
CFG_LiveRoomCfg = "LiveRoomCfg.csv"
CFG_LiveRoomGiftCfg = "LiveRoomGiftCfg.csv"
CFG_LiveRoomQuestionCfg = "LiveRoomQuestionCfg.csv"
CFG_LiveRoomSellCfg = "LiveRoomSellCfg.csv"
CFG_LiveRoomTalkCfg = "LiveRoomTalkCfg.csv"
@ -240,6 +241,7 @@ func configNameListInit(){
CFGNameList["LineMissionCfg"] = LineMissionCfgLoad
CFGNameList["LiveRoomBidCfg"] = LiveRoomBidCfgLoad
CFGNameList["LiveRoomCfg"] = LiveRoomCfgLoad
CFGNameList["LiveRoomGiftCfg"] = LiveRoomGiftCfgLoad
CFGNameList["LiveRoomQuestionCfg"] = LiveRoomQuestionCfgLoad
CFGNameList["LiveRoomSellCfg"] = LiveRoomSellCfgLoad
CFGNameList["LiveRoomTalkCfg"] = LiveRoomTalkCfgLoad
@ -429,6 +431,7 @@ func ConfigInit(path string) {
LineMissionCfgLoad(path)
LiveRoomBidCfgLoad(path)
LiveRoomCfgLoad(path)
LiveRoomGiftCfgLoad(path)
LiveRoomQuestionCfgLoad(path)
LiveRoomSellCfgLoad(path)
LiveRoomTalkCfgLoad(path)
@ -2167,6 +2170,8 @@ type LiveRoomCfg struct{
Type int32 `csv:"Type"` //房间类型:1-抽卡,2-带货,3-答题,4-游戏
Streamer string `csv:"Streamer"` //主播名字
StreamerHead string `csv:"StreamerHead"` //主播头像
StreamerScale float32 `csv:"StreamerScale"` //主播模型缩放
StreamerOffset []string `csv:"StreamerOffset"` //主播模型离底距离
RoomDesp string `csv:"RoomDesp"` //房间描述
ReadyPadHeight int32 `csv:"ReadyPadHeight"` //准备面板高度
ReadyPadOffset int32 `csv:"ReadyPadOffset"` //准备面板离底距离
@ -2189,6 +2194,24 @@ func LiveRoomCfgLoad(path string) {
}
}
var LiveRoomGiftCfgLoader map[int32]*LiveRoomGiftCfg
type LiveRoomGiftCfg struct{
Id int32 `csv:"Id"` //礼物ID
Name string `csv:"Name"` //名称
Icon string `csv:"Icon"` //图标
Price string `csv:"Price"` //价格
RewardItems string `csv:"RewardItems"` //奖励物品(绿色1-3阶装备:比重, 蓝色1-3阶装备:比重, 紫色1-3阶装备:比重)
GiftPoint int32 `csv:"GiftPoint"` //礼物贡献点数
}
func LiveRoomGiftCfgLoad(path string) {
cfg := []*LiveRoomGiftCfg{}
LiveRoomGiftCfgLoader = map[int32]*LiveRoomGiftCfg{}
loadCsvCfg(path + "LiveRoomGiftCfg.csv", &cfg)
for _,row := range cfg{
LiveRoomGiftCfgLoader[row.Id] = row
}
}
var LiveRoomQuestionCfgLoader map[int32]*LiveRoomQuestionCfg
type LiveRoomQuestionCfg struct{
Id int32 `csv:"Id"` //序号

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,9 @@ message CSCreateRoleReq { //project game //RouteRule game
int32 head = 7; //
int32 hair_avatar = 8; //
string active_code = 9; //
bool use_user_input = 10;
int32 head_id = 11; // ID
string nickname = 12; //
}
message SCCreateRoleAck {
@ -3889,7 +3892,7 @@ message SCLiveRoomJoinAck { //project game|fruit //RouteRule game
uint32 stage_timer_sec = 6;
uint32 stage_sec = 7;
bool is_ready = 8;
repeated LiveRoomPlayerInfo gift_rank = 9;
repeated LiveRoomPlayerInfo gift_records = 9;
repeated LiveRoomChatData chat_datas = 10;
repeated LiveRoomPlayerInfo ready_player_info_list = 11;
}
@ -3929,9 +3932,19 @@ message SCLiveRoomSendGiftAck { //project game|fruit //RouteRule game
uint32 room_id = 3;
uint32 gift_id = 4;
}
message SCLiveRoomGiftRankNtf { //project game|fruit //RouteRule game
message SCLiveRoomSendGiftNtf { //project game|fruit //RouteRule game
uint64 uid = 1;
repeated LiveRoomPlayerInfo gift_rank = 2;
uint32 room_id = 2;
LiveRoomPlayerInfo send_gift_info = 3;
}
message CSLiveRoomGiftRankReq { //project game|fruit //RouteRule game
uint64 uid = 1;
uint32 room_id = 2;
}
message SCLiveRoomGiftRankAck { //project game|fruit //RouteRule game
uint64 uid = 1;
uint32 room_id = 2;
repeated LiveRoomPlayerInfo gift_rank = 3;
}
message SCLiveRoomCMDTalkNtf { //project game|fruit //RouteRule game
uint64 uid = 1;

File diff suppressed because it is too large Load Diff

View File

@ -758,7 +758,6 @@ enum protoMsgId{
SC_LIVE_ROOM_TIMER_NTF = 1776; // SCLiveRoomTimerNtf **SCLiveRoomTimerNtf **login.proto **game,fruit [SCLiveRoomTimerNtf]
CS_LIVE_ROOM_SEND_GIFT_REQ = 1777; // CSLiveRoomSendGiftReq **CSLiveRoomSendGiftReq **login.proto **game,fruit [CSLiveRoomSendGiftReq]
SC_LIVE_ROOM_SEND_GIFT_ACK = 1778; // SCLiveRoomSendGiftAck **SCLiveRoomSendGiftAck **login.proto **game,fruit [SCLiveRoomSendGiftAck]
SC_LIVE_ROOM_GIFT_RANK_NTF = 1779; // SCLiveRoomGiftRankNtf **SCLiveRoomGiftRankNtf **login.proto **game,fruit [SCLiveRoomGiftRankNtf]
CS_LIVE_ROOM_GET_READY_REQ = 1783; // CSLiveRoomGetReadyReq **CSLiveRoomGetReadyReq **login.proto **game,fruit [CSLiveRoomGetReadyReq]
SC_LIVE_ROOM_GET_READY_ACK = 1784; // SCLiveRoomGetReadyAck **SCLiveRoomGetReadyAck **login.proto **game,fruit [SCLiveRoomGetReadyAck]
SC_LIVE_ROOM_GET_READY_NTF = 1785; // SCLiveRoomGetReadyNtf **SCLiveRoomGetReadyNtf **login.proto **game,fruit [SCLiveRoomGetReadyNtf]
@ -769,6 +768,9 @@ enum protoMsgId{
SC_LIVE_ROOM_SHOW_SUBMIT_ACK = 1797; // SCLiveRoomShowSubmitAck **SCLiveRoomShowSubmitAck **login.proto **game,fruit [SCLiveRoomShowSubmitAck]
SC_LIVE_ROOM_SHOW_DATA_NTF = 1798; // SCLiveRoomShowDataNtf **SCLiveRoomShowDataNtf **login.proto **game,fruit [SCLiveRoomShowDataNtf]
SC_LIVE_ROOM_RESULT_NTF = 1799; // SCLiveRoomResultNtf **SCLiveRoomResultNtf **login.proto **game,fruit [SCLiveRoomResultNtf]
SC_LIVE_ROOM_SEND_GIFT_NTF = 1800; // SCLiveRoomSendGiftNtf **SCLiveRoomSendGiftNtf **login.proto **game,fruit [SCLiveRoomSendGiftNtf]
SC_LIVE_ROOM_GIFT_RANK_ACK = 1802; // SCLiveRoomGiftRankAck **SCLiveRoomGiftRankAck **login.proto **game,fruit [SCLiveRoomGiftRankAck]
CS_LIVE_ROOM_GIFT_RANK_REQ = 1803; // CSLiveRoomGiftRankReq **CSLiveRoomGiftRankReq **login.proto **game,fruit [CSLiveRoomGiftRankReq]
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

@ -736,7 +736,6 @@ enum protoMsgId{
SC_LIVE_ROOM_TIMER_NTF = 1776; // SCLiveRoomTimerNtf **SCLiveRoomTimerNtf **login.proto **game,fruit [SCLiveRoomTimerNtf]
CS_LIVE_ROOM_SEND_GIFT_REQ = 1777; // CSLiveRoomSendGiftReq **CSLiveRoomSendGiftReq **login.proto **game,fruit [CSLiveRoomSendGiftReq]
SC_LIVE_ROOM_SEND_GIFT_ACK = 1778; // SCLiveRoomSendGiftAck **SCLiveRoomSendGiftAck **login.proto **game,fruit [SCLiveRoomSendGiftAck]
SC_LIVE_ROOM_GIFT_RANK_NTF = 1779; // SCLiveRoomGiftRankNtf **SCLiveRoomGiftRankNtf **login.proto **game,fruit [SCLiveRoomGiftRankNtf]
CS_LIVE_ROOM_GET_READY_REQ = 1783; // CSLiveRoomGetReadyReq **CSLiveRoomGetReadyReq **login.proto **game,fruit [CSLiveRoomGetReadyReq]
SC_LIVE_ROOM_GET_READY_ACK = 1784; // SCLiveRoomGetReadyAck **SCLiveRoomGetReadyAck **login.proto **game,fruit [SCLiveRoomGetReadyAck]
SC_LIVE_ROOM_GET_READY_NTF = 1785; // SCLiveRoomGetReadyNtf **SCLiveRoomGetReadyNtf **login.proto **game,fruit [SCLiveRoomGetReadyNtf]
@ -747,5 +746,8 @@ enum protoMsgId{
SC_LIVE_ROOM_SHOW_SUBMIT_ACK = 1797; // SCLiveRoomShowSubmitAck **SCLiveRoomShowSubmitAck **login.proto **game,fruit [SCLiveRoomShowSubmitAck]
SC_LIVE_ROOM_SHOW_DATA_NTF = 1798; // SCLiveRoomShowDataNtf **SCLiveRoomShowDataNtf **login.proto **game,fruit [SCLiveRoomShowDataNtf]
SC_LIVE_ROOM_RESULT_NTF = 1799; // SCLiveRoomResultNtf **SCLiveRoomResultNtf **login.proto **game,fruit [SCLiveRoomResultNtf]
SC_LIVE_ROOM_SEND_GIFT_NTF = 1800; // SCLiveRoomSendGiftNtf **SCLiveRoomSendGiftNtf **login.proto **game,fruit [SCLiveRoomSendGiftNtf]
SC_LIVE_ROOM_GIFT_RANK_ACK = 1802; // SCLiveRoomGiftRankAck **SCLiveRoomGiftRankAck **login.proto **game,fruit [SCLiveRoomGiftRankAck]
CS_LIVE_ROOM_GIFT_RANK_REQ = 1803; // CSLiveRoomGiftRankReq **CSLiveRoomGiftRankReq **login.proto **game,fruit [CSLiveRoomGiftRankReq]
}

View File

@ -185,7 +185,6 @@ var(
Handle_FRUIT_SCLiveRoomTimerNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomTimerNtf not implements")}
Handle_FRUIT_CSLiveRoomSendGiftReq =func(e rocommon.ProcEvent){panic("CSLiveRoomSendGiftReq not implements")}
Handle_FRUIT_SCLiveRoomSendGiftAck =func(e rocommon.ProcEvent){panic("SCLiveRoomSendGiftAck not implements")}
Handle_FRUIT_SCLiveRoomGiftRankNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomGiftRankNtf not implements")}
Handle_FRUIT_CSLiveRoomGetReadyReq =func(e rocommon.ProcEvent){panic("CSLiveRoomGetReadyReq not implements")}
Handle_FRUIT_SCLiveRoomGetReadyAck =func(e rocommon.ProcEvent){panic("SCLiveRoomGetReadyAck not implements")}
Handle_FRUIT_SCLiveRoomGetReadyNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomGetReadyNtf not implements")}
@ -196,6 +195,9 @@ var(
Handle_FRUIT_SCLiveRoomShowSubmitAck =func(e rocommon.ProcEvent){panic("SCLiveRoomShowSubmitAck not implements")}
Handle_FRUIT_SCLiveRoomShowDataNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomShowDataNtf not implements")}
Handle_FRUIT_SCLiveRoomResultNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomResultNtf not implements")}
Handle_FRUIT_SCLiveRoomSendGiftNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomSendGiftNtf not implements")}
Handle_FRUIT_SCLiveRoomGiftRankAck =func(e rocommon.ProcEvent){panic("SCLiveRoomGiftRankAck not implements")}
Handle_FRUIT_CSLiveRoomGiftRankReq =func(e rocommon.ProcEvent){panic("CSLiveRoomGiftRankReq 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_SSGameRoleAddItemListAck =func(e rocommon.ProcEvent){panic("SSGameRoleAddItemListAck not implements")}
@ -605,7 +607,6 @@ var(
Handle_GAME_SCLiveRoomTimerNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomTimerNtf not implements")}
Handle_GAME_CSLiveRoomSendGiftReq =func(e rocommon.ProcEvent){panic("CSLiveRoomSendGiftReq not implements")}
Handle_GAME_SCLiveRoomSendGiftAck =func(e rocommon.ProcEvent){panic("SCLiveRoomSendGiftAck not implements")}
Handle_GAME_SCLiveRoomGiftRankNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomGiftRankNtf not implements")}
Handle_GAME_CSLiveRoomGetReadyReq =func(e rocommon.ProcEvent){panic("CSLiveRoomGetReadyReq not implements")}
Handle_GAME_SCLiveRoomGetReadyAck =func(e rocommon.ProcEvent){panic("SCLiveRoomGetReadyAck not implements")}
Handle_GAME_SCLiveRoomGetReadyNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomGetReadyNtf not implements")}
@ -616,6 +617,9 @@ var(
Handle_GAME_SCLiveRoomShowSubmitAck =func(e rocommon.ProcEvent){panic("SCLiveRoomShowSubmitAck not implements")}
Handle_GAME_SCLiveRoomShowDataNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomShowDataNtf not implements")}
Handle_GAME_SCLiveRoomResultNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomResultNtf not implements")}
Handle_GAME_SCLiveRoomSendGiftNtf =func(e rocommon.ProcEvent){panic("SCLiveRoomSendGiftNtf not implements")}
Handle_GAME_SCLiveRoomGiftRankAck =func(e rocommon.ProcEvent){panic("SCLiveRoomGiftRankAck not implements")}
Handle_GAME_CSLiveRoomGiftRankReq =func(e rocommon.ProcEvent){panic("CSLiveRoomGiftRankReq 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")}
@ -1207,7 +1211,6 @@ func GetMessageHandler(sreviceName string) rocommon.EventCallBack {
case *SCLiveRoomTimerNtf: Handle_FRUIT_SCLiveRoomTimerNtf(e)
case *CSLiveRoomSendGiftReq: Handle_FRUIT_CSLiveRoomSendGiftReq(e)
case *SCLiveRoomSendGiftAck: Handle_FRUIT_SCLiveRoomSendGiftAck(e)
case *SCLiveRoomGiftRankNtf: Handle_FRUIT_SCLiveRoomGiftRankNtf(e)
case *CSLiveRoomGetReadyReq: Handle_FRUIT_CSLiveRoomGetReadyReq(e)
case *SCLiveRoomGetReadyAck: Handle_FRUIT_SCLiveRoomGetReadyAck(e)
case *SCLiveRoomGetReadyNtf: Handle_FRUIT_SCLiveRoomGetReadyNtf(e)
@ -1218,6 +1221,9 @@ func GetMessageHandler(sreviceName string) rocommon.EventCallBack {
case *SCLiveRoomShowSubmitAck: Handle_FRUIT_SCLiveRoomShowSubmitAck(e)
case *SCLiveRoomShowDataNtf: Handle_FRUIT_SCLiveRoomShowDataNtf(e)
case *SCLiveRoomResultNtf: Handle_FRUIT_SCLiveRoomResultNtf(e)
case *SCLiveRoomSendGiftNtf: Handle_FRUIT_SCLiveRoomSendGiftNtf(e)
case *SCLiveRoomGiftRankAck: Handle_FRUIT_SCLiveRoomGiftRankAck(e)
case *CSLiveRoomGiftRankReq: Handle_FRUIT_CSLiveRoomGiftRankReq(e)
case *SSPlayerOnlineNtf: Handle_FRUIT_SSPlayerOnlineNtf(e)
case *SSPlayerOfflineNtf: Handle_FRUIT_SSPlayerOfflineNtf(e)
case *SSGameRoleAddItemListAck: Handle_FRUIT_SSGameRoleAddItemListAck(e)
@ -1632,7 +1638,6 @@ func GetMessageHandler(sreviceName string) rocommon.EventCallBack {
case *SCLiveRoomTimerNtf: Handle_GAME_SCLiveRoomTimerNtf(e)
case *CSLiveRoomSendGiftReq: Handle_GAME_CSLiveRoomSendGiftReq(e)
case *SCLiveRoomSendGiftAck: Handle_GAME_SCLiveRoomSendGiftAck(e)
case *SCLiveRoomGiftRankNtf: Handle_GAME_SCLiveRoomGiftRankNtf(e)
case *CSLiveRoomGetReadyReq: Handle_GAME_CSLiveRoomGetReadyReq(e)
case *SCLiveRoomGetReadyAck: Handle_GAME_SCLiveRoomGetReadyAck(e)
case *SCLiveRoomGetReadyNtf: Handle_GAME_SCLiveRoomGetReadyNtf(e)
@ -1643,6 +1648,9 @@ func GetMessageHandler(sreviceName string) rocommon.EventCallBack {
case *SCLiveRoomShowSubmitAck: Handle_GAME_SCLiveRoomShowSubmitAck(e)
case *SCLiveRoomShowDataNtf: Handle_GAME_SCLiveRoomShowDataNtf(e)
case *SCLiveRoomResultNtf: Handle_GAME_SCLiveRoomResultNtf(e)
case *SCLiveRoomSendGiftNtf: Handle_GAME_SCLiveRoomSendGiftNtf(e)
case *SCLiveRoomGiftRankAck: Handle_GAME_SCLiveRoomGiftRankAck(e)
case *CSLiveRoomGiftRankReq: Handle_GAME_CSLiveRoomGiftRankReq(e)
case *SSWebGMAddMailNtf: Handle_GAME_SSWebGMAddMailNtf(e)
case *SSWebGMBanNtf: Handle_GAME_SSWebGMBanNtf(e)
case *SSWebGMNoticeNtf: Handle_GAME_SSWebGMNoticeNtf(e)
@ -2818,7 +2826,6 @@ func init() {
registerInfo(1776, reflect.TypeOf((*SCLiveRoomTimerNtf)(nil)).Elem(), 0)
registerInfo(1777, reflect.TypeOf((*CSLiveRoomSendGiftReq)(nil)).Elem(), 0)
registerInfo(1778, reflect.TypeOf((*SCLiveRoomSendGiftAck)(nil)).Elem(), 0)
registerInfo(1779, reflect.TypeOf((*SCLiveRoomGiftRankNtf)(nil)).Elem(), 0)
registerInfo(1783, reflect.TypeOf((*CSLiveRoomGetReadyReq)(nil)).Elem(), 0)
registerInfo(1784, reflect.TypeOf((*SCLiveRoomGetReadyAck)(nil)).Elem(), 0)
registerInfo(1785, reflect.TypeOf((*SCLiveRoomGetReadyNtf)(nil)).Elem(), 0)
@ -2829,6 +2836,9 @@ func init() {
registerInfo(1797, reflect.TypeOf((*SCLiveRoomShowSubmitAck)(nil)).Elem(), 0)
registerInfo(1798, reflect.TypeOf((*SCLiveRoomShowDataNtf)(nil)).Elem(), 0)
registerInfo(1799, reflect.TypeOf((*SCLiveRoomResultNtf)(nil)).Elem(), 0)
registerInfo(1800, reflect.TypeOf((*SCLiveRoomSendGiftNtf)(nil)).Elem(), 0)
registerInfo(1802, reflect.TypeOf((*SCLiveRoomGiftRankAck)(nil)).Elem(), 0)
registerInfo(1803, reflect.TypeOf((*CSLiveRoomGiftRankReq)(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)