Compare commits
No commits in common. "db8506f8b725cf1a92597bac760e03cfc8a2132f" and "a842987444f38e64432d19ebe19ac51820a2e902" have entirely different histories.
db8506f8b7
...
a842987444
|
@ -1,67 +0,0 @@
|
|||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
ProjectPath: "mongo.games.com/game"
|
||||
DeployPath: "mongo.games.com/deploy"
|
||||
|
||||
default:
|
||||
tags:
|
||||
- game-develop
|
||||
|
||||
build-job:
|
||||
stage: build
|
||||
script:
|
||||
# 拷贝到GOPATH
|
||||
- echo '拷贝到GOPATH'
|
||||
- cp -rfp ./* $GOPATH/src/$ProjectPath
|
||||
# 进入项目目录
|
||||
- cd $GOPATH/src/$ProjectPath
|
||||
# 编译
|
||||
- echo '编译'
|
||||
- go env -w GO111MODULE=off
|
||||
- |
|
||||
while IFS= read -r line
|
||||
do
|
||||
cd $line
|
||||
echo "编译 $line"
|
||||
go build -v
|
||||
cd ..
|
||||
done < shell/programs.txt
|
||||
|
||||
deploy-job:
|
||||
stage: deploy
|
||||
script:
|
||||
# 拷贝data目录
|
||||
- echo '拷贝data目录'
|
||||
- cd $GOPATH/src/$ProjectPath
|
||||
- cp -rfvp data/* $GOPATH/src/$DeployPath/data
|
||||
|
||||
# 删除自定义配置
|
||||
- echo '删除自定义配置'
|
||||
- |
|
||||
while IFS= read -r line
|
||||
do
|
||||
echo "删除 $line 配置"
|
||||
rm $GOPATH/src/$DeployPath/data/$line
|
||||
done < shell/exclude.txt
|
||||
|
||||
# 拷贝可执行程序
|
||||
- echo '拷贝可执行程序'
|
||||
- |
|
||||
while IFS= read -r line
|
||||
do
|
||||
echo "拷贝 $line"
|
||||
cp -rf $line/$line $GOPATH/src/$DeployPath/
|
||||
echo "删除 $line"
|
||||
rm -rf $line/$line
|
||||
done < shell/programs.txt
|
||||
|
||||
# 提交代码
|
||||
- echo '提交代码'
|
||||
- cd $GOPATH/src/$DeployPath
|
||||
- git add .
|
||||
- git commit -m "auto commit pipelineId: $CI_PIPELINE_ID"
|
||||
- git push origin develop
|
||||
|
|
@ -320,7 +320,6 @@ const (
|
|||
GainWayClawdollCatch = 112 // 娃娃机抓取到娃娃获取卡
|
||||
GainWayItemBagChangeDollRevocation = 113 //娃娃兑换后台撤销
|
||||
GainWayPermitReset = 114 //赛季通行证积分重置
|
||||
GainWayClientUpgrade = 115 //客户端升级奖励
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
|
|
@ -39,7 +39,6 @@ const (
|
|||
MSGTYPE_RANK_REWARD //排行榜奖励
|
||||
MSGTYPE_ITEM_CHANGE //背包使用兑换
|
||||
MSGTYPE_RANK_PermitReward // 通行证排行奖励
|
||||
MSGTYPE_ClientUpgrade // 客户端升级
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -108,12 +108,10 @@ const (
|
|||
SystemFreeGive_PhoneLotterySwap // 手机积分兑换奖励
|
||||
SystemFreeGive_CollectBox // 开启卡片礼盒奖励
|
||||
SystemFreeGive_CollectBoxSwap // 卡片礼盒兑换奖励
|
||||
SystemFreeGive_ClientUpgrade // 客户端升级奖励
|
||||
)
|
||||
const (
|
||||
SystemFreeGive_CoinType_Coin int32 = iota //金币
|
||||
SystemFreeGive_CoinType_Diamond //钻石
|
||||
SystemFreeGive_CoinType_Tiem // 道具
|
||||
)
|
||||
|
||||
type PlayerGameCtrlData struct {
|
||||
|
|
|
@ -20,20 +20,6 @@ func GenerateLogin(o *PlayerLoginEvent) *mq.RabbitMQData {
|
|||
return NewRabbitMQData(mq.BackLogin, o)
|
||||
}
|
||||
|
||||
type SystemFreeGive struct {
|
||||
Snid int32 `json:"snid,omitempty"`
|
||||
Channel string `json:"Channel,omitempty"`
|
||||
AppChannel string `json:"AppChannel,omitempty"`
|
||||
ChannelId string `json:"ChannelId,omitempty"`
|
||||
Platform string `json:"platform,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
GiveWay int32 `json:"givetype,omitempty"`
|
||||
GiveType int32 `json:"cointype,omitempty"`
|
||||
Count int64 `json:"count,omitempty"`
|
||||
Ts int64 `json:"ts,omitempty"`
|
||||
ItemId int32 `json:"itemid,omitempty"`
|
||||
}
|
||||
|
||||
// GenerateSystemFreeGive 系统免费赠送
|
||||
func GenerateSystemFreeGive(snid int32, name, platform, channel string, givetype, cointype int32, count int64) *mq.RabbitMQData {
|
||||
params := make(map[string]string)
|
||||
|
|
|
@ -236,7 +236,7 @@ func init() {
|
|||
netlib.RegisterHandler(int(serverproto.SSPacketID_PACKET_GW_SCENESTART), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
logger.Logger.Trace("receive SSPacketID_PACKET_GW_SCENESTART GWSceneStart:", pack)
|
||||
if msg, ok := pack.(*serverproto.GWSceneStart); ok {
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()), true)
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()))
|
||||
if scene != nil {
|
||||
scene.starting = msg.GetStart()
|
||||
scene.currRound = msg.GetCurrRound()
|
||||
|
@ -264,7 +264,7 @@ func init() {
|
|||
netlib.RegisterHandler(int(serverproto.SSPacketID_PACKET_GW_SCENESTATE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
logger.Logger.Trace("receive SSPacketID_PACKET_GW_SCENESTATE GWSceneState:", pack)
|
||||
if msg, ok := pack.(*serverproto.GWSceneState); ok {
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()), true)
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()))
|
||||
if scene != nil {
|
||||
scene.sp.OnSceneState(scene, int(msg.GetRoomState()))
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ func init() {
|
|||
netlib.RegisterHandler(int(serverproto.SSPacketID_PACKET_GW_PLAYERFORCELEAVE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
if msg, ok := pack.(*serverproto.GWPlayerForceLeave); ok {
|
||||
logger.Logger.Warn("receive GWPlayerForceLeave:", msg)
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()), true)
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()))
|
||||
if scene != nil {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(msg.GetPlayerId())
|
||||
if p != nil {
|
||||
|
@ -384,7 +384,7 @@ func init() {
|
|||
netlib.RegisterHandler(int(serverproto.SSPacketID_PACKET_GW_PLAYERDATA), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
logger.Logger.Trace("receive GWPlayerBet:", pack)
|
||||
if msg, ok := pack.(*serverproto.GWPlayerData); ok {
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetSceneId()), true)
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetSceneId()))
|
||||
if scene == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ func AddMailClientUpgrade(snid int32, items []*webapi.ItemInfo) {
|
|||
content := i18n.Tr("languages", "Upgrade")
|
||||
|
||||
AddMail(&AddMailParam{
|
||||
Tp: model.MSGTYPE_ClientUpgrade,
|
||||
Tp: model.MSGTYPE_ITEM,
|
||||
SnId: snid,
|
||||
Title: title,
|
||||
Content: content,
|
||||
|
|
|
@ -175,7 +175,7 @@ func (m *CoinSceneMgr) PlayerLeave(p *Player, reason int) bool {
|
|||
// 游戏服解散房间消息触发
|
||||
// sceneId 房间id
|
||||
func (m *CoinSceneMgr) OnDestroyScene(sceneId int) {
|
||||
if s := SceneMgrSingleton.GetScene(sceneId, true); s != nil && s.csp != nil {
|
||||
if s := SceneMgrSingleton.GetScene(sceneId); s != nil && s.csp != nil {
|
||||
s.csp.onDestroyScene(sceneId)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ func (this *HundredSceneMgr) PlayerTryLeave(p *Player) gamehallproto.OpResultCod
|
|||
|
||||
// OnDestroyScene 房间销毁
|
||||
func (this *HundredSceneMgr) OnDestroyScene(sceneId int) {
|
||||
s := SceneMgrSingleton.GetScene(sceneId, true)
|
||||
s := SceneMgrSingleton.GetScene(sceneId)
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ func (this *HundredSceneMgr) OnPlatformDestroyByGameFreeId(p *Platform, gameFree
|
|||
}
|
||||
|
||||
func init() {
|
||||
module.RegisteModule(HundredSceneMgrSingleton, time.Hour, 0)
|
||||
module.RegisteModule(HundredSceneMgrSingleton, time.Second*5, 0)
|
||||
PlatformMgrSingleton.RegisterObserver(HundredSceneMgrSingleton)
|
||||
PlatformGameGroupMgrSington.RegisteObserver(HundredSceneMgrSingleton)
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ func init() {
|
|||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.BackClientLog, Data: &model.ClientLogMysql{}})
|
||||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.BackSystemJyb, Data: &model.JybLog{}})
|
||||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.DBVipGiftLog, Data: &model.DbVip{}})
|
||||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.BackSystemFreeGive, Data: &model.SystemFreeGive{}})
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -1110,27 +1110,17 @@ func (this *Player) GetMessageAttach(id string) {
|
|||
ItemNum: msg.Params[i+1], // 数量
|
||||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
|
||||
if gainWay == common.GainWayItemPermitRank {
|
||||
tp := int32(-1)
|
||||
switch msg.Params[i] {
|
||||
case common.ItemIDCoin:
|
||||
if msg.Params[i] == common.ItemIDCoin {
|
||||
tp = model.SystemFreeGive_CoinType_Coin
|
||||
case common.ItemIDDiamond:
|
||||
} else if msg.Params[i] == common.ItemIDDiamond {
|
||||
tp = model.SystemFreeGive_CoinType_Diamond
|
||||
default:
|
||||
tp = model.SystemFreeGive_CoinType_Tiem
|
||||
}
|
||||
|
||||
if tp != -1 {
|
||||
giveType := gainWay
|
||||
switch gainWay {
|
||||
case common.GainWayItemPermitRank:
|
||||
giveType = model.SystemFreeGive_GiveType_TaskPermitRank
|
||||
case common.GainWayClientUpgrade:
|
||||
giveType = model.SystemFreeGive_ClientUpgrade
|
||||
}
|
||||
mq.Write(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel,
|
||||
giveType, tp, msg.Params[i+1]))
|
||||
model.SystemFreeGive_GiveType_TaskPermitRank, tp, msg.Params[i+1]))
|
||||
}
|
||||
}
|
||||
}
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
|
@ -1206,10 +1196,6 @@ func (this *Player) GetMessageAttach(id string) {
|
|||
remark = "通行证排行奖励"
|
||||
gainWay = common.GainWayItemPermitRank
|
||||
addItem()
|
||||
case model.MSGTYPE_ClientUpgrade:
|
||||
remark = "客户端升级奖励"
|
||||
gainWay = common.GainWayClientUpgrade
|
||||
addItem()
|
||||
}
|
||||
if msg.Coin > 0 {
|
||||
this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark)
|
||||
|
|
|
@ -94,7 +94,7 @@ func (m *SceneMgr) GenPassword() string {
|
|||
}
|
||||
|
||||
func (m *SceneMgr) GetPlatformBySceneId(sceneId int) string {
|
||||
s := m.GetScene(sceneId, true)
|
||||
s := m.GetScene(sceneId)
|
||||
if s != nil && s.platform != nil {
|
||||
return s.platform.IdStr
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue