Compare commits

..

No commits in common. "368a6e29a5f33e490a318e98b3c2fed9d837a37f" and "c65bf7958fce8b826731bfd4de59ef3a52d566e9" have entirely different histories.

8 changed files with 16 additions and 94 deletions

View File

@ -3,8 +3,7 @@ stages:
- deploy - deploy
variables: variables:
ProjectPath: "mongo.games.com/game" GIT_DEPTH: 0
DeployPath: "mongo.games.com/deploy"
default: default:
tags: tags:
@ -13,55 +12,11 @@ default:
build-job: build-job:
stage: build stage: build
script: script:
# 拷贝到GOPATH - echo "Compiling the code..."
- echo '拷贝到GOPATH' - echo "Compile complete."
- cp -rfvp ./* $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: deploy-job:
stage: deploy stage: deploy
script: script:
# 拷贝data目录 - echo "Deploying application..."
- echo '拷贝data目录' - echo "Application successfully deployed."
- 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

View File

@ -320,7 +320,6 @@ const (
GainWayClawdollCatch = 112 // 娃娃机抓取到娃娃获取卡 GainWayClawdollCatch = 112 // 娃娃机抓取到娃娃获取卡
GainWayItemBagChangeDollRevocation = 113 //娃娃兑换后台撤销 GainWayItemBagChangeDollRevocation = 113 //娃娃兑换后台撤销
GainWayPermitReset = 114 //赛季通行证积分重置 GainWayPermitReset = 114 //赛季通行证积分重置
GainWayClientUpgrade = 115 //客户端升级奖励
) )
// 后台选择 金币变化类型 的充值 类型id号起始 // 后台选择 金币变化类型 的充值 类型id号起始

View File

@ -39,7 +39,6 @@ const (
MSGTYPE_RANK_REWARD //排行榜奖励 MSGTYPE_RANK_REWARD //排行榜奖励
MSGTYPE_ITEM_CHANGE //背包使用兑换 MSGTYPE_ITEM_CHANGE //背包使用兑换
MSGTYPE_RANK_PermitReward // 通行证排行奖励 MSGTYPE_RANK_PermitReward // 通行证排行奖励
MSGTYPE_ClientUpgrade // 客户端升级
) )
const ( const (

View File

@ -108,12 +108,10 @@ const (
SystemFreeGive_PhoneLotterySwap // 手机积分兑换奖励 SystemFreeGive_PhoneLotterySwap // 手机积分兑换奖励
SystemFreeGive_CollectBox // 开启卡片礼盒奖励 SystemFreeGive_CollectBox // 开启卡片礼盒奖励
SystemFreeGive_CollectBoxSwap // 卡片礼盒兑换奖励 SystemFreeGive_CollectBoxSwap // 卡片礼盒兑换奖励
SystemFreeGive_ClientUpgrade // 客户端升级奖励
) )
const ( const (
SystemFreeGive_CoinType_Coin int32 = iota //金币 SystemFreeGive_CoinType_Coin int32 = iota //金币
SystemFreeGive_CoinType_Diamond //钻石 SystemFreeGive_CoinType_Diamond //钻石
SystemFreeGive_CoinType_Tiem // 道具
) )
type PlayerGameCtrlData struct { type PlayerGameCtrlData struct {

View File

@ -20,20 +20,6 @@ func GenerateLogin(o *PlayerLoginEvent) *mq.RabbitMQData {
return NewRabbitMQData(mq.BackLogin, o) 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 系统免费赠送 // GenerateSystemFreeGive 系统免费赠送
func GenerateSystemFreeGive(snid int32, name, platform, channel string, givetype, cointype int32, count int64) *mq.RabbitMQData { func GenerateSystemFreeGive(snid int32, name, platform, channel string, givetype, cointype int32, count int64) *mq.RabbitMQData {
params := make(map[string]string) params := make(map[string]string)

View File

@ -118,7 +118,7 @@ func AddMailClientUpgrade(snid int32, items []*webapi.ItemInfo) {
content := i18n.Tr("languages", "Upgrade") content := i18n.Tr("languages", "Upgrade")
AddMail(&AddMailParam{ AddMail(&AddMailParam{
Tp: model.MSGTYPE_ClientUpgrade, Tp: model.MSGTYPE_ITEM,
SnId: snid, SnId: snid,
Title: title, Title: title,
Content: content, Content: content,

View File

@ -31,7 +31,6 @@ func init() {
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.BackClientLog, Data: &model.ClientLogMysql{}}) 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.BackSystemJyb, Data: &model.JybLog{}})
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.DBVipGiftLog, Data: &model.DbVip{}}) mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.DBVipGiftLog, Data: &model.DbVip{}})
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.BackSystemFreeGive, Data: &model.SystemFreeGive{}})
} }
func init() { func init() {

View File

@ -1110,27 +1110,17 @@ func (this *Player) GetMessageAttach(id string) {
ItemNum: msg.Params[i+1], // 数量 ItemNum: msg.Params[i+1], // 数量
ObtainTime: time.Now().Unix(), ObtainTime: time.Now().Unix(),
}) })
if gainWay == common.GainWayItemPermitRank {
tp := int32(-1) tp := int32(-1)
switch msg.Params[i] { if msg.Params[i] == common.ItemIDCoin {
case common.ItemIDCoin:
tp = model.SystemFreeGive_CoinType_Coin tp = model.SystemFreeGive_CoinType_Coin
case common.ItemIDDiamond: } else if msg.Params[i] == common.ItemIDDiamond {
tp = model.SystemFreeGive_CoinType_Diamond tp = model.SystemFreeGive_CoinType_Diamond
default:
tp = model.SystemFreeGive_CoinType_Tiem
} }
if tp != -1 { 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, 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{ BagMgrSingleton.AddItems(&model.AddItemParam{
@ -1206,10 +1196,6 @@ func (this *Player) GetMessageAttach(id string) {
remark = "通行证排行奖励" remark = "通行证排行奖励"
gainWay = common.GainWayItemPermitRank gainWay = common.GainWayItemPermitRank
addItem() addItem()
case model.MSGTYPE_ClientUpgrade:
remark = "客户端升级奖励"
gainWay = common.GainWayClientUpgrade
addItem()
} }
if msg.Coin > 0 { if msg.Coin > 0 {
this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark) this.AddCoin(msg.Coin, 0, gainWay, msg.Id.Hex(), remark)