Compare commits
20 Commits
db8506f8b7
...
72b1faa2ce
Author | SHA1 | Date |
---|---|---|
|
72b1faa2ce | |
|
fd064ddb00 | |
|
5697afed33 | |
|
6071106264 | |
|
fc05bd3ee5 | |
|
85d1456623 | |
|
0207cb2f53 | |
|
9075f60b3f | |
|
e6b7fa1fea | |
|
beb0137480 | |
|
72b8443372 | |
|
83baeae566 | |
|
28022634a6 | |
|
b6b0377be9 | |
|
9de6ddc3d7 | |
|
8d51143e18 | |
|
17c29b246e | |
|
8df42379e2 | |
|
8214650eef | |
|
ce2ecdc8f6 |
|
@ -1,6 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
- push
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
ProjectPath: "mongo.games.com/game"
|
ProjectPath: "mongo.games.com/game"
|
||||||
|
@ -8,11 +9,12 @@ variables:
|
||||||
|
|
||||||
default:
|
default:
|
||||||
tags:
|
tags:
|
||||||
- game-develop
|
- gitlab
|
||||||
|
|
||||||
build-job:
|
build-job:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
- git checkout $CI_COMMIT_REF_NAME
|
||||||
# 拷贝到GOPATH
|
# 拷贝到GOPATH
|
||||||
- echo '拷贝到GOPATH'
|
- echo '拷贝到GOPATH'
|
||||||
- cp -rfp ./* $GOPATH/src/$ProjectPath
|
- cp -rfp ./* $GOPATH/src/$ProjectPath
|
||||||
|
@ -33,6 +35,12 @@ build-job:
|
||||||
deploy-job:
|
deploy-job:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
|
# 拉取
|
||||||
|
- echo "拉取deploy"
|
||||||
|
- cd $GOPATH/src/$DeployPath
|
||||||
|
- git checkout $CI_COMMIT_REF_NAME
|
||||||
|
- git pull
|
||||||
|
|
||||||
# 拷贝data目录
|
# 拷贝data目录
|
||||||
- echo '拷贝data目录'
|
- echo '拷贝data目录'
|
||||||
- cd $GOPATH/src/$ProjectPath
|
- cd $GOPATH/src/$ProjectPath
|
||||||
|
@ -58,10 +66,14 @@ deploy-job:
|
||||||
rm -rf $line/$line
|
rm -rf $line/$line
|
||||||
done < shell/programs.txt
|
done < shell/programs.txt
|
||||||
|
|
||||||
|
push_job:
|
||||||
|
stage: push
|
||||||
|
script:
|
||||||
# 提交代码
|
# 提交代码
|
||||||
- echo '提交代码'
|
- echo '提交代码'
|
||||||
- cd $GOPATH/src/$DeployPath
|
- cd $GOPATH/src/$DeployPath
|
||||||
|
- git config user.email "ci@example.com" # 设置提交者的 email
|
||||||
|
- git config user.name "GitLab CI" # 设置提交者的名称
|
||||||
- git add .
|
- git add .
|
||||||
- git commit -m "auto commit pipelineId: $CI_PIPELINE_ID"
|
- git commit -m "auto commit pipelineId $CI_PIPELINE_ID"
|
||||||
- git push origin develop
|
- git push origin $CI_COMMIT_REF_NAME
|
||||||
|
|
|
@ -173,6 +173,9 @@ func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interf
|
||||||
|
|
||||||
// 监听抓取结果返回
|
// 监听抓取结果返回
|
||||||
func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) {
|
func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) {
|
||||||
|
if conn == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
num := int64(1)
|
num := int64(1)
|
||||||
for {
|
for {
|
||||||
// 读取数据
|
// 读取数据
|
||||||
|
@ -183,6 +186,7 @@ func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) {
|
||||||
logger.Logger.Error("Failed to read response from client:", err)
|
logger.Logger.Error("Failed to read response from client:", err)
|
||||||
err := conn.Conn.Close()
|
err := conn.Conn.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
logger.Logger.Error("conn.Conn.Close():", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
@ -327,11 +327,11 @@ func CSShieldMsgHandler(s *netlib.Session, packetid int, data interface{}, sid i
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
//聊天消息
|
//聊天消息
|
||||||
common.Register(int(chat.ChatPacketID_PACKET_SCChatMsg), &chat.CSChatMsg{}, CSChatMsgHandler)
|
common.Register(int(chat.ChatPacketID_PACKET_CSChatMsg), &chat.CSChatMsg{}, CSChatMsgHandler)
|
||||||
//聊天记录
|
//聊天记录
|
||||||
common.Register(int(chat.ChatPacketID_PACKET_CSGetChatLog), &chat.CSGetChatLog{}, CSGetChatLogHandler)
|
common.Register(int(chat.ChatPacketID_PACKET_CSGetChatLog), &chat.CSGetChatLog{}, CSGetChatLogHandler)
|
||||||
//读消息
|
//读消息
|
||||||
common.Register(int(chat.ChatPacketID_PACKET_CSReadChatMsg), &chat.CSReadChatMsg{}, CSReadChatMsgHandler)
|
common.Register(int(chat.ChatPacketID_PACKET_CSReadChatMsg), &chat.CSReadChatMsg{}, CSReadChatMsgHandler)
|
||||||
//屏蔽玩家
|
//屏蔽玩家
|
||||||
common.Register(int(chat.ChatPacketID_PACKET_SCShieldMsg), &chat.SCShieldMsg{}, CSShieldMsgHandler)
|
common.Register(int(chat.ChatPacketID_PACKET_CSShieldMsg), &chat.SCShieldMsg{}, CSShieldMsgHandler)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1122,17 +1122,19 @@ func (this *Player) GetMessageAttach(id string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if tp != -1 {
|
if tp != -1 {
|
||||||
giveType := gainWay
|
giveType := int32(-1)
|
||||||
switch gainWay {
|
switch gainWay {
|
||||||
case common.GainWayItemPermitRank:
|
case common.GainWayItemPermitRank:
|
||||||
giveType = model.SystemFreeGive_GiveType_TaskPermitRank
|
giveType = model.SystemFreeGive_GiveType_TaskPermitRank
|
||||||
case common.GainWayClientUpgrade:
|
case common.GainWayClientUpgrade:
|
||||||
giveType = model.SystemFreeGive_ClientUpgrade
|
giveType = model.SystemFreeGive_ClientUpgrade
|
||||||
}
|
}
|
||||||
|
if giveType != -1 && msg.Oper == 0 && !this.IsRob {
|
||||||
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]))
|
giveType, tp, msg.Params[i+1]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||||
Platform: this.Platform,
|
Platform: this.Platform,
|
||||||
SnId: this.SnId,
|
SnId: this.SnId,
|
||||||
|
|
Loading…
Reference in New Issue