diff --git a/common/sstransmit.go b/common/sstransmit.go index bd3e265..85cdf79 100644 --- a/common/sstransmit.go +++ b/common/sstransmit.go @@ -2,13 +2,15 @@ package common import ( "fmt" + rawproto "google.golang.org/protobuf/proto" - "mongo.games.com/game/proto" - "mongo.games.com/game/protocol/server" "mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/profile" "mongo.games.com/goserver/core/utils" + + "mongo.games.com/game/proto" + "mongo.games.com/game/protocol/server" ) var ( diff --git a/common/sysmsg.go b/common/sysmsg.go deleted file mode 100644 index 3024391..0000000 --- a/common/sysmsg.go +++ /dev/null @@ -1,7 +0,0 @@ -package common - -// 系统消息编号 -const ( - SYSMSG_BEGIN int = iota - SYSMSG_PASSHU //因过胡规则,此牌不能胡 -) diff --git a/common/temp.txt b/common/temp.txt deleted file mode 100644 index 67eb83b..0000000 --- a/common/temp.txt +++ /dev/null @@ -1,30 +0,0 @@ - GainWay_NewPlayer int32 = iota //0.新建角色 新建账号,系统赠送房卡%s张|新建账号,系统赠送金币%s个 remark:无 - GainWay_Pay //1.后台增加(主要是充值) %s,获得d%张房卡,剩余d%张 remark:充值X元 - GainWay_Transfer_In //2.俱乐部转移(转入) s%赠送您房卡d%张,剩余d%张 remark:玩家名称 - GainWay_AgentReturn //3.代创房间返还 - - GainWay_DrawPrize //4.领取奖励 领取奖励房卡d%张,剩余%d张 remark:无 - GainWay_Share //5.每日分享 每日分享活动,奖励d%房卡,剩余d%房卡 remark:无 - GainWay_Activty //6.活动获得 s%活动奖励d%金币,剩余d%金币 remark:活动名称 - GainWay_Game //7.玩游戏消耗 开房间房卡-d%张,剩余d%张 remark:无 - GainWay_Task //8.任务 完成%s任务,奖励房卡d%张,剩余d%张 remark:任务名称 - GainWay_ByPMCmd //9.pm命令 - - GainWay_MatchSignup //10.比赛报名 - - GainWay_MatchPlay //11.比赛回兑 - - GainWay_MatchAdd //12.比赛补充 - - GainWay_MatchBreakBack //13.退赛退还 - - GainWay_MatchSystemSupply //14.系统补给 - - GainWay_Exchange //15.兑换 兑换%s,红包%d分,剩余红包%d分 remark:房卡x张 - GainWay_Contribute //16.贡献 - - GainWay_ClubMoneySceneFee //17.俱乐部钻石场房费 - - GainWay_Transfer_Out //18.俱乐部转移(转出) 赠送给s%房卡d%张,剩余d%张 remark:玩家名称 - GainWay_ServiceFee //19.桌费 扣除桌费d%金币,剩余d%金币 remark:无 - GainWay_CoinSceneWin //20.金豆场赢取 参与游戏赢取d%金币,剩余d%金币 remark:无 - GainWay_CoinSceneLost //21.金豆场输 参与游戏输掉d%金币,剩余d%金币 remark:无 - GainWay_BindTel //22.绑定手机 绑定手机,获得房卡%d张,剩余%d张 remark:无 - GainWay_PlayerShare //23.隶属玩家每日分享 每日分享活动,领取房卡%d张,剩余%d张 remark:无 - GainWay_Invite //24.邀请玩家 邀请玩家,获得红包%d分,剩余%d分 remark:无 - GainWay_LoginSign //25.签到奖励 - GainWay_OnlineGift //26.签到奖励 - GainWay_CoinSceneEnter //27.进入金币场预扣 - GainWay_ShopBuy //28.商城购买或者兑换 使用%s,购买金币%d,剩余%d remark:房卡x张 - GainWay_CoinSceneLeave //29.离开金币场回兑 \ No newline at end of file diff --git a/common/time.go b/common/time.go index 907796b..c528189 100644 --- a/common/time.go +++ b/common/time.go @@ -28,6 +28,7 @@ func InSameDay(tNow, tPre time.Time) bool { } return false } + func InSameDayNoZero(tNow, tPre time.Time) bool { if tNow.Day() != tPre.Day() { @@ -110,7 +111,7 @@ func DiffMonth(tNow, tPre time.Time) int { return int(diffMonth) } -func DelayInvake(method func(), ud interface{}, delay time.Duration, times int) (timer.TimerHandle, bool) { +func DelayInvoke(method func(), ud interface{}, delay time.Duration, times int) (timer.TimerHandle, bool) { return timer.StartTimer(timer.TimerActionWrapper(func(h timer.TimerHandle, ud interface{}) bool { if method != nil { method() @@ -126,6 +127,7 @@ func StrTimeToTs(strTime string) int64 { } return rTime.Unix() } + func TsToStrTime(tc int64) string { //return time.Now().Format("2018-07-02 19:14:00") return time.Unix(tc, 0).Format("2006-01-02 15:04:05") diff --git a/gamesrv/fishing/scenepolicy_fishing.go b/gamesrv/fishing/scenepolicy_fishing.go index efb769a..f2a0bbe 100644 --- a/gamesrv/fishing/scenepolicy_fishing.go +++ b/gamesrv/fishing/scenepolicy_fishing.go @@ -281,7 +281,7 @@ func (this *SceneBaseStateFishing) OnPlayerOp(s *base.Scene, p *base.Player, opc // start 检测当前房间是否处于基本的关闭状态 if s.CheckNeedDestroy() { if sceneEx.hDestroy == timer.InvalidTimerHandle { - if hNext, ok := common.DelayInvake(func() { + if hNext, ok := common.DelayInvoke(func() { sceneEx.hDestroy = timer.InvalidTimerHandle sceneEx.SceneDestroy(true) }, nil, time.Second*10, 1); ok { diff --git a/todo b/todo index f93a281..05d6c20 100644 --- a/todo +++ b/todo @@ -7,4 +7,7 @@ dbproxy优化: 参考 https://go-zero.dev/ 中的goctl工具 消息队列数据恢复发送: -发送失败的消息会写入本地文件,等mq正常后尝试重新发送 \ No newline at end of file +发送失败的消息会写入本地文件,等mq正常后尝试重新发送 + +代理业务需要重构,支持worldsrv的滚动更新 +dbproxy/mq/c_invite.go \ No newline at end of file