Compare commits

..

No commits in common. "fe3f0a185dcbd241b0ec58d6d6e419259e2c087c" and "f15ce4ef8f56b17710d2a913c107369a147b78ab" have entirely different histories.

7 changed files with 43 additions and 13 deletions

View File

@ -2,15 +2,13 @@ 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 (

7
common/sysmsg.go Normal file
View File

@ -0,0 +1,7 @@
package common
// 系统消息编号
const (
SYSMSG_BEGIN int = iota
SYSMSG_PASSHU //因过胡规则,此牌不能胡
)

30
common/temp.txt Normal file
View File

@ -0,0 +1,30 @@
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.离开金币场回兑

View File

@ -28,7 +28,6 @@ func InSameDay(tNow, tPre time.Time) bool {
}
return false
}
func InSameDayNoZero(tNow, tPre time.Time) bool {
if tNow.Day() != tPre.Day() {
@ -111,7 +110,7 @@ func DiffMonth(tNow, tPre time.Time) int {
return int(diffMonth)
}
func DelayInvoke(method func(), ud interface{}, delay time.Duration, times int) (timer.TimerHandle, bool) {
func DelayInvake(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()
@ -127,7 +126,6 @@ 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")

View File

@ -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.DelayInvoke(func() {
if hNext, ok := common.DelayInvake(func() {
sceneEx.hDestroy = timer.InvalidTimerHandle
sceneEx.SceneDestroy(true)
}, nil, time.Second*10, 1); ok {

View File

@ -1383,7 +1383,7 @@ func (this *ScenePlayerOpStateTienLen) OnPlayerOp(s *base.Scene, p *base.Player,
case rule.TienLenPlayerOpPass: //过牌
//当前操作者和上一个操作者是同一个人,必出牌,不能过牌
if int32(playerEx.GetPos()) == sceneEx.lastOpPos || sceneEx.lastOpPos == rule.InvalidePos {
if int32(playerEx.GetPos()) == sceneEx.lastOpPos || sceneEx.lastOpPos != rule.InvalidePos {
finishFunc()
return true
}

3
todo
View File

@ -8,6 +8,3 @@ dbproxy优化:
消息队列数据恢复发送:
发送失败的消息会写入本地文件等mq正常后尝试重新发送
代理业务需要重构支持worldsrv的滚动更新
dbproxy/mq/c_invite.go