Compare commits
No commits in common. "17d216e07c7949d0acf0328baeb367835d8b75ac" and "e6404f6deedaa02cf06745d3a4588cfbfc78062f" have entirely different histories.
17d216e07c
...
e6404f6dee
|
|
@ -9,7 +9,6 @@ _test
|
||||||
**/backup
|
**/backup
|
||||||
/bin/*
|
/bin/*
|
||||||
!/bin/protoc*
|
!/bin/protoc*
|
||||||
/deploy/*
|
|
||||||
|
|
||||||
# Architecture specific extensions/prefixes
|
# Architecture specific extensions/prefixes
|
||||||
*.[568vq]
|
*.[568vq]
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- lock
|
|
||||||
- build
|
- build
|
||||||
- save
|
- save
|
||||||
- sync
|
- sync
|
||||||
- unlock
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
ProjectPath: "mongo.games.com/game"
|
ProjectPath: "mongo.games.com/game"
|
||||||
|
|
@ -12,37 +10,20 @@ default:
|
||||||
tags:
|
tags:
|
||||||
- gitlab
|
- gitlab
|
||||||
|
|
||||||
# 锁定作业,防止并发流水线执行
|
|
||||||
lock_job:
|
|
||||||
stage: lock
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [ -f /tmp/ci_lock ]; then
|
|
||||||
echo "流水线已在运行,等待..."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
touch /tmp/ci_lock
|
|
||||||
echo "获得锁定,开始流水线。"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build-job:
|
build-job:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
|
||||||
- develop
|
|
||||||
- release
|
|
||||||
script:
|
script:
|
||||||
- git checkout $CI_COMMIT_REF_NAME
|
- git checkout $CI_COMMIT_REF_NAME
|
||||||
- git pull origin $CI_COMMIT_REF_NAME
|
|
||||||
# 拷贝到GOPATH
|
# 拷贝到GOPATH
|
||||||
- echo '拷贝到GOPATH'
|
- echo '拷贝到GOPATH'
|
||||||
- rsync -rvz --delete ./* $GOPATH/src/$ProjectPath
|
- cp -rfp ./* $GOPATH/src/$ProjectPath
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
- cd $GOPATH/src/$ProjectPath
|
- cd $GOPATH/src/$ProjectPath
|
||||||
# 编译
|
# 编译
|
||||||
- echo '编译'
|
- echo '编译'
|
||||||
- go env -w GO111MODULE=off
|
- go env -w GO111MODULE=off
|
||||||
- |
|
- |
|
||||||
while IFS= read -r line || [[ -n $line ]]
|
while IFS= read -r line
|
||||||
do
|
do
|
||||||
cd $line
|
cd $line
|
||||||
echo "编译 $line"
|
echo "编译 $line"
|
||||||
|
|
@ -50,23 +31,19 @@ build-job:
|
||||||
cd ..
|
cd ..
|
||||||
done < shell/programs.txt
|
done < shell/programs.txt
|
||||||
|
|
||||||
save-job:
|
deploy-job:
|
||||||
stage: save
|
stage: save
|
||||||
only:
|
|
||||||
- develop
|
|
||||||
- release
|
|
||||||
script:
|
script:
|
||||||
- cd $GOPATH/src/$ProjectPath
|
- cd $GOPATH/src/$ProjectPath
|
||||||
# 拷贝文件
|
# 拷贝文件
|
||||||
- echo '拷贝文件'
|
- echo '拷贝文件'
|
||||||
- rm -rf ./temp
|
- mkdir -p ./temp
|
||||||
- mkdir ./temp
|
- mkdir -p ./temp/data
|
||||||
- mkdir ./temp/data
|
|
||||||
- cp -rfp ./data/* ./temp/data
|
- cp -rfp ./data/* ./temp/data
|
||||||
# 删除自定义配置
|
# 删除自定义配置
|
||||||
- echo '删除自定义配置'
|
- echo '删除自定义配置'
|
||||||
- |
|
- |
|
||||||
while IFS= read -r line || [[ -n $line ]]
|
while IFS= read -r line
|
||||||
do
|
do
|
||||||
echo "删除 $line 配置"
|
echo "删除 $line 配置"
|
||||||
rm ./temp/data/$line
|
rm ./temp/data/$line
|
||||||
|
|
@ -74,55 +51,39 @@ save-job:
|
||||||
# 拷贝可执行程序
|
# 拷贝可执行程序
|
||||||
- echo '拷贝可执行程序'
|
- echo '拷贝可执行程序'
|
||||||
- |
|
- |
|
||||||
while IFS= read -r line || [[ -n $line ]]
|
while IFS= read -r line
|
||||||
do
|
do
|
||||||
echo "拷贝 $line"
|
echo "拷贝 $line"
|
||||||
mv ./$line/$line ./temp/$line
|
mv ./$line/$line ./temp/$line
|
||||||
done < ./shell/programs.txt
|
done < ./shell/programs.txt
|
||||||
|
|
||||||
sync_job:
|
push_job:
|
||||||
stage: sync
|
stage: sync
|
||||||
only:
|
|
||||||
- develop
|
|
||||||
- release
|
|
||||||
script:
|
script:
|
||||||
- cd $GOPATH/src/$ProjectPath
|
- cd $GOPATH/src/$ProjectPath
|
||||||
- if [ "$CI_COMMIT_BRANCH" == "develop" ]; then
|
- |
|
||||||
SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY_DEVELOP";
|
if [ "$CI_COMMIT_BRANCH" == "develop" ]; then
|
||||||
REMOTE_HOST="$REMOTE_HOST_DEVELOP";
|
SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY_DEVELOP"
|
||||||
REMOTE_USER="$REMOTE_USER_DEVELOP";
|
REMOTE_HOST="$REMOTE_HOST_DEVELOP"
|
||||||
SERVER_CI_TOKEN="$REMOTE_CI_TOKEN_DEVELOP";
|
REMOTE_USER="$REMOTE_USER_DEVELOP"
|
||||||
ServerName="develop";
|
REMOTE_PATH="$REMOTE_PATH_DEVELOP"
|
||||||
elif [ "$CI_COMMIT_BRANCH" == "release" ]; then
|
elif [ "$CI_COMMIT_BRANCH" == "release" ]; then
|
||||||
SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY_BETA";
|
SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY_BETA"
|
||||||
REMOTE_HOST="$REMOTE_HOST_BETA";
|
REMOTE_HOST="$REMOTE_HOST_BETA"
|
||||||
REMOTE_USER="$REMOTE_USER_BETA";
|
REMOTE_USER="$REMOTE_USER_BETA"
|
||||||
SERVER_CI_TOKEN="$REMOTE_CI_TOKEN_BETA";
|
REMOTE_PATH="$REMOTE_PATH_BETA"
|
||||||
ServerName="beta";
|
|
||||||
else
|
else
|
||||||
echo "不支持的分支";
|
echo "不支持的分支";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- echo "Setting up SSH keys..."
|
||||||
# 设置 .ssh 目录并写入 SSH 私钥
|
# 设置 .ssh 目录并写入 SSH 私钥
|
||||||
- echo "设置 SSH keys..."
|
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
- ssh-keyscan -H "$REMOTE_HOST" >> ~/.ssh/known_hosts
|
- ssh-keyscan -H "$REMOTE_HOST" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
# 使用 rsync 将文件同步到远程服务器
|
# 使用 rsync 将文件同步到远程服务器
|
||||||
- echo "同步到服务器"
|
|
||||||
- echo "Deploying to remote server using rsync..."
|
- echo "Deploying to remote server using rsync..."
|
||||||
- rsync -avz --delete ./temp/ $REMOTE_USER@$REMOTE_HOST:$REMOTE_DEPLOY_PATH
|
- rsync -avz --delete build/ $REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH
|
||||||
|
|
||||||
# 触发部署
|
|
||||||
- "curl -X POST --fail -F token=$SERVER_CI_TOKEN -F ref=release -F variables[ServerName]=$ServerName https://git.pogorockgames.com/api/v4/projects/31/trigger/pipeline"
|
|
||||||
|
|
||||||
# 解锁作业,释放锁定
|
|
||||||
unlock_job:
|
|
||||||
stage: unlock
|
|
||||||
script:
|
|
||||||
- rm -f /tmp/ci_lock
|
|
||||||
- echo "释放锁定,流水线结束。"
|
|
||||||
when: always
|
|
||||||
|
|
@ -251,25 +251,25 @@ func RegisterClockFunc(fs *ClockFunc) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if fs.OnSecTimerFunc != nil {
|
if fs.OnSecTimerFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventSecond
|
fs.event = fs.event | ClockEventSecond
|
||||||
}
|
}
|
||||||
if fs.OnMiniTimerFunc != nil {
|
if fs.OnMiniTimerFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventMinute
|
fs.event = fs.event | ClockEventMinute
|
||||||
}
|
}
|
||||||
if fs.OnHourTimerFunc != nil {
|
if fs.OnHourTimerFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventHour
|
fs.event = fs.event | ClockEventHour
|
||||||
}
|
}
|
||||||
if fs.OnDayTimerFunc != nil {
|
if fs.OnDayTimerFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventDay
|
fs.event = fs.event | ClockEventDay
|
||||||
}
|
}
|
||||||
if fs.OnWeekTimerFunc != nil {
|
if fs.OnWeekTimerFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventWeek
|
fs.event = fs.event | ClockEventWeek
|
||||||
}
|
}
|
||||||
if fs.OnMonthTimerFunc != nil {
|
if fs.OnMonthTimerFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventMonth
|
fs.event = fs.event | ClockEventMonth
|
||||||
}
|
}
|
||||||
if fs.OnShutdownFunc != nil {
|
if fs.OnShutdownFunc != nil {
|
||||||
fs.event = fs.event | 1<<ClockEventShutdown
|
fs.event = fs.event | ClockEventShutdown
|
||||||
}
|
}
|
||||||
|
|
||||||
ClockMgrSingleton.RegisterSinker(fs)
|
ClockMgrSingleton.RegisterSinker(fs)
|
||||||
|
|
|
||||||
|
|
@ -573,7 +573,6 @@ const (
|
||||||
ItemDiamondScore = 100012 //钻石积分
|
ItemDiamondScore = 100012 //钻石积分
|
||||||
ItemIDClawdoll = 40003 // 娃娃卡
|
ItemIDClawdoll = 40003 // 娃娃卡
|
||||||
ItemDollCard = 40004 // 娃娃卡积分
|
ItemDollCard = 40004 // 娃娃卡积分
|
||||||
ItemIDRoomCard = 40002 // 房卡
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ToItemId(id int32) int32 {
|
func ToItemId(id int32) int32 {
|
||||||
|
|
@ -870,9 +869,3 @@ const (
|
||||||
const (
|
const (
|
||||||
PlayerFlagsGuideCustom = 1 << iota // 竞技馆引导页关闭状态
|
PlayerFlagsGuideCustom = 1 << iota // 竞技馆引导页关闭状态
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
LotteryStateOver = 1 // 抽奖结束
|
|
||||||
LotteryStateRun = 2 // 抽奖进行中
|
|
||||||
LotteryStateNoStart = 3 // 抽奖未开始
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,3 @@ func GetBElementFromA(A []interface{}, B int) []interface{} {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func RandFloat(min, max float64) float64 {
|
|
||||||
return min + rand.Float64()*(max-min)
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -182,19 +182,3 @@ func GetMonthTimestamp() []int64 {
|
||||||
et := time.Date(year, month, 1, 0, 0, 0, 0, now.Location()).Unix()
|
et := time.Date(year, month, 1, 0, 0, 0, 0, now.Location()).Unix()
|
||||||
return []int64{st, et}
|
return []int64{st, et}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HMSToTime 将时分秒转换为今天的time
|
|
||||||
// h: 时
|
|
||||||
// m: 分
|
|
||||||
// s: 秒
|
|
||||||
func HMSToTime(h, m, s int) time.Time {
|
|
||||||
now := time.Now().Local()
|
|
||||||
year, month, day := now.Date()
|
|
||||||
return time.Date(year, month, day, h, m, s, 0, now.Location())
|
|
||||||
}
|
|
||||||
|
|
||||||
// IntToTime 将int转换为time
|
|
||||||
// n: 时*10000 + 分*100 + 秒
|
|
||||||
func IntToTime(n int) time.Time {
|
|
||||||
return HMSToTime(n/10000, n%10000/100, n%100)
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -6502,7 +6502,6 @@
|
||||||
"Desc": "0",
|
"Desc": "0",
|
||||||
"ShowType": 2,
|
"ShowType": 2,
|
||||||
"ShowId": 30800,
|
"ShowId": 30800,
|
||||||
"LimitCoin": 10000,
|
|
||||||
"BaseScore": 1000,
|
"BaseScore": 1000,
|
||||||
"Turn": 30800,
|
"Turn": 30800,
|
||||||
"BetDec": "1000",
|
"BetDec": "1000",
|
||||||
|
|
@ -6536,7 +6535,6 @@
|
||||||
"Desc": "0",
|
"Desc": "0",
|
||||||
"ShowType": 2,
|
"ShowType": 2,
|
||||||
"ShowId": 30900,
|
"ShowId": 30900,
|
||||||
"LimitCoin": 10000,
|
|
||||||
"BaseScore": 1000,
|
"BaseScore": 1000,
|
||||||
"Turn": 30900,
|
"Turn": 30900,
|
||||||
"BetDec": "1000",
|
"BetDec": "1000",
|
||||||
|
|
@ -6570,7 +6568,6 @@
|
||||||
"Desc": "0",
|
"Desc": "0",
|
||||||
"ShowType": 2,
|
"ShowType": 2,
|
||||||
"ShowId": 31000,
|
"ShowId": 31000,
|
||||||
"LimitCoin": 10000,
|
|
||||||
"BaseScore": 1000,
|
"BaseScore": 1000,
|
||||||
"Turn": 31000,
|
"Turn": 31000,
|
||||||
"BetDec": "1000",
|
"BetDec": "1000",
|
||||||
|
|
@ -6604,7 +6601,6 @@
|
||||||
"Desc": "0",
|
"Desc": "0",
|
||||||
"ShowType": 2,
|
"ShowType": 2,
|
||||||
"ShowId": 31100,
|
"ShowId": 31100,
|
||||||
"LimitCoin": 10000,
|
|
||||||
"BaseScore": 1000,
|
"BaseScore": 1000,
|
||||||
"Turn": 31100,
|
"Turn": 31100,
|
||||||
"BetDec": "1000",
|
"BetDec": "1000",
|
||||||
|
|
@ -6638,7 +6634,6 @@
|
||||||
"Desc": "0",
|
"Desc": "0",
|
||||||
"ShowType": 2,
|
"ShowType": 2,
|
||||||
"ShowId": 31200,
|
"ShowId": 31200,
|
||||||
"LimitCoin": 10000,
|
|
||||||
"BaseScore": 1000,
|
"BaseScore": 1000,
|
||||||
"Turn": 31200,
|
"Turn": 31200,
|
||||||
"BetDec": "1000",
|
"BetDec": "1000",
|
||||||
|
|
@ -6679,7 +6674,7 @@
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"OtherIntParams": [
|
"OtherIntParams": [
|
||||||
1
|
0
|
||||||
],
|
],
|
||||||
"RobotNumRng": [
|
"RobotNumRng": [
|
||||||
0
|
0
|
||||||
|
|
@ -6712,7 +6707,7 @@
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"OtherIntParams": [
|
"OtherIntParams": [
|
||||||
1
|
0
|
||||||
],
|
],
|
||||||
"RobotNumRng": [
|
"RobotNumRng": [
|
||||||
0
|
0
|
||||||
|
|
@ -6745,7 +6740,7 @@
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"OtherIntParams": [
|
"OtherIntParams": [
|
||||||
2
|
1
|
||||||
],
|
],
|
||||||
"RobotNumRng": [
|
"RobotNumRng": [
|
||||||
0
|
0
|
||||||
|
|
@ -6778,7 +6773,7 @@
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"OtherIntParams": [
|
"OtherIntParams": [
|
||||||
2
|
1
|
||||||
],
|
],
|
||||||
"RobotNumRng": [
|
"RobotNumRng": [
|
||||||
0
|
0
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
|
@ -191,30 +191,6 @@
|
||||||
"30008": 1
|
"30008": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Id": 29,
|
|
||||||
"Order": 6,
|
|
||||||
"Name": "周活跃任务",
|
|
||||||
"ActivityType": 2,
|
|
||||||
"TaskType": 14,
|
|
||||||
"TargetTimes": 900,
|
|
||||||
"FinishTimes": 1,
|
|
||||||
"Award": {
|
|
||||||
"30010": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Id": 30,
|
|
||||||
"Order": 7,
|
|
||||||
"Name": "周活跃任务",
|
|
||||||
"ActivityType": 2,
|
|
||||||
"TaskType": 14,
|
|
||||||
"TargetTimes": 1250,
|
|
||||||
"FinishTimes": 1,
|
|
||||||
"Award": {
|
|
||||||
"73001": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Id": 12,
|
"Id": 12,
|
||||||
"Order": 1,
|
"Order": 1,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,5 @@
|
||||||
"PermitAwardTitle": "{\"zh\":\"通行证排行奖励\",\"vi\":\"Vượt qua phần thưởng xếp hạng\",\"en\":\"Pass Ranking Rewards\",\"kh\":\"រង្វាន់ចំណាត់ថ្នាក់ឆ្លងកាត់\"}",
|
"PermitAwardTitle": "{\"zh\":\"通行证排行奖励\",\"vi\":\"Vượt qua phần thưởng xếp hạng\",\"en\":\"Pass Ranking Rewards\",\"kh\":\"រង្វាន់ចំណាត់ថ្នាក់ឆ្លងកាត់\"}",
|
||||||
"PermitAward": "{\"zh\":\"恭喜您在上个赛季通行证排行中名次达到%v名,排行奖励已发放,请查收\",\"vi\":\"Chúc mừng bạn đã đạt được %v trong bảng xếp hạng vượt qua. Phần thưởng xếp hạng đã được phân phối, vui lòng kiểm tra.\",\"en\":\"Congratulations on reaching %vth place in the pass ranking. Ranking rewards have been issued. Please check.\",\"kh\":\"សូមអបអរសាទរចំពោះការឈានដល់ចំណាត់ថ្នាក់ទី %v ក្នុងចំណាត់ថ្នាក់ឆ្លងកាត់។ រង្វាន់ចំណាត់ថ្នាក់ត្រូវបានចេញ។ សូមត្រួតពិនិត្យ។\"}",
|
"PermitAward": "{\"zh\":\"恭喜您在上个赛季通行证排行中名次达到%v名,排行奖励已发放,请查收\",\"vi\":\"Chúc mừng bạn đã đạt được %v trong bảng xếp hạng vượt qua. Phần thưởng xếp hạng đã được phân phối, vui lòng kiểm tra.\",\"en\":\"Congratulations on reaching %vth place in the pass ranking. Ranking rewards have been issued. Please check.\",\"kh\":\"សូមអបអរសាទរចំពោះការឈានដល់ចំណាត់ថ្នាក់ទី %v ក្នុងចំណាត់ថ្នាក់ឆ្លងកាត់។ រង្វាន់ចំណាត់ថ្នាក់ត្រូវបានចេញ។ សូមត្រួតពិនិត្យ។\"}",
|
||||||
"UpgradeTitle": "{\"zh\":\"更新奖励\",\"vi\":\"Phần thưởng cập nhật\",\"en\":\"Update Rewards\",\"kh\":\"រង្វាន់ដំឡើង\"}",
|
"UpgradeTitle": "{\"zh\":\"更新奖励\",\"vi\":\"Phần thưởng cập nhật\",\"en\":\"Update Rewards\",\"kh\":\"រង្វាន់ដំឡើង\"}",
|
||||||
"Upgrade": "{\"zh\":\"感谢您更新客户端,更新奖励已发放至附近,请注意查收\",\"vi\":\"Cảm ơn bạn đã cập nhật ứng dụng khách. Phần thưởng cập nhật đã được phân phối gần đó, vui lòng chú ý kiểm tra nhận\",\"en\":\"Thank you for updating the client. The update reward has been distributed to everyone. Please check it carefully.\",\"kh\":\"អរគុណសម្រាប់ការធ្វើបច្ចុប្បន្នភាពហ្គេម។ រង្វាន់នៃការធ្វើបច្ចុប្បន្នភាពត្រូវបានចែកចាយទៅគ្រប់គ្នា។ សូមពិនិត្យអោយបានច្បាស់លាស់។\"}",
|
"Upgrade": "{\"zh\":\"感谢您更新客户端,更新奖励已发放至附近,请注意查收\",\"vi\":\"Cảm ơn bạn đã cập nhật ứng dụng khách. Phần thưởng cập nhật đã được phân phối gần đó, vui lòng chú ý kiểm tra nhận\",\"en\":\"Thank you for updating the client. The update reward has been distributed to everyone. Please check it carefully.\",\"kh\":\"អរគុណសម្រាប់ការធ្វើបច្ចុប្បន្នភាពហ្គេម។ រង្វាន់នៃការធ្វើបច្ចុប្បន្នភាពត្រូវបានចែកចាយទៅគ្រប់គ្នា។ សូមពិនិត្យអោយបានច្បាស់លាស់។\"}"
|
||||||
"LotteryTitle": "{\"zh\":\"玩游戏抽奖品\",\"vi\":\"Chơi game rút thưởng\",\"en\":\"Play games, draw prizes\",\"kh\":\"លេងហ្គេម ចាប់រង្វាន់\"}",
|
|
||||||
"Lottery": "{\"zh\":\"恭喜您在好友房玩游戏抽奖品活动中获得了大奖,奖品随邮件发放,请注意查收\",\"vi\":\"Chúc mừng bạn đã trúng giải thưởng lớn trong hoạt động rút thưởng trò chơi tại phòng bạn bè. Giải thưởng sẽ được gửi qua email, vui lòng kiểm tra cẩn thận.\",\"en\":\"Congratulations on winning the grand prize in the lucky draw activity in the friend room. The prize will be sent via email, please check it carefully.\",\"kh\":\"សូមអបអរសាទរចំពោះការឈ្នះរង្វាន់ធំក្នុងសកម្មភាពចាប់រង្វាន់ក្នុងបន្ទប់មិត្តភ័ក្តិរបស់អ្នក រង្វាន់នឹងត្រូវបានផ្ញើតាមអ៊ីម៉ែល សូមពិនិត្យមើលវាដោយយកចិត្តទុកដាក់។\"}"
|
|
||||||
}
|
}
|
||||||
36
db/export.go
36
db/export.go
|
|
@ -1,36 +0,0 @@
|
||||||
package db
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net"
|
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
)
|
|
||||||
|
|
||||||
var GrpcServer *grpc.Server
|
|
||||||
var GrpcClientConn *grpc.ClientConn
|
|
||||||
|
|
||||||
func RunGrpcServer() {
|
|
||||||
GrpcServer = grpc.NewServer()
|
|
||||||
registerGrpcServer()
|
|
||||||
ln, err := net.Listen("tcp", ":8899")
|
|
||||||
if err != nil {
|
|
||||||
panic(errors.New("db grpc failed to listen: " + err.Error()))
|
|
||||||
}
|
|
||||||
|
|
||||||
err = GrpcServer.Serve(ln)
|
|
||||||
if err != nil {
|
|
||||||
panic(errors.New("db grpc failed to serve: " + err.Error()))
|
|
||||||
}
|
|
||||||
logger.Logger.Infof("db grpc start success")
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewGrpcClientConn() {
|
|
||||||
var err error
|
|
||||||
GrpcClientConn, err = grpc.NewClient("localhost:8899", grpc.WithInsecure())
|
|
||||||
if err != nil {
|
|
||||||
panic(errors.New("db grpc failed to dial: " + err.Error()))
|
|
||||||
}
|
|
||||||
registerGrpcClient()
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
set work_path=%cd%
|
|
||||||
set proto_path=%work_path%\proto
|
|
||||||
set protoc=%work_path%\..\bin\protoc-3.19.4-win64\bin\protoc.exe
|
|
||||||
set protoc-gen-go-plugin-path="%work_path%\..\bin\protoc-gen-go.exe"
|
|
||||||
set protoc-gen-go-grpc-plugin-path="%work_path%\..\bin\protoc-gen-go-grpc.exe"
|
|
||||||
|
|
||||||
rem echo %protoc3%
|
|
||||||
cd %proto_path%
|
|
||||||
for /d %%s in (,*) do (
|
|
||||||
cd %%s
|
|
||||||
for %%b in (,*.proto) do (
|
|
||||||
%protoc% --proto_path=%GOPATH%\src\mongo.games.com\game\db\proto --proto_path=. --plugin=protoc-gen-go=%protoc-gen-go-plugin-path% --plugin=protoc-gen-go-grpc=%protoc-gen-go-grpc-plugin-path% --go_out=%GOPATH%\src --go-grpc_out=%GOPATH%\src %%b
|
|
||||||
)
|
|
||||||
cd ..
|
|
||||||
)
|
|
||||||
cd %work_path%
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
package model
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/db/proto/lottery"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 竞技馆抽奖记录
|
|
||||||
|
|
||||||
type Lottery struct {
|
|
||||||
Ts int64 // 中奖时间
|
|
||||||
SnId int32 // 玩家id
|
|
||||||
Name string // 玩家昵称
|
|
||||||
Number int64 // 中奖号码
|
|
||||||
Award map[int32]int64 // 奖品,key为奖品id,value为奖品数量
|
|
||||||
Video string // 视频地址
|
|
||||||
}
|
|
||||||
|
|
||||||
type LotteryServer struct {
|
|
||||||
lottery.UnimplementedLotteryServerServer
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lottery) Save(ctx context.Context, req *lottery.SaveReq) (*lottery.SaveRsp, error) {
|
|
||||||
logger.Logger.Infof("Lottery Save: %v", req)
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lottery) Find(ctx context.Context, req *lottery.FindReq) (*lottery.FindRsp, error) {
|
|
||||||
logger.Logger.Infof("Lottery Find: %v", req)
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
@ -1,448 +0,0 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// protoc-gen-go v1.27.1-devel
|
|
||||||
// protoc v3.19.4
|
|
||||||
// source: lottery.proto
|
|
||||||
|
|
||||||
package lottery
|
|
||||||
|
|
||||||
import (
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
||||||
public "mongo.games.com/game/db/proto/public"
|
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
||||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
||||||
)
|
|
||||||
|
|
||||||
type Lottery struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Ts int64 `protobuf:"varint,1,opt,name=Ts,proto3" json:"Ts,omitempty"` // 中奖时间
|
|
||||||
SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id
|
|
||||||
Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"` // 玩家昵称
|
|
||||||
Number int64 `protobuf:"varint,4,opt,name=Number,proto3" json:"Number,omitempty"` // 中奖号码
|
|
||||||
Award []*public.Item `protobuf:"bytes,5,rep,name=Award,proto3" json:"Award,omitempty"` // 奖品,key为奖品id,value为奖品数量
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) Reset() {
|
|
||||||
*x = Lottery{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_lottery_proto_msgTypes[0]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*Lottery) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *Lottery) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_lottery_proto_msgTypes[0]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use Lottery.ProtoReflect.Descriptor instead.
|
|
||||||
func (*Lottery) Descriptor() ([]byte, []int) {
|
|
||||||
return file_lottery_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) GetTs() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Ts
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) GetSnId() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.SnId
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) GetName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Name
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) GetNumber() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Number
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Lottery) GetAward() []*public.Item {
|
|
||||||
if x != nil {
|
|
||||||
return x.Award
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
//客户端发送给服务端
|
|
||||||
type SaveReq struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SaveReq) Reset() {
|
|
||||||
*x = SaveReq{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_lottery_proto_msgTypes[1]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SaveReq) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*SaveReq) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *SaveReq) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_lottery_proto_msgTypes[1]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use SaveReq.ProtoReflect.Descriptor instead.
|
|
||||||
func (*SaveReq) Descriptor() ([]byte, []int) {
|
|
||||||
return file_lottery_proto_rawDescGZIP(), []int{1}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SaveReq) GetName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Name
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
//服务端返回给客户端
|
|
||||||
type SaveRsp struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SaveRsp) Reset() {
|
|
||||||
*x = SaveRsp{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_lottery_proto_msgTypes[2]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SaveRsp) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*SaveRsp) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *SaveRsp) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_lottery_proto_msgTypes[2]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use SaveRsp.ProtoReflect.Descriptor instead.
|
|
||||||
func (*SaveRsp) Descriptor() ([]byte, []int) {
|
|
||||||
return file_lottery_proto_rawDescGZIP(), []int{2}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SaveRsp) GetMsg() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Msg
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
//客户端发送给服务端
|
|
||||||
type FindReq struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *FindReq) Reset() {
|
|
||||||
*x = FindReq{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_lottery_proto_msgTypes[3]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *FindReq) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FindReq) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *FindReq) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_lottery_proto_msgTypes[3]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use FindReq.ProtoReflect.Descriptor instead.
|
|
||||||
func (*FindReq) Descriptor() ([]byte, []int) {
|
|
||||||
return file_lottery_proto_rawDescGZIP(), []int{3}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *FindReq) GetName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Name
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
//服务端返回给客户端
|
|
||||||
type FindRsp struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *FindRsp) Reset() {
|
|
||||||
*x = FindRsp{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_lottery_proto_msgTypes[4]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *FindRsp) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FindRsp) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *FindRsp) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_lottery_proto_msgTypes[4]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use FindRsp.ProtoReflect.Descriptor instead.
|
|
||||||
func (*FindRsp) Descriptor() ([]byte, []int) {
|
|
||||||
return file_lottery_proto_rawDescGZIP(), []int{4}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *FindRsp) GetMsg() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Msg
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_lottery_proto protoreflect.FileDescriptor
|
|
||||||
|
|
||||||
var file_lottery_proto_rawDesc = []byte{
|
|
||||||
0x0a, 0x0d, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
|
||||||
0x07, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x1a, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
|
|
||||||
0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a,
|
|
||||||
0x07, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x01,
|
|
||||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x54, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64,
|
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
|
||||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65,
|
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
|
|
||||||
0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72,
|
|
||||||
0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
|
|
||||||
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1d, 0x0a, 0x07,
|
|
||||||
0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x07, 0x53,
|
|
||||||
0x61, 0x76, 0x65, 0x52, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x1d, 0x0a, 0x07, 0x46, 0x69, 0x6e, 0x64,
|
|
||||||
0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x07, 0x46, 0x69, 0x6e, 0x64, 0x52,
|
|
||||||
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x03, 0x6d, 0x73, 0x67, 0x32, 0x6b, 0x0a, 0x0d, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x53,
|
|
||||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x04, 0x53, 0x61, 0x76, 0x65, 0x12, 0x10, 0x2e,
|
|
||||||
0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x1a,
|
|
||||||
0x10, 0x2e, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x73,
|
|
||||||
0x70, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x04, 0x46, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x2e, 0x6c, 0x6f,
|
|
||||||
0x74, 0x74, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e,
|
|
||||||
0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x73, 0x70, 0x22,
|
|
||||||
0x00, 0x42, 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
|
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x64, 0x62, 0x2f, 0x70, 0x72, 0x6f,
|
|
||||||
0x74, 0x6f, 0x2f, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
|
||||||
0x6f, 0x33,
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
file_lottery_proto_rawDescOnce sync.Once
|
|
||||||
file_lottery_proto_rawDescData = file_lottery_proto_rawDesc
|
|
||||||
)
|
|
||||||
|
|
||||||
func file_lottery_proto_rawDescGZIP() []byte {
|
|
||||||
file_lottery_proto_rawDescOnce.Do(func() {
|
|
||||||
file_lottery_proto_rawDescData = protoimpl.X.CompressGZIP(file_lottery_proto_rawDescData)
|
|
||||||
})
|
|
||||||
return file_lottery_proto_rawDescData
|
|
||||||
}
|
|
||||||
|
|
||||||
var file_lottery_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
||||||
var file_lottery_proto_goTypes = []interface{}{
|
|
||||||
(*Lottery)(nil), // 0: lottery.Lottery
|
|
||||||
(*SaveReq)(nil), // 1: lottery.SaveReq
|
|
||||||
(*SaveRsp)(nil), // 2: lottery.SaveRsp
|
|
||||||
(*FindReq)(nil), // 3: lottery.FindReq
|
|
||||||
(*FindRsp)(nil), // 4: lottery.FindRsp
|
|
||||||
(*public.Item)(nil), // 5: public.Item
|
|
||||||
}
|
|
||||||
var file_lottery_proto_depIdxs = []int32{
|
|
||||||
5, // 0: lottery.Lottery.Award:type_name -> public.Item
|
|
||||||
1, // 1: lottery.LotteryServer.Save:input_type -> lottery.SaveReq
|
|
||||||
3, // 2: lottery.LotteryServer.Find:input_type -> lottery.FindReq
|
|
||||||
2, // 3: lottery.LotteryServer.Save:output_type -> lottery.SaveRsp
|
|
||||||
4, // 4: lottery.LotteryServer.Find:output_type -> lottery.FindRsp
|
|
||||||
3, // [3:5] is the sub-list for method output_type
|
|
||||||
1, // [1:3] is the sub-list for method input_type
|
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
|
||||||
1, // [1:1] is the sub-list for extension extendee
|
|
||||||
0, // [0:1] is the sub-list for field type_name
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { file_lottery_proto_init() }
|
|
||||||
func file_lottery_proto_init() {
|
|
||||||
if File_lottery_proto != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_lottery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*Lottery); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_lottery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*SaveReq); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_lottery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*SaveRsp); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_lottery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*FindReq); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_lottery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*FindRsp); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
|
||||||
out := protoimpl.TypeBuilder{
|
|
||||||
File: protoimpl.DescBuilder{
|
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
||||||
RawDescriptor: file_lottery_proto_rawDesc,
|
|
||||||
NumEnums: 0,
|
|
||||||
NumMessages: 5,
|
|
||||||
NumExtensions: 0,
|
|
||||||
NumServices: 1,
|
|
||||||
},
|
|
||||||
GoTypes: file_lottery_proto_goTypes,
|
|
||||||
DependencyIndexes: file_lottery_proto_depIdxs,
|
|
||||||
MessageInfos: file_lottery_proto_msgTypes,
|
|
||||||
}.Build()
|
|
||||||
File_lottery_proto = out.File
|
|
||||||
file_lottery_proto_rawDesc = nil
|
|
||||||
file_lottery_proto_goTypes = nil
|
|
||||||
file_lottery_proto_depIdxs = nil
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
syntax = "proto3";
|
|
||||||
package lottery;
|
|
||||||
option go_package = "mongo.games.com/game/db/proto/lottery";
|
|
||||||
|
|
||||||
service LotteryServer {
|
|
||||||
rpc Save (SaveReq) returns (SaveRsp){}
|
|
||||||
rpc Find (FindReq) returns (FindRsp){}
|
|
||||||
}
|
|
||||||
|
|
||||||
//客户端发送给服务端
|
|
||||||
message SaveReq {
|
|
||||||
string name = 1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//服务端返回给客户端
|
|
||||||
message SaveRsp {
|
|
||||||
string msg = 1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//客户端发送给服务端
|
|
||||||
message FindReq {
|
|
||||||
string name = 1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//服务端返回给客户端
|
|
||||||
message FindRsp {
|
|
||||||
string msg = 1 ;
|
|
||||||
}
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
|
||||||
// - protoc v3.19.4
|
|
||||||
// source: lottery.proto
|
|
||||||
|
|
||||||
package lottery
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "context"
|
|
||||||
grpc "google.golang.org/grpc"
|
|
||||||
codes "google.golang.org/grpc/codes"
|
|
||||||
status "google.golang.org/grpc/status"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
// Requires gRPC-Go v1.32.0 or later.
|
|
||||||
const _ = grpc.SupportPackageIsVersion7
|
|
||||||
|
|
||||||
const (
|
|
||||||
LotteryServer_Save_FullMethodName = "/lottery.LotteryServer/Save"
|
|
||||||
LotteryServer_Find_FullMethodName = "/lottery.LotteryServer/Find"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LotteryServerClient is the client API for LotteryServer service.
|
|
||||||
//
|
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
||||||
type LotteryServerClient interface {
|
|
||||||
Save(ctx context.Context, in *SaveReq, opts ...grpc.CallOption) (*SaveRsp, error)
|
|
||||||
Find(ctx context.Context, in *FindReq, opts ...grpc.CallOption) (*FindRsp, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type lotteryServerClient struct {
|
|
||||||
cc grpc.ClientConnInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewLotteryServerClient(cc grpc.ClientConnInterface) LotteryServerClient {
|
|
||||||
return &lotteryServerClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *lotteryServerClient) Save(ctx context.Context, in *SaveReq, opts ...grpc.CallOption) (*SaveRsp, error) {
|
|
||||||
out := new(SaveRsp)
|
|
||||||
err := c.cc.Invoke(ctx, LotteryServer_Save_FullMethodName, in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *lotteryServerClient) Find(ctx context.Context, in *FindReq, opts ...grpc.CallOption) (*FindRsp, error) {
|
|
||||||
out := new(FindRsp)
|
|
||||||
err := c.cc.Invoke(ctx, LotteryServer_Find_FullMethodName, in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// LotteryServerServer is the server API for LotteryServer service.
|
|
||||||
// All implementations must embed UnimplementedLotteryServerServer
|
|
||||||
// for forward compatibility
|
|
||||||
type LotteryServerServer interface {
|
|
||||||
Save(context.Context, *SaveReq) (*SaveRsp, error)
|
|
||||||
Find(context.Context, *FindReq) (*FindRsp, error)
|
|
||||||
mustEmbedUnimplementedLotteryServerServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedLotteryServerServer must be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedLotteryServerServer struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedLotteryServerServer) Save(context.Context, *SaveReq) (*SaveRsp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Save not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedLotteryServerServer) Find(context.Context, *FindReq) (*FindRsp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Find not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedLotteryServerServer) mustEmbedUnimplementedLotteryServerServer() {}
|
|
||||||
|
|
||||||
// UnsafeLotteryServerServer may be embedded to opt out of forward compatibility for this service.
|
|
||||||
// Use of this interface is not recommended, as added methods to LotteryServerServer will
|
|
||||||
// result in compilation errors.
|
|
||||||
type UnsafeLotteryServerServer interface {
|
|
||||||
mustEmbedUnimplementedLotteryServerServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterLotteryServerServer(s grpc.ServiceRegistrar, srv LotteryServerServer) {
|
|
||||||
s.RegisterService(&LotteryServer_ServiceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _LotteryServer_Save_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(SaveReq)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(LotteryServerServer).Save(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: LotteryServer_Save_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(LotteryServerServer).Save(ctx, req.(*SaveReq))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _LotteryServer_Find_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(FindReq)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(LotteryServerServer).Find(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: LotteryServer_Find_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(LotteryServerServer).Find(ctx, req.(*FindReq))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// LotteryServer_ServiceDesc is the grpc.ServiceDesc for LotteryServer service.
|
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
|
||||||
// and not to be introspected or modified (even as a copy)
|
|
||||||
var LotteryServer_ServiceDesc = grpc.ServiceDesc{
|
|
||||||
ServiceName: "lottery.LotteryServer",
|
|
||||||
HandlerType: (*LotteryServerServer)(nil),
|
|
||||||
Methods: []grpc.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "Save",
|
|
||||||
Handler: _LotteryServer_Save_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "Find",
|
|
||||||
Handler: _LotteryServer_Find_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc.StreamDesc{},
|
|
||||||
Metadata: "lottery.proto",
|
|
||||||
}
|
|
||||||
|
|
@ -1,151 +0,0 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// protoc-gen-go v1.27.1-devel
|
|
||||||
// protoc v3.19.4
|
|
||||||
// source: public.proto
|
|
||||||
|
|
||||||
package public
|
|
||||||
|
|
||||||
import (
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
||||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
||||||
)
|
|
||||||
|
|
||||||
type Item struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // id
|
|
||||||
Num int64 `protobuf:"varint,2,opt,name=Num,proto3" json:"Num,omitempty"` // 数量
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Item) Reset() {
|
|
||||||
*x = Item{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_public_proto_msgTypes[0]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Item) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*Item) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *Item) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_public_proto_msgTypes[0]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
|
|
||||||
func (*Item) Descriptor() ([]byte, []int) {
|
|
||||||
return file_public_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Item) GetId() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Id
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Item) GetNum() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Num
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_public_proto protoreflect.FileDescriptor
|
|
||||||
|
|
||||||
var file_public_proto_rawDesc = []byte{
|
|
||||||
0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
|
|
||||||
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e,
|
|
||||||
0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10,
|
|
||||||
0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d,
|
|
||||||
0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e,
|
|
||||||
0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x64, 0x62, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
|
||||||
0x6f, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
file_public_proto_rawDescOnce sync.Once
|
|
||||||
file_public_proto_rawDescData = file_public_proto_rawDesc
|
|
||||||
)
|
|
||||||
|
|
||||||
func file_public_proto_rawDescGZIP() []byte {
|
|
||||||
file_public_proto_rawDescOnce.Do(func() {
|
|
||||||
file_public_proto_rawDescData = protoimpl.X.CompressGZIP(file_public_proto_rawDescData)
|
|
||||||
})
|
|
||||||
return file_public_proto_rawDescData
|
|
||||||
}
|
|
||||||
|
|
||||||
var file_public_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
|
||||||
var file_public_proto_goTypes = []interface{}{
|
|
||||||
(*Item)(nil), // 0: public.Item
|
|
||||||
}
|
|
||||||
var file_public_proto_depIdxs = []int32{
|
|
||||||
0, // [0:0] is the sub-list for method output_type
|
|
||||||
0, // [0:0] is the sub-list for method input_type
|
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
|
||||||
0, // [0:0] is the sub-list for extension extendee
|
|
||||||
0, // [0:0] is the sub-list for field type_name
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { file_public_proto_init() }
|
|
||||||
func file_public_proto_init() {
|
|
||||||
if File_public_proto != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_public_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*Item); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
|
||||||
out := protoimpl.TypeBuilder{
|
|
||||||
File: protoimpl.DescBuilder{
|
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
||||||
RawDescriptor: file_public_proto_rawDesc,
|
|
||||||
NumEnums: 0,
|
|
||||||
NumMessages: 1,
|
|
||||||
NumExtensions: 0,
|
|
||||||
NumServices: 0,
|
|
||||||
},
|
|
||||||
GoTypes: file_public_proto_goTypes,
|
|
||||||
DependencyIndexes: file_public_proto_depIdxs,
|
|
||||||
MessageInfos: file_public_proto_msgTypes,
|
|
||||||
}.Build()
|
|
||||||
File_public_proto = out.File
|
|
||||||
file_public_proto_rawDesc = nil
|
|
||||||
file_public_proto_goTypes = nil
|
|
||||||
file_public_proto_depIdxs = nil
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
syntax = "proto3";
|
|
||||||
package public;
|
|
||||||
option go_package = "mongo.games.com/game/db/proto/public";
|
|
||||||
|
|
||||||
// 通用数据结构
|
|
||||||
|
|
||||||
message Item {
|
|
||||||
int32 Id = 1; // id
|
|
||||||
int64 Num = 2; // 数量
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
package db
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/db/model"
|
|
||||||
"mongo.games.com/game/db/proto/lottery"
|
|
||||||
)
|
|
||||||
|
|
||||||
/*
|
|
||||||
grpc 服务端注册
|
|
||||||
*/
|
|
||||||
|
|
||||||
// registerGrpcServer 注册grpc服务
|
|
||||||
func registerGrpcServer() {
|
|
||||||
lottery.RegisterLotteryServerServer(GrpcServer, new(model.LotteryServer))
|
|
||||||
}
|
|
||||||
|
|
||||||
var LotteryClient lottery.LotteryServerClient
|
|
||||||
|
|
||||||
func registerGrpcClient() {
|
|
||||||
LotteryClient = lottery.NewLotteryServerClient(GrpcClientConn)
|
|
||||||
}
|
|
||||||
|
|
@ -39,10 +39,6 @@ func main() {
|
||||||
log.Fatalln("rpc start fatal error: ", err)
|
log.Fatalln("rpc start fatal error: ", err)
|
||||||
}
|
}
|
||||||
go http.Serve(lis, nil)
|
go http.Serve(lis, nil)
|
||||||
|
|
||||||
// grpc 服务
|
|
||||||
//go db.RunGrpcServer()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
core.RegisteHook(core.HOOK_AFTER_STOP, func() error {
|
core.RegisteHook(core.HOOK_AFTER_STOP, func() error {
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
package mq
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/dbproxy/svc"
|
|
||||||
"mongo.games.com/game/model"
|
|
||||||
"mongo.games.com/game/mq"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
mq.RegisterHandler(&mq.RegisterHandlerParam{
|
|
||||||
Name: mq.DBLotteryCode,
|
|
||||||
Data: &model.LotteryCode{},
|
|
||||||
Handler: func(data interface{}) (err error) {
|
|
||||||
log, ok := data.(*model.LotteryCode)
|
|
||||||
if !ok {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
c := svc.LotteryCodeCollection(log.Platform)
|
|
||||||
if c == nil {
|
|
||||||
return svc.LotteryCodeDBErr
|
|
||||||
}
|
|
||||||
if err = c.Insert(log); err != nil {
|
|
||||||
logger.Logger.Errorf("InsertLotteryCode error: %v", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
mq.RegisterHandler(&mq.RegisterHandlerParam{
|
|
||||||
Name: mq.DBLotteryLog,
|
|
||||||
Data: &model.LotteryLog{},
|
|
||||||
Handler: func(data interface{}) (err error) {
|
|
||||||
log, ok := data.(*model.LotteryLog)
|
|
||||||
if !ok {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if err = svc.InsertLotteryLogs(log.Platform, log); err != nil {
|
|
||||||
logger.Logger.Errorf("InsertLotteryLogs error: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
mq.Write(&model.LotteryLog{Platform: log.Platform}, mq.RankLotteryLog)
|
|
||||||
return
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
var (
|
var (
|
||||||
CrashHashDBName = "user"
|
CrashHashDBName = "user"
|
||||||
CrashHashCollName = "user_crashhash"
|
CrashHashCollName = "user_crashhash"
|
||||||
ErrHashDBNotOpen = model.NewDBError(CrashHashDBName, CrashHashCollName, model.NotOpen)
|
ErrHashDBNotOpen = model.NewDBError(CrashHashDBName, CrashHashCollName, model.NOT_OPEN)
|
||||||
)
|
)
|
||||||
|
|
||||||
func CrashHashCollection() *mongo.Collection {
|
func CrashHashCollection() *mongo.Collection {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
var (
|
var (
|
||||||
CrashHashAtomDBName = "user"
|
CrashHashAtomDBName = "user"
|
||||||
CrashHashAtomCollName = "user_crashhashatom"
|
CrashHashAtomCollName = "user_crashhashatom"
|
||||||
ErrHashAtomDBNotOpen = model.NewDBError(CrashHashAtomDBName, CrashHashAtomCollName, model.NotOpen)
|
ErrHashAtomDBNotOpen = model.NewDBError(CrashHashAtomDBName, CrashHashAtomCollName, model.NOT_OPEN)
|
||||||
)
|
)
|
||||||
|
|
||||||
func CrashHashAtomCollection() *mongo.Collection {
|
func CrashHashAtomCollection() *mongo.Collection {
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,7 @@ func InsertAnnouncerLog(logs ...*model.AnnouncerLog) (err error) {
|
||||||
// 取最新100条数据
|
// 取最新100条数据
|
||||||
func FetchAnnouncerLog(plt string) (recs []model.AnnouncerLog, err error) {
|
func FetchAnnouncerLog(plt string) (recs []model.AnnouncerLog, err error) {
|
||||||
query := bson.M{}
|
query := bson.M{}
|
||||||
c := AnnouncerLogCollection(plt)
|
err = AnnouncerLogCollection(plt).Find(query).Sort("-_id").Limit(100).All(&recs)
|
||||||
if c == nil {
|
|
||||||
return recs, AnnouncerLogDBErr
|
|
||||||
}
|
|
||||||
err = c.Find(query).Sort("-_id").Limit(100).All(&recs)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,7 @@ func AwardLogCollection(plt string) *mongo.Collection {
|
||||||
}
|
}
|
||||||
|
|
||||||
func FetchAwardLog(plt string) (recs model.AwardLog, err error) {
|
func FetchAwardLog(plt string) (recs model.AwardLog, err error) {
|
||||||
c := AwardLogCollection(plt)
|
err = AwardLogCollection(plt).Find(bson.M{}).One(&recs)
|
||||||
if c == nil {
|
|
||||||
return recs, AwardLogDBErr
|
|
||||||
}
|
|
||||||
err = c.Find(bson.M{}).One(&recs)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,15 +147,7 @@ func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs
|
||||||
logger.Logger.Error("GetInviteRankList find player is error", err)
|
logger.Logger.Error("GetInviteRankList find player is error", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
//机器人库
|
|
||||||
robotPlayer := AccountCollection(mongo.G_P)
|
|
||||||
var robotPlayerList []PInfo
|
|
||||||
err = robotPlayer.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&robotPlayerList)
|
|
||||||
if err != nil {
|
|
||||||
logger.Logger.Error("GetInviteRankList find player is error", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
retPlayerList = append(retPlayerList, robotPlayerList...)
|
|
||||||
for _, inviteInfo := range list {
|
for _, inviteInfo := range list {
|
||||||
for _, playerData := range retPlayerList {
|
for _, playerData := range retPlayerList {
|
||||||
if inviteInfo.SnId == playerData.SnId {
|
if inviteInfo.SnId == playerData.SnId {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import (
|
||||||
var (
|
var (
|
||||||
JybDBName = "log"
|
JybDBName = "log"
|
||||||
JybCollName = "log_jyb"
|
JybCollName = "log_jyb"
|
||||||
ErrJybDBNotOpen = model.NewDBError(JybDBName, JybCollName, model.NotOpen)
|
ErrJybDBNotOpen = model.NewDBError(JybDBName, JybCollName, model.NOT_OPEN)
|
||||||
)
|
)
|
||||||
|
|
||||||
func JybCollection(plt string) *mongo.Collection {
|
func JybCollection(plt string) *mongo.Collection {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import (
|
||||||
var (
|
var (
|
||||||
JybUserDBName = "log"
|
JybUserDBName = "log"
|
||||||
JybUserCollName = "log_jybuser"
|
JybUserCollName = "log_jybuser"
|
||||||
ErrJybUserDBNotOpen = model.NewDBError(JybUserDBName, JybUserCollName, model.NotOpen)
|
ErrJybUserDBNotOpen = model.NewDBError(JybUserDBName, JybUserCollName, model.NOT_OPEN)
|
||||||
)
|
)
|
||||||
|
|
||||||
func JybuserCollection(plt string) *mongo.Collection {
|
func JybuserCollection(plt string) *mongo.Collection {
|
||||||
|
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
||||||
package svc
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"net/rpc"
|
|
||||||
|
|
||||||
"github.com/globalsign/mgo"
|
|
||||||
"github.com/globalsign/mgo/bson"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/dbproxy/mongo"
|
|
||||||
"mongo.games.com/game/model"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
LotteryCodeDBErr = errors.New("log_lotterycode db open failed.")
|
|
||||||
)
|
|
||||||
|
|
||||||
func LotteryCodeCollection(plt string) *mongo.Collection {
|
|
||||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.LotteryCodeDBName)
|
|
||||||
if s != nil {
|
|
||||||
c, first := s.DB().C(model.LotteryCodeCollName)
|
|
||||||
if first {
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"snid", "index"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"cid"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"startts"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-startts"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"code"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"index"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-index"}, Background: true, Sparse: true})
|
|
||||||
}
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpsertLotteryCode 记录玩家抽奖活动开奖码
|
|
||||||
func UpsertLotteryCode(plt string, item *model.LotteryCode) (err error) {
|
|
||||||
c := LotteryCodeCollection(plt)
|
|
||||||
if c == nil {
|
|
||||||
return LotteryCodeDBErr
|
|
||||||
}
|
|
||||||
_, err = c.Upsert(bson.M{"snid": item.SnId, "cid": item.CId, "startts": item.StartTs}, item)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetLotteryCode 获取玩家抽奖活动开奖码
|
|
||||||
func GetLotteryCode(plt string, cid int64, startTs int64, code string) (*model.LotteryCode, error) {
|
|
||||||
c := LotteryCodeCollection(plt)
|
|
||||||
if c == nil {
|
|
||||||
return nil, LotteryCodeDBErr
|
|
||||||
}
|
|
||||||
var ret model.LotteryCode
|
|
||||||
err := c.Find(bson.M{"code": code, "cid": cid, "startts": startTs}).One(&ret)
|
|
||||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &ret, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type LotteryCodeSvc struct{}
|
|
||||||
|
|
||||||
func (svc *LotteryCodeSvc) Upsert(req *model.UpsertLotteryCodeReq, ret *bool) (err error) {
|
|
||||||
err = UpsertLotteryCode(req.Platform, req.Item)
|
|
||||||
*ret = err == nil
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (svc *LotteryCodeSvc) Get(req *model.GetLotteryCodeReq, resp *model.GetLotteryCodeResp) (err error) {
|
|
||||||
resp.Item, err = GetLotteryCode(req.Platform, req.CId, req.StartTs, req.Code)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (svc *LotteryCodeSvc) GetJoinNum(req *model.GetLotteryCodeReq, resp *int) (err error) {
|
|
||||||
c := LotteryCodeCollection(req.Platform)
|
|
||||||
if c == nil {
|
|
||||||
return LotteryCodeDBErr
|
|
||||||
}
|
|
||||||
type m struct {
|
|
||||||
Count int64 `bson:"count"`
|
|
||||||
}
|
|
||||||
tc := new(m)
|
|
||||||
err = c.Pipe([]bson.M{
|
|
||||||
{"$match": bson.M{"snid": bson.M{"$gt": 0}, "cid": req.CId, "startts": req.StartTs}},
|
|
||||||
{"$group": bson.M{"_id": bson.M{"snid": "$snid"}}},
|
|
||||||
{"$count": "count"},
|
|
||||||
}).AllowDiskUse().One(tc)
|
|
||||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
|
||||||
logger.Logger.Warn("GetJoinNum error:", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
*resp = int(tc.Count)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (svc *LotteryCodeSvc) GetRandom(req *model.GetLotteryCodeRandomReq, ret *model.GetLotteryCodeResp) error {
|
|
||||||
c := LotteryCodeCollection(req.Platform)
|
|
||||||
if c == nil {
|
|
||||||
return LotteryCodeDBErr
|
|
||||||
}
|
|
||||||
where := bson.M{"cid": req.CId, "startts": req.StartTs}
|
|
||||||
switch req.Tp {
|
|
||||||
case 1:
|
|
||||||
where["snid"] = 0
|
|
||||||
where["index"] = req.Index
|
|
||||||
case 2:
|
|
||||||
where["code"] = fmt.Sprintf("%v", req.Index)
|
|
||||||
case 3:
|
|
||||||
where["snid"] = bson.M{"$gt": 0}
|
|
||||||
where["index"] = req.Index
|
|
||||||
}
|
|
||||||
if err := c.Find(where).One(&ret.Item); err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
rpc.Register(new(LotteryCodeSvc))
|
|
||||||
}
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
package svc
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/rpc"
|
|
||||||
|
|
||||||
"github.com/globalsign/mgo"
|
|
||||||
"github.com/globalsign/mgo/bson"
|
|
||||||
|
|
||||||
"mongo.games.com/game/dbproxy/mongo"
|
|
||||||
"mongo.games.com/game/model"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
LotteryDataDBErr = errors.New("log_lotterydata db open failed.")
|
|
||||||
)
|
|
||||||
|
|
||||||
func LotteryDataCollection(plt string) *mongo.Collection {
|
|
||||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.LotteryDataDBName)
|
|
||||||
if s != nil {
|
|
||||||
c, first := s.DB().C(model.LotteryDataCollName)
|
|
||||||
if first {
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"cid"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"startts"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-startts"}, Background: true, Sparse: true})
|
|
||||||
}
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetLotteryData(plt string) ([]*model.LotteryData, error) {
|
|
||||||
clog := LotteryDataCollection(plt)
|
|
||||||
if clog == nil {
|
|
||||||
return nil, LotteryDataDBErr
|
|
||||||
}
|
|
||||||
var logs []*model.LotteryData
|
|
||||||
err := clog.Find(nil).All(&logs)
|
|
||||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return logs, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func UpsertLotteryData(plt string, arr []*model.LotteryData) error {
|
|
||||||
clog := LotteryDataCollection(plt)
|
|
||||||
if clog == nil {
|
|
||||||
return LotteryDataDBErr
|
|
||||||
}
|
|
||||||
for _, log := range arr {
|
|
||||||
_, err := clog.Upsert(bson.M{"cid": log.CId, "startts": log.StartTs}, log)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type LotteryDataSvc struct{}
|
|
||||||
|
|
||||||
func (s *LotteryDataSvc) Get(req *model.GetLotteryDataReq, reply *model.GetLotteryDataResp) (err error) {
|
|
||||||
reply.Data, err = GetLotteryData(req.Platform)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *LotteryDataSvc) Upsert(req *model.UpsertLotteryDataReq, reply *bool) (err error) {
|
|
||||||
err = UpsertLotteryData(req.Platform, req.Data)
|
|
||||||
*reply = err == nil
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *LotteryDataSvc) Del(req *model.DelLotteryDataReq, reply *bool) (err error) {
|
|
||||||
clog := LotteryDataCollection(req.Platform)
|
|
||||||
if clog == nil {
|
|
||||||
err = LotteryDataDBErr
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err = clog.Remove(bson.M{"cid": req.CId})
|
|
||||||
*reply = err == nil
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
rpc.Register(new(LotteryDataSvc))
|
|
||||||
}
|
|
||||||
|
|
@ -7,41 +7,43 @@ import (
|
||||||
|
|
||||||
"github.com/globalsign/mgo"
|
"github.com/globalsign/mgo"
|
||||||
"github.com/globalsign/mgo/bson"
|
"github.com/globalsign/mgo/bson"
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/dbproxy/mongo"
|
"mongo.games.com/game/dbproxy/mongo"
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
|
"mongo.games.com/goserver/core/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
LotteryLogDBErr = errors.New("log_lottery db open failed.")
|
LotteryLogDBErr = errors.New("log_lottery db open failed.")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const LotteryLogMaxLimitPerQuery = 100
|
||||||
|
|
||||||
func LotteryLogsCollection(plt string) *mongo.Collection {
|
func LotteryLogsCollection(plt string) *mongo.Collection {
|
||||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.LotteryLogDBName)
|
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.LotteryLogDBName)
|
||||||
if s != nil {
|
if s != nil {
|
||||||
c, first := s.DB().C(model.LotteryLogCollName)
|
c, first := s.DB().C(model.LotteryLogCollName)
|
||||||
if first {
|
if first {
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"cid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"ctime"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"gameid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-ctime"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"num"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"playernum"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"code"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"isrobot"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"ismust"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func InsertLotteryLogs(plt string, logs ...*model.LotteryLog) (err error) {
|
func InsertLotteryLog(log *model.LotteryLog) error {
|
||||||
clog := LotteryLogsCollection(plt)
|
err := LotteryLogsCollection(log.Platform).Insert(log)
|
||||||
|
if err != nil {
|
||||||
|
logger.Logger.Info("InsertLotteryLog error:", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func InsertLotteryLogs(logs ...*model.LotteryLog) (err error) {
|
||||||
|
clog := LotteryLogsCollection(logs[0].Platform)
|
||||||
if clog == nil {
|
if clog == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -64,36 +66,42 @@ func InsertLotteryLogs(plt string, logs ...*model.LotteryLog) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetLotteryLogs(plt string, count int) (ret []*model.LotteryLog, err error) {
|
func RemoveLotteryLog(plt string, ts time.Time) (*mgo.ChangeInfo, error) {
|
||||||
clog := LotteryLogsCollection(plt)
|
return LotteryLogsCollection(plt).RemoveAll(bson.M{"time": bson.M{"$lt": ts}})
|
||||||
if clog == nil {
|
}
|
||||||
return nil, LotteryLogDBErr
|
|
||||||
}
|
func GetLotteryLogBySnidAndLessTs(plt string, id int32, ts time.Time) (ret []model.LotteryLog, err error) {
|
||||||
err = clog.Find(bson.M{"ts": bson.M{"$lt": time.Now().Unix()}}).Sort("-ts").Limit(count).All(&ret)
|
err = LotteryLogsCollection(plt).Find(bson.M{"snid": id, "time": bson.M{"$lt": ts}}).Limit(LotteryLogMaxLimitPerQuery).All(&ret)
|
||||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
return
|
||||||
return nil, err
|
}
|
||||||
|
|
||||||
|
type LotteryLogSvc struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (svc *LotteryLogSvc) InsertLotteryLogs(args []*model.LotteryLog, ret *bool) (err error) {
|
||||||
|
err = InsertLotteryLogs(args...)
|
||||||
|
if err == nil {
|
||||||
|
*ret = true
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
type LotteryLogSvc struct{}
|
func (svc *LotteryLogSvc) InsertLotteryLog(args *model.LotteryLog, ret *bool) (err error) {
|
||||||
|
err = InsertLotteryLog(args)
|
||||||
func (svc *LotteryLogSvc) GetLotteryLogs(req *model.GetLotteryLogReq, ret *model.GetLotteryLogResp) (err error) {
|
if err == nil {
|
||||||
ret.LotteryLog, err = GetLotteryLogs(req.Platform, req.Num)
|
*ret = true
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *LotteryLogSvc) UpdateMedia(req *model.UpdateLotteryMediaReq, ret *bool) error {
|
func (svc *LotteryLogSvc) RemoveLotteryLog(args *model.RemoveLotteryLogArgs, ret **mgo.ChangeInfo) (err error) {
|
||||||
clog := LotteryLogsCollection(req.Platform)
|
*ret, err = RemoveLotteryLog(args.Plt, args.Ts)
|
||||||
if clog == nil {
|
return
|
||||||
return LotteryLogDBErr
|
}
|
||||||
}
|
|
||||||
err := clog.Update(bson.M{"_id": bson.ObjectIdHex(req.LogId)}, bson.M{"$set": bson.M{"media": req.Media}})
|
func (svc *LotteryLogSvc) GetLotteryLogBySnidAndLessTs(args *model.GetLotteryLogBySnidAndLessTsArgs, ret *[]model.LotteryLog) (err error) {
|
||||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
*ret, err = GetLotteryLogBySnidAndLessTs(args.Plt, args.Id, args.Ts)
|
||||||
return err
|
return
|
||||||
}
|
|
||||||
*ret = true
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package svc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/rpc"
|
|
||||||
|
|
||||||
"github.com/globalsign/mgo"
|
"github.com/globalsign/mgo"
|
||||||
"github.com/globalsign/mgo/bson"
|
"github.com/globalsign/mgo/bson"
|
||||||
|
|
@ -53,17 +52,4 @@ func SaveRankInvite(data *model.RankInvite) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type RankInviteSvc struct {
|
//todo 每周清理数据
|
||||||
}
|
|
||||||
|
|
||||||
func (svc *RankInviteSvc) SaveRankInvite(data *model.RankInvite, ret *bool) (err error) {
|
|
||||||
err = SaveRankInvite(data)
|
|
||||||
if err == nil {
|
|
||||||
*ret = true
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
rpc.Register(new(RankInviteSvc))
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ var (
|
||||||
AccountDBName = "user"
|
AccountDBName = "user"
|
||||||
AccountCollName = "user_account"
|
AccountCollName = "user_account"
|
||||||
AccountDelBackupCollName = "user_account_del_backup"
|
AccountDelBackupCollName = "user_account_del_backup"
|
||||||
ErrAccDBNotOpen = model.NewDBError(AccountDBName, AccountCollName, model.NotOpen)
|
ErrAccDBNotOpen = model.NewDBError(AccountDBName, AccountCollName, model.NOT_OPEN)
|
||||||
)
|
)
|
||||||
|
|
||||||
func AccountCollection(plt string) *mongo.Collection {
|
func AccountCollection(plt string) *mongo.Collection {
|
||||||
|
|
@ -550,7 +550,7 @@ func (svc *AccountSvc) GetRobotAccounts(limit int, accs *[]model.Account) error
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
*accs = make([]model.Account, 0, limit)
|
*accs = make([]model.Account, 0, limit)
|
||||||
err := caccounts.Find(bson.M{"platform": common.Platform_Rob}).Limit(limit).All(accs)
|
err := caccounts.Find(bson.M{"platform": common.Platform_Rob}).Limit(limit).All(&accs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Info("GetAllRobotAccounts error:", err)
|
logger.Logger.Info("GetAllRobotAccounts error:", err)
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import (
|
||||||
var (
|
var (
|
||||||
BagDBName = "user"
|
BagDBName = "user"
|
||||||
BagCollName = "user_bag"
|
BagCollName = "user_bag"
|
||||||
ErrBagDBNotOpen = model.NewDBError(BagDBName, BagCollName, model.NotOpen)
|
ErrBagDBNotOpen = model.NewDBError(BagDBName, BagCollName, model.NOT_OPEN)
|
||||||
)
|
)
|
||||||
|
|
||||||
func BagCollection(plt string) *mongo.Collection {
|
func BagCollection(plt string) *mongo.Collection {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"net/rpc"
|
"net/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrHorseRaceLampDBNotOpen = model.NewDBError(model.HorseRaceLampDBName, model.HorseRaceLampCollName, model.NotOpen)
|
var ErrHorseRaceLampDBNotOpen = model.NewDBError(model.HorseRaceLampDBName, model.HorseRaceLampCollName, model.NOT_OPEN)
|
||||||
|
|
||||||
func HorseRaceLampCollection(plt string) *mongo.Collection {
|
func HorseRaceLampCollection(plt string) *mongo.Collection {
|
||||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.HorseRaceLampDBName)
|
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.HorseRaceLampDBName)
|
||||||
|
|
@ -41,7 +41,6 @@ func (svc *HorseRaceLampSvc) GetAllHorseRaceLamp(args string, ret *[]model.Horse
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *HorseRaceLampSvc) GetHorseRaceLamp(args *model.GetHorseRaceLampArgs, ret *model.HorseRaceLamp) (err error) {
|
func (svc *HorseRaceLampSvc) GetHorseRaceLamp(args *model.GetHorseRaceLampArgs, ret *model.HorseRaceLamp) (err error) {
|
||||||
c := HorseRaceLampCollection(args.Platform)
|
c := HorseRaceLampCollection(args.Platform)
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
|
@ -50,7 +49,6 @@ func (svc *HorseRaceLampSvc) GetHorseRaceLamp(args *model.GetHorseRaceLampArgs,
|
||||||
err = c.Find(bson.M{"_id": args.Id}).One(ret)
|
err = c.Find(bson.M{"_id": args.Id}).One(ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *HorseRaceLampSvc) RemoveHorseRaceLamp(args *model.RemoveHorseRaceLampArg, ret *bool) error {
|
func (svc *HorseRaceLampSvc) RemoveHorseRaceLamp(args *model.RemoveHorseRaceLampArg, ret *bool) error {
|
||||||
logger.Logger.Info("HorseRaceLampSvc RemoveHorseRaceLamp")
|
logger.Logger.Info("HorseRaceLampSvc RemoveHorseRaceLamp")
|
||||||
c := HorseRaceLampCollection(args.Platform)
|
c := HorseRaceLampCollection(args.Platform)
|
||||||
|
|
@ -63,7 +61,6 @@ func (svc *HorseRaceLampSvc) RemoveHorseRaceLamp(args *model.RemoveHorseRaceLamp
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *HorseRaceLampSvc) InsertHorseRaceLamp(args *model.InsertHorseRaceLampArgs, ret *bool) (err error) {
|
func (svc *HorseRaceLampSvc) InsertHorseRaceLamp(args *model.InsertHorseRaceLampArgs, ret *bool) (err error) {
|
||||||
c := HorseRaceLampCollection(args.Platform)
|
c := HorseRaceLampCollection(args.Platform)
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
|
|
||||||
|
|
@ -2,63 +2,44 @@ package svc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/rpc"
|
|
||||||
|
|
||||||
"github.com/globalsign/mgo"
|
"github.com/globalsign/mgo"
|
||||||
"github.com/globalsign/mgo/bson"
|
|
||||||
|
|
||||||
"mongo.games.com/game/dbproxy/mongo"
|
"mongo.games.com/game/dbproxy/mongo"
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
|
"mongo.games.com/goserver/core/logger"
|
||||||
|
"net/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
LotteryDBErr = errors.New("user_coinlog db open failed.")
|
LotteryDBErr = errors.New("user_coinlog db open failed.")
|
||||||
)
|
)
|
||||||
|
|
||||||
func LotteryCollection(plt string) *mongo.Collection {
|
func LotteryCollection() *mongo.Collection {
|
||||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.LotteryDBName)
|
s := mongo.MgoSessionMgrSington.GetPltMgoSession(mongo.G_P, model.LotteryDBName)
|
||||||
if s != nil {
|
if s != nil {
|
||||||
c, first := s.DB().C(model.LotteryCollName)
|
c, first := s.DB().C(model.LotteryCollName)
|
||||||
if first {
|
if first {
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"platform"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"cid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-time"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetLottery(plt string, snid int32, cid int64, startts int64) (ret []*model.Lottery, err error) {
|
func GetAllLottery() (ret []model.Lottery, err error) {
|
||||||
c := LotteryCollection(plt)
|
err = LotteryCollection().Find(nil).All(&ret)
|
||||||
if c == nil {
|
|
||||||
return nil, LotteryDBErr
|
|
||||||
}
|
|
||||||
where := bson.M{"snid": snid}
|
|
||||||
if cid > 0 {
|
|
||||||
where["cid"] = cid
|
|
||||||
}
|
|
||||||
if startts > 0 {
|
|
||||||
where["startts"] = bson.M{"$gte": startts}
|
|
||||||
}
|
|
||||||
err = c.Find(where).All(&ret)
|
|
||||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func UpsertLottery(plt string, item []*model.Lottery) (err error) {
|
func UpsertLottery(item *model.Lottery) (err error) {
|
||||||
c := LotteryCollection(plt)
|
c := LotteryCollection()
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return LotteryDBErr
|
return
|
||||||
}
|
}
|
||||||
for _, v := range item {
|
_, err = c.UpsertId(item.Id, item)
|
||||||
_, err = c.Upsert(bson.M{"snid": v.SnId, "cid": v.CId}, v)
|
if err != nil {
|
||||||
if err != nil {
|
logger.Logger.Warn("UpsertLottery error:", err)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -66,13 +47,13 @@ func UpsertLottery(plt string, item []*model.Lottery) (err error) {
|
||||||
type LotterySvc struct {
|
type LotterySvc struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *LotterySvc) Get(req *model.GetLotteryReq, ret *model.GetLotteryResp) (err error) {
|
func (svc *LotterySvc) GetAllLottery(args struct{}, ret *[]model.Lottery) (err error) {
|
||||||
ret.Lottery, err = GetLottery(req.Platform, req.SnId, req.CId, req.StartTs)
|
*ret, err = GetAllLottery()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *LotterySvc) Upsert(req *model.UpsertLotteryReq, ret *bool) (err error) {
|
func (svc *LotterySvc) UpsertLottery(args *model.Lottery, ret *bool) (err error) {
|
||||||
err = UpsertLottery(req.Platform, req.Lottery)
|
err = UpsertLottery(args)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
*ret = true
|
*ret = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ var (
|
||||||
PlayerBucketIdsDBName = "user"
|
PlayerBucketIdsDBName = "user"
|
||||||
PlayerBucketIdsCollName = "user_bucketids"
|
PlayerBucketIdsCollName = "user_bucketids"
|
||||||
PlayerBucketIdsAutoId = bson.ObjectIdHex("60f69b4a09dbe3323c632f25") // 记录id使用到多少了
|
PlayerBucketIdsAutoId = bson.ObjectIdHex("60f69b4a09dbe3323c632f25") // 记录id使用到多少了
|
||||||
ErrPlayerBucketIdsDBNotOpen = model.NewDBError(PlayerBucketIdsDBName, PlayerBucketIdsCollName, model.NotOpen)
|
ErrPlayerBucketIdsDBNotOpen = model.NewDBError(PlayerBucketIdsDBName, PlayerBucketIdsCollName, model.NOT_OPEN)
|
||||||
playerBucketId = &model.PlayerBucketId{}
|
playerBucketId = &model.PlayerBucketId{}
|
||||||
playerBucketIdsCursor = int32(0)
|
playerBucketIdsCursor = int32(0)
|
||||||
playerBucketIdLock = sync.Mutex{}
|
playerBucketIdLock = sync.Mutex{}
|
||||||
|
|
|
||||||
|
|
@ -30,23 +30,20 @@ const (
|
||||||
ETCDKEY_PLAYERPOOL = "/game/plt/playerpool/" // 个人水池调控配置
|
ETCDKEY_PLAYERPOOL = "/game/plt/playerpool/" // 个人水池调控配置
|
||||||
ETCDKEY_GAME_CONFIG = "/game/plt/gameconfig/" // 游戏管理/全局配置
|
ETCDKEY_GAME_CONFIG = "/game/plt/gameconfig/" // 游戏管理/全局配置
|
||||||
ETCDKEY_ACT_PHONELOTTERY = "/game/act_phoneLottery"
|
ETCDKEY_ACT_PHONELOTTERY = "/game/act_phoneLottery"
|
||||||
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
|
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
|
||||||
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
|
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
|
||||||
ETCDKEY_ACT_Permit = "/game/act_permit" // 赛季通行证配置
|
ETCDKEY_ACT_Permit = "/game/act_permit" // 赛季通行证配置
|
||||||
ETCDKEY_DIAMOND_LOTTERY = "/game/diamond_lottery" // 钻石抽奖配置
|
ETCDKEY_DIAMOND_LOTTERY = "/game/diamond_lottery" // 钻石抽奖配置
|
||||||
ETCDKEY_Item = "/game/item" // 道具列表
|
ETCDKEY_Item = "/game/item" // 道具列表
|
||||||
ETCDKEY_SKin = "/game/skin_config" // 皮肤配置
|
ETCDKEY_SKin = "/game/skin_config" // 皮肤配置
|
||||||
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
|
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
|
||||||
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
|
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
|
||||||
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
|
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
|
||||||
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
|
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
|
||||||
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
|
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
|
||||||
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
|
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
|
||||||
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
|
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
|
||||||
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
|
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
|
||||||
ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
|
ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
|
||||||
ETCDKEY_ClientUpgrade = "/game/client_upgrade" // 客户端升级奖励配置
|
ETCDKEY_ClientUpgrade = "/game/client_upgrade" // 客户端升级奖励配置
|
||||||
ETCDKEY_PopUpWindow = "/game/PopUpWindowConfig" //弹窗配置
|
|
||||||
ETCDKEY_LotteryConfig = "/game/lottery" //抽奖配置
|
|
||||||
ETCDKEY_LotteryUser = "/game/user_lottery" //抽奖用户必中配置
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ const (
|
||||||
|
|
||||||
ClawDollSceneGrapTimeOut = time.Second * 5 //下抓防卡死强制变状态倒计时
|
ClawDollSceneGrapTimeOut = time.Second * 5 //下抓防卡死强制变状态倒计时
|
||||||
ClawDollScenePayCoinTimeOut = time.Second * 2 //投币防卡死强制变状态倒计时
|
ClawDollScenePayCoinTimeOut = time.Second * 2 //投币防卡死强制变状态倒计时
|
||||||
|
|
||||||
ClawDollSceneExceptTimeOut = time.Second * 80 //
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 玩家操作
|
// 玩家操作
|
||||||
|
|
@ -75,5 +73,3 @@ const (
|
||||||
Zego_ForbidRTCStream = iota + 1
|
Zego_ForbidRTCStream = iota + 1
|
||||||
Zego_ResumeRTCStream = iota + 1
|
Zego_ResumeRTCStream = iota + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
var DebugSwitch bool = false
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
// 房间类型
|
|
||||||
const (
|
|
||||||
RoomMode_Classic int = iota //经典
|
|
||||||
RoomMode_Max
|
|
||||||
)
|
|
||||||
|
|
||||||
// 场景状态
|
|
||||||
const (
|
|
||||||
FortuneDragonStateStart int = iota //默认状态
|
|
||||||
FortuneDragonStateMax
|
|
||||||
)
|
|
||||||
|
|
||||||
// 玩家操作
|
|
||||||
const (
|
|
||||||
FortuneDragonPlayerOpStart int = iota
|
|
||||||
FortuneDragonPlayerOpSwitch
|
|
||||||
)
|
|
||||||
const NowByte int64 = 10000
|
|
||||||
|
|
||||||
const GameDataKey = "FortuneData"
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package fortunerabbit
|
|
||||||
|
|
||||||
// 房间类型
|
|
||||||
const (
|
|
||||||
RoomMode_Classic int = iota //经典
|
|
||||||
RoomMode_Max
|
|
||||||
)
|
|
||||||
|
|
||||||
// 场景状态
|
|
||||||
const (
|
|
||||||
FortuneRabbitStateStart int = iota //默认状态
|
|
||||||
FortuneRabbitStateMax
|
|
||||||
)
|
|
||||||
|
|
||||||
// 玩家操作
|
|
||||||
const (
|
|
||||||
FortuneRabbitPlayerOpStart int = iota
|
|
||||||
FortuneRabbitPlayerOpSwitch
|
|
||||||
)
|
|
||||||
const NowByte int64 = 10000
|
|
||||||
|
|
||||||
const GameDataKey = "FortuneData"
|
|
||||||
|
|
@ -631,7 +631,7 @@ func GetPressCards(cards, lastCards []int32, data *tienlenApi.PredictRequest, po
|
||||||
})
|
})
|
||||||
isWin := data.IsWin
|
isWin := data.IsWin
|
||||||
//测试代码
|
//测试代码
|
||||||
isWin = true
|
//isWin = false
|
||||||
logger.Logger.Trace("压牌 调控输赢 isWin = ", isWin)
|
logger.Logger.Trace("压牌 调控输赢 isWin = ", isWin)
|
||||||
outCards := []int32{}
|
outCards := []int32{}
|
||||||
//压牌测试代码
|
//压牌测试代码
|
||||||
|
|
@ -1734,7 +1734,7 @@ func GetOutCards(cards []int32, data *tienlenApi.PredictRequest, pos int32) []in
|
||||||
})
|
})
|
||||||
isWin := data.IsWin
|
isWin := data.IsWin
|
||||||
//测试代码
|
//测试代码
|
||||||
isWin = true
|
//isWin = false
|
||||||
logger.Logger.Trace("出牌 调控输赢 isWin = ", isWin)
|
logger.Logger.Trace("出牌 调控输赢 isWin = ", isWin)
|
||||||
//测试代码
|
//测试代码
|
||||||
//cards = []int32{51, 4, 5}
|
//cards = []int32{51, 4, 5}
|
||||||
|
|
|
||||||
|
|
@ -52,17 +52,17 @@ type BaseAI struct {
|
||||||
attribute map[interface{}]interface{}
|
attribute map[interface{}]interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 挂载玩家
|
//挂载玩家
|
||||||
func (b *BaseAI) SetOwner(p *Player) {
|
func (b *BaseAI) SetOwner(p *Player) {
|
||||||
b.owner = p
|
b.owner = p
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取挂载玩家
|
//获取挂载玩家
|
||||||
func (b *BaseAI) GetOwner() *Player {
|
func (b *BaseAI) GetOwner() *Player {
|
||||||
return b.owner
|
return b.owner
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取属性
|
//获取属性
|
||||||
func (b *BaseAI) GetAttribute(key interface{}) (interface{}, bool) {
|
func (b *BaseAI) GetAttribute(key interface{}) (interface{}, bool) {
|
||||||
if b.attribute != nil {
|
if b.attribute != nil {
|
||||||
v, ok := b.attribute[key]
|
v, ok := b.attribute[key]
|
||||||
|
|
@ -71,29 +71,29 @@ func (b *BaseAI) GetAttribute(key interface{}) (interface{}, bool) {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置属性
|
//设置属性
|
||||||
func (b *BaseAI) SetAttribute(key, val interface{}) {
|
func (b *BaseAI) SetAttribute(key, val interface{}) {
|
||||||
if b.attribute != nil {
|
if b.attribute != nil {
|
||||||
b.attribute[key] = val
|
b.attribute[key] = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开启事件
|
//开启事件
|
||||||
func (b *BaseAI) OnStart() {
|
func (b *BaseAI) OnStart() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭事件
|
//关闭事件
|
||||||
func (b *BaseAI) OnStop() {
|
func (b *BaseAI) OnStop() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 心跳事件
|
//心跳事件
|
||||||
func (b *BaseAI) OnTick(s *Scene) {
|
func (b *BaseAI) OnTick(s *Scene) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自己进入事件
|
//自己进入事件
|
||||||
func (b *BaseAI) OnSelfEnter(s *Scene, p *Player) {
|
func (b *BaseAI) OnSelfEnter(s *Scene, p *Player) {
|
||||||
if !p.IsLocal {
|
if !p.IsLocal {
|
||||||
return
|
return
|
||||||
|
|
@ -108,72 +108,72 @@ func (b *BaseAI) OnSelfEnter(s *Scene, p *Player) {
|
||||||
p.LastSyncCoin = p.Coin
|
p.LastSyncCoin = p.Coin
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自己离开事件
|
//自己离开事件
|
||||||
func (b *BaseAI) OnSelfLeave(s *Scene, p *Player, reason int) {
|
func (b *BaseAI) OnSelfLeave(s *Scene, p *Player, reason int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家进入事件
|
//其他玩家进入事件
|
||||||
func (b *BaseAI) OnPlayerEnter(s *Scene, p *Player) {
|
func (b *BaseAI) OnPlayerEnter(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家离开事件
|
//其他玩家离开事件
|
||||||
func (b *BaseAI) OnPlayerLeave(s *Scene, p *Player, reason int) {
|
func (b *BaseAI) OnPlayerLeave(s *Scene, p *Player, reason int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家掉线
|
//其他玩家掉线
|
||||||
func (b *BaseAI) OnPlayerDropLine(s *Scene, p *Player) {
|
func (b *BaseAI) OnPlayerDropLine(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家重连
|
//其他玩家重连
|
||||||
func (b *BaseAI) OnPlayerRehold(s *Scene, p *Player) {
|
func (b *BaseAI) OnPlayerRehold(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家 返回房间
|
//其他玩家 返回房间
|
||||||
func (b *BaseAI) OnPlayerReturn(s *Scene, p *Player) {
|
func (b *BaseAI) OnPlayerReturn(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家操作事件
|
//其他玩家操作事件
|
||||||
func (b *BaseAI) OnPlayerOp(s *Scene, p *Player, opcode int, params []int64) bool {
|
func (b *BaseAI) OnPlayerOp(s *Scene, p *Player, opcode int, params []int64) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家操作事件
|
//其他玩家操作事件
|
||||||
func (b *BaseAI) OnPlayerOperate(s *Scene, p *Player, params interface{}) bool {
|
func (b *BaseAI) OnPlayerOperate(s *Scene, p *Player, params interface{}) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他玩家事件
|
//其他玩家事件
|
||||||
func (b *BaseAI) OnPlayerEvent(s *Scene, p *Player, evtcode int, params []int64) {
|
func (b *BaseAI) OnPlayerEvent(s *Scene, p *Player, evtcode int, params []int64) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 观众进入事件
|
//观众进入事件
|
||||||
func (b *BaseAI) OnAudienceEnter(s *Scene, p *Player) {
|
func (b *BaseAI) OnAudienceEnter(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 观众离开事件
|
//观众离开事件
|
||||||
func (b *BaseAI) OnAudienceLeave(s *Scene, p *Player, reason int) {
|
func (b *BaseAI) OnAudienceLeave(s *Scene, p *Player, reason int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 观众坐下事件
|
//观众坐下事件
|
||||||
func (b *BaseAI) OnAudienceSit(s *Scene, p *Player) {
|
func (b *BaseAI) OnAudienceSit(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 观众掉线事件
|
//观众掉线事件
|
||||||
func (b *BaseAI) OnAudienceDropLine(s *Scene, p *Player) {
|
func (b *BaseAI) OnAudienceDropLine(s *Scene, p *Player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 房间状态变化事件
|
//房间状态变化事件
|
||||||
func (b *BaseAI) OnChangeSceneState(s *Scene, oldstate, newstate int) {
|
func (b *BaseAI) OnChangeSceneState(s *Scene, oldstate, newstate int) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1267,7 +1267,6 @@ func (this *Player) GetSkillAdd(id int32) int32 {
|
||||||
// 增加或减少道具
|
// 增加或减少道具
|
||||||
// 同步到 worldsrv
|
// 同步到 worldsrv
|
||||||
func (this *Player) AddItems(args *model.AddItemParam) {
|
func (this *Player) AddItems(args *model.AddItemParam) {
|
||||||
args.IsGame = true
|
|
||||||
changeItem := map[int32]int64{}
|
changeItem := map[int32]int64{}
|
||||||
for _, v := range args.Change {
|
for _, v := range args.Change {
|
||||||
item := srvdata.GameItemMgr.Get(this.Platform, v.ItemId)
|
item := srvdata.GameItemMgr.Get(this.Platform, v.ItemId)
|
||||||
|
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
package base
|
|
||||||
|
|
||||||
import (
|
|
||||||
"sync"
|
|
||||||
"sync/atomic"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SlotsSession struct {
|
|
||||||
sync.RWMutex
|
|
||||||
uid uint64 // binding user id
|
|
||||||
coin int64
|
|
||||||
data map[string]interface{} // session data store
|
|
||||||
lastConnectTime time.Time
|
|
||||||
connectNum uint64
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewSession(uid uint64, coin int64) *SlotsSession {
|
|
||||||
return &SlotsSession{
|
|
||||||
uid: uid,
|
|
||||||
coin: coin,
|
|
||||||
data: make(map[string]interface{}),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) SetLastConnectTime() bool {
|
|
||||||
if time.Now().Sub(s.lastConnectTime) > time.Second {
|
|
||||||
s.connectNum = 1
|
|
||||||
s.lastConnectTime = time.Now()
|
|
||||||
} else {
|
|
||||||
s.connectNum++
|
|
||||||
if s.connectNum > 5 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) GetLastConnectTime() time.Time {
|
|
||||||
return s.lastConnectTime
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) UID() uint64 {
|
|
||||||
return atomic.LoadUint64(&s.uid)
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) Coin() int64 {
|
|
||||||
return atomic.LoadInt64(&s.coin)
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) SetCoin(coin int64) {
|
|
||||||
s.coin = coin
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) Set(key string, value interface{}) {
|
|
||||||
s.Lock()
|
|
||||||
defer s.Unlock()
|
|
||||||
|
|
||||||
if s.data == nil {
|
|
||||||
s.data = make(map[string]interface{})
|
|
||||||
}
|
|
||||||
s.data[key] = value
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) Remove(key string) {
|
|
||||||
s.Lock()
|
|
||||||
defer s.Unlock()
|
|
||||||
|
|
||||||
delete(s.data, key)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *SlotsSession) Value(key string) interface{} {
|
|
||||||
s.RLock()
|
|
||||||
defer s.RUnlock()
|
|
||||||
|
|
||||||
return s.data[key]
|
|
||||||
}
|
|
||||||
func (s *SlotsSession) Bool(key string) bool {
|
|
||||||
s.RLock()
|
|
||||||
defer s.RUnlock()
|
|
||||||
|
|
||||||
v, ok := s.data[key]
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
value, ok := v.(bool)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return value
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package base
|
|
||||||
|
|
||||||
type EnterReq struct {
|
|
||||||
TraceId string `form:"tid"`
|
|
||||||
ThirdName string `json:"tn"`
|
|
||||||
OperatorPlayerSession string `json:"ops"`
|
|
||||||
GameId int64 `json:"gid"`
|
|
||||||
Ts int64 `json:"ts"`
|
|
||||||
IsSimulator bool `json:"is,optional"`
|
|
||||||
}
|
|
||||||
type BetConfig struct {
|
|
||||||
BetChangeList []float64 `json:"bcl"`
|
|
||||||
BetSize []float64 `json:"bs"` //单注
|
|
||||||
BetLevel []int64 `json:"bl"` //下注线数
|
|
||||||
BetLines []int64 `json:"bi"` //可选线数
|
|
||||||
BetType int `json:"bt"` //total计算方式 1.显示成Lines betSize*betLevel*lines (lines)
|
|
||||||
BetSizeIndex int64 `json:"bsi"` //选中的单注下标
|
|
||||||
BetLevelIndex int64 `json:"bli"` //选中的等级下标
|
|
||||||
BetLineIndex int64 `json:"bii"` //选中的线数下标
|
|
||||||
}
|
|
||||||
type TableInfo struct {
|
|
||||||
Coin float64 `json:"c"`
|
|
||||||
BetConfig BetConfig `json:"bc"`
|
|
||||||
}
|
|
||||||
type EnterResp struct {
|
|
||||||
TableInfo TableInfo `json:"ti"`
|
|
||||||
Token string `json:"token"`
|
|
||||||
}
|
|
||||||
type SpinReq struct {
|
|
||||||
TraceId string `form:"tid"`
|
|
||||||
GameId int64 `json:"gid"`
|
|
||||||
BetSizeIndex int64 `json:"bsi"` //选中的单注下标
|
|
||||||
BetLevelIndex int64 `json:"bli"` //选中的等级下标
|
|
||||||
BetLineIndex int64 `json:"bii"` //选中的线数下标
|
|
||||||
Platform string `json:"plf"`
|
|
||||||
BetMode int64 `json:"bm,optional"` //0.常规 1.必中
|
|
||||||
Ts int64 `json:"ts"`
|
|
||||||
}
|
|
||||||
|
|
@ -117,8 +117,6 @@ func (this *PlayerEx) CostPlayCoin() bool {
|
||||||
GameFreeId: int64(sceneEx.GetGameFreeId()),
|
GameFreeId: int64(sceneEx.GetGameFreeId()),
|
||||||
})
|
})
|
||||||
|
|
||||||
sceneEx.PayCoinCount++
|
|
||||||
|
|
||||||
logger.Logger.Tracef("Clawdoll (*PlayerEx) CostPlayCoin, items = %v", items)
|
logger.Logger.Tracef("Clawdoll (*PlayerEx) CostPlayCoin, items = %v", items)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import (
|
||||||
"mongo.games.com/game/common"
|
"mongo.games.com/game/common"
|
||||||
rule "mongo.games.com/game/gamerule/clawdoll"
|
rule "mongo.games.com/game/gamerule/clawdoll"
|
||||||
"mongo.games.com/game/gamesrv/base"
|
"mongo.games.com/game/gamesrv/base"
|
||||||
"mongo.games.com/game/model"
|
|
||||||
"mongo.games.com/game/proto"
|
"mongo.games.com/game/proto"
|
||||||
"mongo.games.com/game/protocol/clawdoll"
|
"mongo.games.com/game/protocol/clawdoll"
|
||||||
"mongo.games.com/game/protocol/machine"
|
"mongo.games.com/game/protocol/machine"
|
||||||
|
|
@ -24,7 +23,6 @@ import (
|
||||||
"mongo.games.com/goserver/srvlib"
|
"mongo.games.com/goserver/srvlib"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -68,7 +66,6 @@ type SceneEx struct {
|
||||||
machineId int //娃娃机ID
|
machineId int //娃娃机ID
|
||||||
machineConn *netlib.Session //娃娃机链接
|
machineConn *netlib.Session //娃娃机链接
|
||||||
machineStatus int32 //娃娃机链接状态 0:离线 1:在线
|
machineStatus int32 //娃娃机链接状态 0:离线 1:在线
|
||||||
PayCoinCount int //娃娃机总投币次数
|
|
||||||
|
|
||||||
payCoinTimeHandle timer.TimerHandle //上分投币托管handle
|
payCoinTimeHandle timer.TimerHandle //上分投币托管handle
|
||||||
grabTimerHandle timer.TimerHandle //下抓托管handle
|
grabTimerHandle timer.TimerHandle //下抓托管handle
|
||||||
|
|
@ -155,6 +152,7 @@ func (this *SceneEx) OnPlayerLeave(p *base.Player, reason int) {
|
||||||
// 发送http Get请求 关闭直播间流
|
// 发送http Get请求 关闭直播间流
|
||||||
operateTask(this, 2, rule.Zego_ForbidRTCStream, p.Platform)
|
operateTask(this, 2, rule.Zego_ForbidRTCStream, p.Platform)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
func (this *SceneEx) SceneDestroy(force bool) {
|
func (this *SceneEx) SceneDestroy(force bool) {
|
||||||
//销毁房间
|
//销毁房间
|
||||||
|
|
@ -239,13 +237,6 @@ func NewClawdollSceneData(s *base.Scene) *SceneEx {
|
||||||
|
|
||||||
func (this *SceneEx) init() bool {
|
func (this *SceneEx) init() bool {
|
||||||
this.Clear()
|
this.Clear()
|
||||||
|
|
||||||
this.PayCoinCount = this.LoadPayCoinCount()
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneEx) ShutDown() bool {
|
|
||||||
this.SavePayCoinCount(false)
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -341,36 +332,7 @@ func (this *SceneEx) GetPlayGrabType(player *PlayerEx) int32 {
|
||||||
return rule.ClawWeak
|
return rule.ClawWeak
|
||||||
}
|
}
|
||||||
|
|
||||||
if this.PayCoinCount == 0 {
|
if this.RoundId/2 == 0 && this.RoundId != 0 {
|
||||||
this.PayCoinCount = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
machineId := this.GetDBGameFree().GetId() % 6080000
|
|
||||||
machineInfo := this.GetMachineServerInfo(machineId, player.Platform)
|
|
||||||
if machineInfo == nil {
|
|
||||||
logger.Logger.Errorf("Clawdoll GetPlayGrabType machineId: %v, platform: %v", machineId, player.Platform)
|
|
||||||
return rule.ClawWeak
|
|
||||||
}
|
|
||||||
|
|
||||||
ProfitRate := common.RandFloat(machineInfo.ProfitMin, machineInfo.ProfitMax)
|
|
||||||
strongRate := (machineInfo.CatchPrice/(machineInfo.BuyPrice*ProfitRate))*float64(this.PayCoinCount) - 1
|
|
||||||
|
|
||||||
logger.Logger.Tracef("Clawdoll GetPlayGrabType: SnId: %v, PayCoinCount:%v, ProfitRate:%v, strongRate:%v", player.SnId, this.PayCoinCount, ProfitRate, strongRate)
|
|
||||||
|
|
||||||
if strongRate <= 0.00000 {
|
|
||||||
return rule.ClawWeak
|
|
||||||
} else if strongRate > 0.00000 && strongRate <= 0.99999 {
|
|
||||||
// 再次随机
|
|
||||||
newRate := common.RandFromRangeInt64(0, 100)
|
|
||||||
logger.Logger.Tracef("Clawdoll GetPlayGrabType: newRate:%v, SnId: %v, PayCoinCount:%v, ProfitRate:%v, strongRate:%v ", newRate, player.SnId, this.PayCoinCount, ProfitRate, strongRate)
|
|
||||||
|
|
||||||
if int64(strongRate*100) >= newRate {
|
|
||||||
logger.Logger.Tracef("Clawdoll GetPlayGrabType: SnId: %v gain ClawStrong, PayCoinCount:%v", player.SnId, this.PayCoinCount)
|
|
||||||
return rule.ClawStrong
|
|
||||||
} else {
|
|
||||||
return rule.ClawWeak
|
|
||||||
}
|
|
||||||
} else if strongRate >= 1.00000 {
|
|
||||||
return rule.ClawStrong
|
return rule.ClawStrong
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -433,12 +395,6 @@ func (this *SceneEx) TimeOutPlayGrab() bool {
|
||||||
playerEx := this.players[this.playingSnid]
|
playerEx := this.players[this.playingSnid]
|
||||||
if playerEx != nil {
|
if playerEx != nil {
|
||||||
grapType := this.GetPlayGrabType(playerEx)
|
grapType := this.GetPlayGrabType(playerEx)
|
||||||
if grapType == rule.ClawStrong {
|
|
||||||
this.PayCoinCount = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.Logger.Trace("ClawDoll StatePlayGame OnPlayerOp Grab-----SnId:", playerEx.SnId, " grapType: ", grapType)
|
|
||||||
|
|
||||||
this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), grapType)
|
this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), grapType)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -508,35 +464,6 @@ func (this *SceneEx) PayCoinTimeHandle() {
|
||||||
}), nil, rule.ClawDollScenePayCoinTimeOut, 1)
|
}), nil, rule.ClawDollScenePayCoinTimeOut, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 得到投币次数
|
|
||||||
func (this *SceneEx) LoadPayCoinCount() int {
|
|
||||||
machineId := this.GetDBGameFree().GetId()
|
|
||||||
PayCoinCountDBKey := fmt.Sprintf("Clawdoll_PayCoinCount_%v", machineId)
|
|
||||||
|
|
||||||
data := model.GetStrKVGameData(PayCoinCountDBKey)
|
|
||||||
|
|
||||||
PayCoinCount, err := strconv.Atoi(data)
|
|
||||||
if err == nil {
|
|
||||||
return PayCoinCount
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存投币次数
|
|
||||||
func (this *SceneEx) SavePayCoinCount(asyn bool) {
|
|
||||||
machineId := this.GetDBGameFree().GetId()
|
|
||||||
PayCoinCountDBKey := fmt.Sprintf("Clawdoll_PayCoinCount_%v", machineId)
|
|
||||||
|
|
||||||
saveBuff := strconv.Itoa(int(this.PayCoinCount))
|
|
||||||
if asyn {
|
|
||||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
|
||||||
return model.UptStrKVGameData(PayCoinCountDBKey, string(saveBuff))
|
|
||||||
}), nil, "UptStrKVGameData").Start()
|
|
||||||
} else {
|
|
||||||
model.UptStrKVGameData(PayCoinCountDBKey, string(saveBuff))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// actionType : 1 禁止推流 ForbidRTCStream
|
// actionType : 1 禁止推流 ForbidRTCStream
|
||||||
// actionType : 2 恢复推流 ResumeRTCStream
|
// actionType : 2 恢复推流 ResumeRTCStream
|
||||||
func operateTask(sceneEx *SceneEx, times int, actionType int, platform string) {
|
func operateTask(sceneEx *SceneEx, times int, actionType int, platform string) {
|
||||||
|
|
@ -585,7 +512,7 @@ func ZegoRTCStreamAction(Action string, machineInfo *webapi.MachineInfo) rule.Ze
|
||||||
timestamp := time.Now().Unix()
|
timestamp := time.Now().Unix()
|
||||||
queryParams := url.Values{}
|
queryParams := url.Values{}
|
||||||
|
|
||||||
queryParams.Set("StreamId", machineInfo.StreamId)
|
queryParams.Set("StreamId", "test")
|
||||||
queryParams.Set("Sequence", fmt.Sprintf("%d", timestamp))
|
queryParams.Set("Sequence", fmt.Sprintf("%d", timestamp))
|
||||||
|
|
||||||
// 生成16进制随机字符串(16位)
|
// 生成16进制随机字符串(16位)
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,6 @@ func (this *PolicyClawdoll) OnStart(s *base.Scene) {
|
||||||
|
|
||||||
func (this *PolicyClawdoll) OnStop(s *base.Scene) {
|
func (this *PolicyClawdoll) OnStop(s *base.Scene) {
|
||||||
logger.Logger.Trace("(this *PolicyClawdoll) OnStop , sceneId=", s.GetSceneId())
|
logger.Logger.Trace("(this *PolicyClawdoll) OnStop , sceneId=", s.GetSceneId())
|
||||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
|
||||||
if ok {
|
|
||||||
sceneEx.ShutDown()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PolicyClawdoll) OnTick(s *base.Scene) {
|
func (this *PolicyClawdoll) OnTick(s *base.Scene) {
|
||||||
|
|
@ -671,9 +667,6 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
|
||||||
}
|
}
|
||||||
|
|
||||||
grapType := sceneEx.GetPlayGrabType(playerEx)
|
grapType := sceneEx.GetPlayGrabType(playerEx)
|
||||||
if grapType == rule.ClawStrong {
|
|
||||||
sceneEx.PayCoinCount = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.Logger.Trace("ClawDoll StatePlayGame OnPlayerOp Grab-----SnId:", p.SnId, " grapType: ", grapType)
|
logger.Logger.Trace("ClawDoll StatePlayGame OnPlayerOp Grab-----SnId:", p.SnId, " grapType: ", grapType)
|
||||||
//1-弱力抓 2 -强力抓
|
//1-弱力抓 2 -强力抓
|
||||||
|
|
@ -812,7 +805,6 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
}
|
}
|
||||||
|
|
||||||
playerEx.lastIsWin = playerEx.IsWin
|
playerEx.lastIsWin = playerEx.IsWin
|
||||||
|
|
||||||
playerEx.ReStartGame()
|
playerEx.ReStartGame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/protocol/fortunedragon"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"mongo.games.com/goserver/core/netlib"
|
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CSFortuneDragonOpPacketFactory struct {
|
|
||||||
}
|
|
||||||
type CSFortuneDragonOpHandler struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *CSFortuneDragonOpPacketFactory) CreatePacket() interface{} {
|
|
||||||
pack := &fortunedragon.CSFortuneDragonOp{}
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *CSFortuneDragonOpHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
|
||||||
if op, ok := data.(*fortunedragon.CSFortuneDragonOp); ok {
|
|
||||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("CSFortuneDragonOpHandler p == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
logger.Logger.Warn("CSFortuneDragonOpHandler p.scene == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if !scene.HasPlayer(p) {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if scene.GetScenePolicy() != nil {
|
|
||||||
scene.GetScenePolicy().OnPlayerOp(scene, p, int(op.GetOpCode()), op.GetParams())
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
//fortunedragon
|
|
||||||
common.RegisterHandler(int(fortunedragon.FortuneDragonPID_PACKET_FORTUNEDRAGON_CSFORTUNEDRAGONOP), &CSFortuneDragonOpHandler{})
|
|
||||||
netlib.RegisterFactory(int(fortunedragon.FortuneDragonPID_PACKET_FORTUNEDRAGON_CSFORTUNEDRAGONOP), &CSFortuneDragonOpPacketFactory{})
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
gamerule "mongo.games.com/game/gamerule/fortunedragon"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/slots"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FortuneDragonPlayerData struct {
|
|
||||||
*base.Player
|
|
||||||
leaveTime int32 //离开时间
|
|
||||||
SlotsSession *base.SlotsSession
|
|
||||||
|
|
||||||
BetSizeIndex int64 `json:"bsi"` //选中的单注下标
|
|
||||||
BetLevelIndex int64 `json:"bli"` //选中的等级下标
|
|
||||||
BetLineIndex int64 `json:"bii"` //选中的线数下标
|
|
||||||
BetMode int64 `json:"bm,optional"` //0.常规 1.必中
|
|
||||||
|
|
||||||
taxCoin int64
|
|
||||||
winCoin int64
|
|
||||||
currentLogId string
|
|
||||||
totalBet int64
|
|
||||||
|
|
||||||
isFree bool //只用于判断是否可以离开
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *FortuneDragonPlayerData) init() {
|
|
||||||
p.SlotsSession = base.NewSession(uint64(p.SnId), p.Coin*gamerule.NowByte)
|
|
||||||
}
|
|
||||||
func (p *FortuneDragonPlayerData) Clear() {
|
|
||||||
p.taxCoin = 0
|
|
||||||
p.winCoin = 0
|
|
||||||
p.currentLogId = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
// 需要带到world上进行数据处理
|
|
||||||
func (p *FortuneDragonPlayerData) PushPlayer() map[string]string {
|
|
||||||
cache := slots.SlotsMgrSington.PushPlayer(p.SlotsSession)
|
|
||||||
return cache
|
|
||||||
}
|
|
||||||
|
|
||||||
// 进房的时候需要带进来
|
|
||||||
func (p *FortuneDragonPlayerData) PullPlayer(data map[string]string) {
|
|
||||||
slots.SlotsMgrSington.PullPlayer(p.SlotsSession, data)
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/assemble"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FortuneDragonSceneData struct {
|
|
||||||
*base.Scene //场景
|
|
||||||
players map[int32]*FortuneDragonPlayerData //玩家信息
|
|
||||||
BetConfig *assemble.BetConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewFortuneDragonSceneData(s *base.Scene) *FortuneDragonSceneData {
|
|
||||||
sceneEx := &FortuneDragonSceneData{
|
|
||||||
Scene: s,
|
|
||||||
players: make(map[int32]*FortuneDragonPlayerData),
|
|
||||||
}
|
|
||||||
sceneEx.Init()
|
|
||||||
return sceneEx
|
|
||||||
}
|
|
||||||
func (s *FortuneDragonSceneData) Init() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FortuneDragonSceneData) Clear() {
|
|
||||||
//应该是水池变一次就判断修改一次
|
|
||||||
//s.slotRateWeight = s.slotRateWeightTotal[0]
|
|
||||||
}
|
|
||||||
func (s *FortuneDragonSceneData) SceneDestroy(force bool) {
|
|
||||||
//销毁房间
|
|
||||||
s.Scene.Destroy(force)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FortuneDragonSceneData) delPlayer(SnId int32) {
|
|
||||||
if _, exist := s.players[SnId]; exist {
|
|
||||||
delete(s.players, SnId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (s *FortuneDragonSceneData) OnPlayerLeave(p *base.Player, reason int) {
|
|
||||||
if /*playerEx*/ _, ok := p.ExtraData.(*FortuneDragonPlayerData); ok {
|
|
||||||
|
|
||||||
}
|
|
||||||
s.delPlayer(p.SnId)
|
|
||||||
}
|
|
||||||
|
|
@ -1,564 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"mongo.games.com/game/protocol/server"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"mongo.games.com/goserver/core"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/gamerule/fortunedragon"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/assemble"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/slots"
|
|
||||||
"mongo.games.com/game/model"
|
|
||||||
"mongo.games.com/game/proto"
|
|
||||||
protocol "mongo.games.com/game/protocol/fortunedragon"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
var ScenePolicyFortuneDragonSington = &ScenePolicyFortuneDragon{}
|
|
||||||
|
|
||||||
type ScenePolicyFortuneDragon struct {
|
|
||||||
base.BaseScenePolicy
|
|
||||||
states [fortunedragon.FortuneDragonStateMax]base.SceneState
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建场景扩展数据
|
|
||||||
func (this *ScenePolicyFortuneDragon) CreateSceneExData(s *base.Scene) interface{} {
|
|
||||||
sceneEx := NewFortuneDragonSceneData(s)
|
|
||||||
if sceneEx != nil {
|
|
||||||
if sceneEx.GetInit() {
|
|
||||||
s.SetExtraData(sceneEx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sceneEx
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建玩家扩展数据
|
|
||||||
func (this *ScenePolicyFortuneDragon) CreatePlayerExData(s *base.Scene, p *base.Player) interface{} {
|
|
||||||
playerEx := &FortuneDragonPlayerData{Player: p}
|
|
||||||
p.SetExtraData(playerEx)
|
|
||||||
return playerEx
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景开启事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnStart(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnStart, sceneId=", s.GetSceneId())
|
|
||||||
sceneEx := NewFortuneDragonSceneData(s)
|
|
||||||
if sceneEx != nil {
|
|
||||||
if sceneEx.GetInit() {
|
|
||||||
s.SetExtraData(sceneEx)
|
|
||||||
s.ChangeSceneState(fortunedragon.FortuneDragonStateStart)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景关闭事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnStop(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnStop , sceneId=", s.GetSceneId())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景心跳事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnTick(s *base.Scene) {
|
|
||||||
if s == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
s.GetSceneState().OnTick(s)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家进入事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.Name)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
playerEx := &FortuneDragonPlayerData{Player: p}
|
|
||||||
|
|
||||||
playerEx.init()
|
|
||||||
|
|
||||||
d := p.GameData[fortunedragon.GameDataKey]
|
|
||||||
if d != nil {
|
|
||||||
m := make(map[string]string)
|
|
||||||
json.Unmarshal(d.Data.([]byte), &m)
|
|
||||||
playerEx.PullPlayer(m)
|
|
||||||
} else {
|
|
||||||
m := make(map[string]string)
|
|
||||||
//json.Unmarshal(d.Data.([]byte), &m)
|
|
||||||
playerEx.PullPlayer(m)
|
|
||||||
}
|
|
||||||
playerEx.SlotsSession.SetCoin(playerEx.Coin * fortunedragon.NowByte)
|
|
||||||
|
|
||||||
playerEx.Clear()
|
|
||||||
|
|
||||||
sceneEx.players[p.SnId] = playerEx
|
|
||||||
|
|
||||||
p.SetExtraData(playerEx)
|
|
||||||
FortuneDragonSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家离开事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
if playerEx, ok := p.ExtraData.(*FortuneDragonPlayerData); ok {
|
|
||||||
m := playerEx.PushPlayer()
|
|
||||||
if m != nil && len(m) > 0 {
|
|
||||||
b, err := json.Marshal(m)
|
|
||||||
if err != nil {
|
|
||||||
logger.Logger.Error("OnPlayerLeave, json.Marshal error:", err)
|
|
||||||
} else {
|
|
||||||
p.GameData[fortunedragon.GameDataKey] = &model.PlayerGameData{
|
|
||||||
Platform: p.Platform,
|
|
||||||
SnId: p.SnId,
|
|
||||||
Id: fortunedragon.GameDataKey,
|
|
||||||
Data: b,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if sceneEx, ok := s.ExtraData.(*FortuneDragonSceneData); ok {
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventLeave, nil)
|
|
||||||
sceneEx.OnPlayerLeave(p, reason)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家掉线
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerDropLine(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventDropLine, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家重连
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerRehold(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
FortuneDragonSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回房间
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerReturn(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerReturn, GetSceneId()=", s.GetSceneId(), " player=", p.Name)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
//if p.IsMarkFlag(base.PlayerState_Auto) {
|
|
||||||
// p.UnmarkFlag(base.PlayerState_Auto)
|
|
||||||
// p.SyncFlag()
|
|
||||||
//}
|
|
||||||
//发送房间信息给自己
|
|
||||||
FortuneDragonSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func FortuneDragonSendRoomInfo(s *base.Scene, sceneEx *FortuneDragonSceneData, playerEx *FortuneDragonPlayerData) {
|
|
||||||
pack := FortuneDragonCreateRoomInfoPacket(s, sceneEx, playerEx)
|
|
||||||
logger.Logger.Trace("RoomInfo: ", pack)
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneDragonPID_PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONROOMINFO), pack)
|
|
||||||
}
|
|
||||||
func FortuneDragonCreateRoomInfoPacket(s *base.Scene, sceneEx *FortuneDragonSceneData, playerEx *FortuneDragonPlayerData) interface{} {
|
|
||||||
//房间信息
|
|
||||||
pack := &protocol.SCFortuneDragonRoomInfo{
|
|
||||||
RoomId: s.SceneId,
|
|
||||||
GameId: s.GameId,
|
|
||||||
RoomMode: s.SceneMode,
|
|
||||||
SceneType: s.GetSceneType(),
|
|
||||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
|
||||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
|
||||||
State: proto.Int(s.SceneState.GetState()),
|
|
||||||
ParamsEx: s.GetDBGameFree().OtherIntParams,
|
|
||||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
|
||||||
//BetLimit: s.GetDBGameFree().BetLimit,
|
|
||||||
}
|
|
||||||
|
|
||||||
//自己的信息
|
|
||||||
if playerEx != nil {
|
|
||||||
pd := &protocol.FortuneDragonPlayerData{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Name: proto.String(playerEx.Name),
|
|
||||||
Head: proto.Int32(playerEx.Head),
|
|
||||||
Sex: proto.Int32(playerEx.Sex),
|
|
||||||
Coin: proto.Int64(playerEx.Coin),
|
|
||||||
Pos: proto.Int(playerEx.Pos),
|
|
||||||
Flag: proto.Int(playerEx.GetFlag()),
|
|
||||||
City: proto.String(playerEx.City),
|
|
||||||
HeadOutLine: proto.Int32(playerEx.HeadOutLine),
|
|
||||||
VIP: proto.Int32(playerEx.VIP),
|
|
||||||
}
|
|
||||||
pack.Player = pd
|
|
||||||
}
|
|
||||||
|
|
||||||
//get data
|
|
||||||
Response, err := slots.SlotsMgrSington.Enter(playerEx.SlotsSession, int64(s.GameId))
|
|
||||||
if err == nil {
|
|
||||||
data := assemble.DataToCli(Response).(assemble.TableInfo)
|
|
||||||
pi, _ := json.Marshal(data)
|
|
||||||
pack.PlayerInfo = string(pi)
|
|
||||||
if sceneEx.BetConfig == nil {
|
|
||||||
sceneEx.BetConfig = &data.BetConfig
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.Logger.Error("slots enter err:", err)
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params)
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
if s.GetSceneState().OnPlayerOp(s, p, opcode, params) {
|
|
||||||
p.SetLastOPTimer(time.Now())
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " eventcode=", evtcode, " params=", params)
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
s.GetSceneState().OnPlayerEvent(s, p, evtcode, params)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *ScenePolicyFortuneDragon) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
return s.GetSceneState().CanChangeCoinScene(s, p)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态基类
|
|
||||||
type SceneBaseStateFortuneDragon struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneDragon) GetTimeout(s *base.Scene) int {
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
return int(time.Now().Sub(sceneEx.GetStateStartTime()) / time.Second)
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneDragon) CanChangeTo(s base.SceneState) bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *SceneBaseStateFortuneDragon) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnEnter(s *base.Scene) {
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
sceneEx.SetStateStartTime(time.Now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnLeave(s *base.Scene) {}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnTick(s *base.Scene) {
|
|
||||||
if time.Now().Sub(s.GameStartTime) > time.Second*3 {
|
|
||||||
if sceneEx, ok := s.ExtraData.(*FortuneDragonSceneData); ok {
|
|
||||||
for _, p := range sceneEx.players {
|
|
||||||
if p.IsOnLine() {
|
|
||||||
p.leaveTime = 0
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
p.leaveTime++
|
|
||||||
if p.leaveTime < 60*2 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
//踢出玩家
|
|
||||||
sceneEx.PlayerLeave(p.Player, common.PlayerLeaveReason_LongTimeNoOp, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s.GameStartTime = time.Now()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
// 开始状态
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
type SceneStateStartFortuneDragon struct {
|
|
||||||
SceneBaseStateFortuneDragon
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) GetState() int {
|
|
||||||
return fortunedragon.FortuneDragonStateStart
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) CanChangeTo(s base.SceneState) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *SceneStateStartFortuneDragon) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
if playerEx.isFree {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) GetTimeout(s *base.Scene) int {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnEnter(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneDragon.OnEnter(s)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
sceneEx.SetGameNowTime(time.Now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态离开时
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnLeave(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneDragon.OnLeave(s)
|
|
||||||
logger.Logger.Tracef("(this *SceneStateStartFortuneDragon) OnLeave, sceneid=%v", s.GetSceneId())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家操作
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
logger.Logger.Tracef("(this *SceneStateStartFortuneDragon) OnPlayerOp, sceneid=%v params=%v", s.GetSceneId(), params)
|
|
||||||
if this.SceneBaseStateFortuneDragon.OnPlayerOp(s, p, opcode, params) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
switch opcode {
|
|
||||||
case fortunedragon.FortuneDragonPlayerOpStart:
|
|
||||||
playerEx.Clear()
|
|
||||||
if len(params) < 4 {
|
|
||||||
pack := &protocol.SCFortuneDragonBilled{
|
|
||||||
OpRetCode: proto.Int32(1),
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
logger.Logger.Trace("SCFortuneDragonBilled", pack.String())
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneDragonPID_PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED), pack)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
playerEx.BetSizeIndex = params[0]
|
|
||||||
playerEx.BetLevelIndex = params[1]
|
|
||||||
playerEx.BetLineIndex = params[2]
|
|
||||||
needCoin := sceneEx.BetConfig.BetSize[params[0]] * float64(sceneEx.BetConfig.BetLevel[params[1]]) *
|
|
||||||
float64(sceneEx.BetConfig.BetLines[params[2]])
|
|
||||||
if needCoin > float64(playerEx.Coin) {
|
|
||||||
pack := &protocol.SCFortuneDragonBilled{
|
|
||||||
OpRetCode: proto.Int32(1),
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
logger.Logger.Trace("SCFortuneDragonBilled:", pack.String())
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneDragonPID_PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED), pack)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx.BetMode = params[3]
|
|
||||||
|
|
||||||
//playerEx.SlotsSession.SetCoin(playerEx.Coin * fortunedragon.NowByte)
|
|
||||||
|
|
||||||
//get data
|
|
||||||
Response, err := slots.SlotsMgrSington.Play(playerEx.SlotsSession, &base.SpinReq{
|
|
||||||
GameId: int64(sceneEx.GameId),
|
|
||||||
BetSizeIndex: playerEx.BetSizeIndex,
|
|
||||||
BetLevelIndex: playerEx.BetLevelIndex,
|
|
||||||
BetLineIndex: playerEx.BetLineIndex,
|
|
||||||
BetMode: playerEx.BetMode,
|
|
||||||
Ts: time.Now().Unix(),
|
|
||||||
})
|
|
||||||
var gameEndStr string
|
|
||||||
var data assemble.GameEnd
|
|
||||||
if err == nil {
|
|
||||||
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
|
||||||
//第一次触发或者正常模式
|
|
||||||
playerEx.AddCoin(int64(-data.TotalBet), common.GainWay_HundredSceneLost, base.SyncFlag_ToClient, "system", s.GetSceneName())
|
|
||||||
playerEx.totalBet = int64(data.TotalBet)
|
|
||||||
}
|
|
||||||
var taxCoin float64
|
|
||||||
if data.RoundReward > 0 {
|
|
||||||
//税收比例
|
|
||||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
|
|
||||||
if taxRate < 0 || taxRate > 10000 {
|
|
||||||
taxRate = 500
|
|
||||||
}
|
|
||||||
taxCoin = data.RoundReward * float64(taxRate) / 10000
|
|
||||||
data.RoundReward = data.RoundReward - taxCoin
|
|
||||||
playerEx.AddServiceFee(int64(taxCoin))
|
|
||||||
playerEx.taxCoin = int64(taxCoin)
|
|
||||||
playerEx.winCoin = int64(data.RoundReward)
|
|
||||||
}
|
|
||||||
pi, _ := json.Marshal(data)
|
|
||||||
gameEndStr = string(pi)
|
|
||||||
|
|
||||||
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
|
||||||
playerEx.AddCoin(int64(data.RoundReward), common.GainWay_HundredSceneWin, 0, "system", s.GetSceneName())
|
|
||||||
//免费游戏结束或者正常模式
|
|
||||||
sceneEx.StaticsLaba(&base.StaticLabaParam{
|
|
||||||
SnId: playerEx.SnId,
|
|
||||||
Gain: int64(data.RoundReward - data.TotalBet),
|
|
||||||
GainTax: int64(taxCoin),
|
|
||||||
IsAddTimes: true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if data.Results[0].FreeNum > 0 {
|
|
||||||
playerEx.isFree = true
|
|
||||||
} else {
|
|
||||||
playerEx.isFree = false
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.Logger.Error("slots Play err:", err)
|
|
||||||
}
|
|
||||||
pack := &protocol.SCFortuneDragonBilled{
|
|
||||||
OpRetCode: proto.Int32(0),
|
|
||||||
GameEndStr: proto.String(gameEndStr),
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
logger.Logger.Trace("SCFortuneDragonBilled", pack.String())
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneDragonPID_PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED), pack)
|
|
||||||
|
|
||||||
if playerEx.Coin != int64(data.FinalCoin) {
|
|
||||||
logger.Logger.Error("==========playerEx.Coin != Response.Coin==============", playerEx.Coin, data.FinalCoin)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 记录本次操作
|
|
||||||
FortuneDragonAndSaveLog(sceneEx, playerEx, data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家事件
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
logger.Logger.Trace("(this *SceneStateStartFortuneDragon) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
|
|
||||||
this.SceneBaseStateFortuneDragon.OnPlayerEvent(s, p, evtcode, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnTick(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneDragon.OnTick(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
func (this *ScenePolicyFortuneDragon) RegisteSceneState(state base.SceneState) {
|
|
||||||
if state == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
stateid := state.GetState()
|
|
||||||
if stateid < 0 || stateid >= fortunedragon.FortuneDragonStateMax {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.states[stateid] = state
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ScenePolicyFortuneDragon) GetSceneState(s *base.Scene, stateid int) base.SceneState {
|
|
||||||
if stateid >= 0 && stateid < fortunedragon.FortuneDragonStateMax {
|
|
||||||
return this.states[stateid]
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func FortuneDragonAndSaveLog(sceneEx *FortuneDragonSceneData, playerEx *FortuneDragonPlayerData, data assemble.GameEnd) {
|
|
||||||
if !playerEx.IsRob {
|
|
||||||
data.SnId = playerEx.SnId
|
|
||||||
info, err := model.MarshalGameNoteByROLL(data)
|
|
||||||
if err == nil {
|
|
||||||
logid, _ := model.AutoIncGameLogId()
|
|
||||||
playerEx.currentLogId = logid
|
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
|
||||||
totalin := playerEx.totalBet
|
|
||||||
totalout := int64(data.RoundReward) + playerEx.taxCoin + totalin
|
|
||||||
validFlow := totalin + totalout
|
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
|
||||||
TotalIn: totalin,
|
|
||||||
TotalOut: totalout,
|
|
||||||
TaxCoin: playerEx.taxCoin,
|
|
||||||
BetAmount: playerEx.totalBet,
|
|
||||||
WinAmountNoAnyTax: int64(data.RoundReward) + playerEx.taxCoin,
|
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
|
||||||
}
|
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//统计输下注金币数
|
|
||||||
if !sceneEx.Testing && !playerEx.IsRob {
|
|
||||||
playerBet := &server.PlayerData{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Bet: proto.Int64(playerEx.CurrentBet),
|
|
||||||
Gain: proto.Int64(int64(data.RoundReward) + playerEx.taxCoin),
|
|
||||||
Tax: proto.Int64(playerEx.taxCoin),
|
|
||||||
Coin: proto.Int64(playerEx.GetCoin()),
|
|
||||||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
|
||||||
}
|
|
||||||
gwPlayerBet := &server.GWPlayerData{
|
|
||||||
SceneId: sceneEx.SceneId,
|
|
||||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
|
||||||
}
|
|
||||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
|
||||||
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
|
|
||||||
HasRobotGaming: false,
|
|
||||||
Data: gwPlayerBet,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx.taxCoin = 0
|
|
||||||
playerEx.winCoin = 0
|
|
||||||
|
|
||||||
if sceneEx.CheckNeedDestroy() && data.Results[0].FreeNum <= 0 {
|
|
||||||
sceneEx.PlayerLeave(playerEx.Player, common.PlayerLeaveReason_OnDestroy, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
//主状态
|
|
||||||
ScenePolicyFortuneDragonSington.RegisteSceneState(&SceneStateStartFortuneDragon{})
|
|
||||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
|
||||||
base.RegisteScenePolicy(common.GameId_FortuneDragon, fortunedragon.RoomMode_Classic, ScenePolicyFortuneDragonSington)
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
package fortunerabbit
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/protocol/fortunerabbit"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"mongo.games.com/goserver/core/netlib"
|
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CSFortuneRabbitOpPacketFactory struct {
|
|
||||||
}
|
|
||||||
type CSFortuneRabbitOpHandler struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *CSFortuneRabbitOpPacketFactory) CreatePacket() interface{} {
|
|
||||||
pack := &fortunerabbit.CSFortuneRabbitOp{}
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *CSFortuneRabbitOpHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
|
||||||
if op, ok := data.(*fortunerabbit.CSFortuneRabbitOp); ok {
|
|
||||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("CSFortuneRabbitOpHandler p == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
logger.Logger.Warn("CSFortuneRabbitOpHandler p.scene == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if !scene.HasPlayer(p) {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if scene.GetScenePolicy() != nil {
|
|
||||||
scene.GetScenePolicy().OnPlayerOp(scene, p, int(op.GetOpCode()), op.GetParams())
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
//fortunerabbit
|
|
||||||
common.RegisterHandler(int(fortunerabbit.FortuneRabbitPID_PACKET_FORTUNERABBIT_CSFORTUNERABBITOP), &CSFortuneRabbitOpHandler{})
|
|
||||||
netlib.RegisterFactory(int(fortunerabbit.FortuneRabbitPID_PACKET_FORTUNERABBIT_CSFORTUNERABBITOP), &CSFortuneRabbitOpPacketFactory{})
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
package fortunerabbit
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamerule/fortunerabbit"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/slots"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FortuneRabbitPlayerData struct {
|
|
||||||
*base.Player
|
|
||||||
leaveTime int32 //离开时间
|
|
||||||
SlotsSession *base.SlotsSession
|
|
||||||
|
|
||||||
BetSizeIndex int64 `json:"bsi"` //选中的单注下标
|
|
||||||
BetLevelIndex int64 `json:"bli"` //选中的等级下标
|
|
||||||
BetLineIndex int64 `json:"bii"` //选中的线数下标
|
|
||||||
BetMode int64 `json:"bm,optional"` //0.常规 1.必中
|
|
||||||
|
|
||||||
taxCoin int64
|
|
||||||
winCoin int64
|
|
||||||
currentLogId string
|
|
||||||
totalBet int64
|
|
||||||
|
|
||||||
isFree bool //只用于判断是否可以离开
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *FortuneRabbitPlayerData) init() {
|
|
||||||
p.SlotsSession = base.NewSession(uint64(p.SnId), p.Coin*fortunerabbit.NowByte)
|
|
||||||
}
|
|
||||||
func (p *FortuneRabbitPlayerData) Clear() {
|
|
||||||
p.taxCoin = 0
|
|
||||||
p.winCoin = 0
|
|
||||||
p.currentLogId = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
// 需要带到world上进行数据处理
|
|
||||||
func (p *FortuneRabbitPlayerData) PushPlayer() map[string]string {
|
|
||||||
cache := slots.SlotsMgrSington.PushPlayer(p.SlotsSession)
|
|
||||||
return cache
|
|
||||||
}
|
|
||||||
|
|
||||||
// 进房的时候需要带进来
|
|
||||||
func (p *FortuneRabbitPlayerData) PullPlayer(data map[string]string) {
|
|
||||||
slots.SlotsMgrSington.PullPlayer(p.SlotsSession, data)
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
package fortunerabbit
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/assemble"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FortuneRabbitSceneData struct {
|
|
||||||
*base.Scene //场景
|
|
||||||
players map[int32]*FortuneRabbitPlayerData //玩家信息
|
|
||||||
BetConfig *assemble.BetConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewFortuneRabbitSceneData(s *base.Scene) *FortuneRabbitSceneData {
|
|
||||||
sceneEx := &FortuneRabbitSceneData{
|
|
||||||
Scene: s,
|
|
||||||
players: make(map[int32]*FortuneRabbitPlayerData),
|
|
||||||
}
|
|
||||||
sceneEx.Init()
|
|
||||||
return sceneEx
|
|
||||||
}
|
|
||||||
func (s *FortuneRabbitSceneData) Init() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FortuneRabbitSceneData) Clear() {
|
|
||||||
//应该是水池变一次就判断修改一次
|
|
||||||
//s.slotRateWeight = s.slotRateWeightTotal[0]
|
|
||||||
}
|
|
||||||
func (s *FortuneRabbitSceneData) SceneDestroy(force bool) {
|
|
||||||
//销毁房间
|
|
||||||
s.Scene.Destroy(force)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FortuneRabbitSceneData) delPlayer(SnId int32) {
|
|
||||||
if _, exist := s.players[SnId]; exist {
|
|
||||||
delete(s.players, SnId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (s *FortuneRabbitSceneData) OnPlayerLeave(p *base.Player, reason int) {
|
|
||||||
if /*playerEx*/ _, ok := p.ExtraData.(*FortuneRabbitPlayerData); ok {
|
|
||||||
|
|
||||||
}
|
|
||||||
s.delPlayer(p.SnId)
|
|
||||||
}
|
|
||||||
|
|
@ -1,567 +0,0 @@
|
||||||
package fortunerabbit
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/gamerule/fortunerabbit"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/assemble"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/slots"
|
|
||||||
"mongo.games.com/game/model"
|
|
||||||
"mongo.games.com/game/proto"
|
|
||||||
protocol "mongo.games.com/game/protocol/fortunerabbit"
|
|
||||||
"mongo.games.com/game/protocol/server"
|
|
||||||
"mongo.games.com/goserver/core"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
var ScenePolicyFortuneRabbitSington = &ScenePolicyFortuneRabbit{}
|
|
||||||
|
|
||||||
type ScenePolicyFortuneRabbit struct {
|
|
||||||
base.BaseScenePolicy
|
|
||||||
states [fortunerabbit.FortuneRabbitStateMax]base.SceneState
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建场景扩展数据
|
|
||||||
func (this *ScenePolicyFortuneRabbit) CreateSceneExData(s *base.Scene) interface{} {
|
|
||||||
sceneEx := NewFortuneRabbitSceneData(s)
|
|
||||||
if sceneEx != nil {
|
|
||||||
if sceneEx.GetInit() {
|
|
||||||
s.SetExtraData(sceneEx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sceneEx
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建玩家扩展数据
|
|
||||||
func (this *ScenePolicyFortuneRabbit) CreatePlayerExData(s *base.Scene, p *base.Player) interface{} {
|
|
||||||
playerEx := &FortuneRabbitPlayerData{Player: p}
|
|
||||||
p.SetExtraData(playerEx)
|
|
||||||
return playerEx
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景开启事件
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnStart(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnStart, sceneId=", s.GetSceneId())
|
|
||||||
sceneEx := NewFortuneRabbitSceneData(s)
|
|
||||||
if sceneEx != nil {
|
|
||||||
if sceneEx.GetInit() {
|
|
||||||
s.SetExtraData(sceneEx)
|
|
||||||
s.ChangeSceneState(fortunerabbit.FortuneRabbitStateStart)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景关闭事件
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnStop(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnStop , sceneId=", s.GetSceneId())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景心跳事件
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnTick(s *base.Scene) {
|
|
||||||
if s == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
s.GetSceneState().OnTick(s)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家进入事件
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.Name)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
playerEx := &FortuneRabbitPlayerData{Player: p}
|
|
||||||
|
|
||||||
playerEx.init()
|
|
||||||
|
|
||||||
d := p.GameData[fortunerabbit.GameDataKey]
|
|
||||||
if d != nil {
|
|
||||||
m := make(map[string]string)
|
|
||||||
json.Unmarshal(d.Data.([]byte), &m)
|
|
||||||
playerEx.PullPlayer(m)
|
|
||||||
} else {
|
|
||||||
m := make(map[string]string)
|
|
||||||
//json.Unmarshal(d.Data.([]byte), &m)
|
|
||||||
playerEx.PullPlayer(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx.SlotsSession.SetCoin(playerEx.Coin * fortunerabbit.NowByte)
|
|
||||||
|
|
||||||
playerEx.Clear()
|
|
||||||
|
|
||||||
sceneEx.players[p.SnId] = playerEx
|
|
||||||
|
|
||||||
p.SetExtraData(playerEx)
|
|
||||||
FortuneRabbitSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家离开事件
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
if playerEx, ok := p.ExtraData.(*FortuneRabbitPlayerData); ok {
|
|
||||||
m := playerEx.PushPlayer()
|
|
||||||
if m != nil && len(m) > 0 {
|
|
||||||
b, err := json.Marshal(m)
|
|
||||||
if err != nil {
|
|
||||||
logger.Logger.Error("OnPlayerLeave, json.Marshal error:", err)
|
|
||||||
} else {
|
|
||||||
p.GameData[fortunerabbit.GameDataKey] = &model.PlayerGameData{
|
|
||||||
Platform: p.Platform,
|
|
||||||
SnId: p.SnId,
|
|
||||||
Id: fortunerabbit.GameDataKey,
|
|
||||||
Data: b,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if sceneEx, ok := s.ExtraData.(*FortuneRabbitSceneData); ok {
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventLeave, nil)
|
|
||||||
sceneEx.OnPlayerLeave(p, reason)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家掉线
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerDropLine(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventDropLine, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家重连
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerRehold(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneRabbitPlayerData); ok {
|
|
||||||
FortuneRabbitSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回房间
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerReturn(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerReturn, GetSceneId()=", s.GetSceneId(), " player=", p.Name)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneRabbitPlayerData); ok {
|
|
||||||
//if p.IsMarkFlag(base.PlayerState_Auto) {
|
|
||||||
// p.UnmarkFlag(base.PlayerState_Auto)
|
|
||||||
// p.SyncFlag()
|
|
||||||
//}
|
|
||||||
//发送房间信息给自己
|
|
||||||
FortuneRabbitSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func FortuneRabbitSendRoomInfo(s *base.Scene, sceneEx *FortuneRabbitSceneData, playerEx *FortuneRabbitPlayerData) {
|
|
||||||
pack := FortuneRabbitCreateRoomInfoPacket(s, sceneEx, playerEx)
|
|
||||||
logger.Logger.Trace("RoomInfo: ", pack)
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneRabbitPID_PACKET_FORTUNERABBIT_SCFORTUNERABBITROOMINFO), pack)
|
|
||||||
}
|
|
||||||
func FortuneRabbitCreateRoomInfoPacket(s *base.Scene, sceneEx *FortuneRabbitSceneData, playerEx *FortuneRabbitPlayerData) interface{} {
|
|
||||||
//房间信息
|
|
||||||
pack := &protocol.SCFortuneRabbitRoomInfo{
|
|
||||||
RoomId: s.SceneId,
|
|
||||||
GameId: s.GameId,
|
|
||||||
RoomMode: s.SceneMode,
|
|
||||||
SceneType: s.GetSceneType(),
|
|
||||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
|
||||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
|
||||||
State: proto.Int(s.SceneState.GetState()),
|
|
||||||
ParamsEx: s.GetDBGameFree().OtherIntParams,
|
|
||||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
|
||||||
//BetLimit: s.GetDBGameFree().BetLimit,
|
|
||||||
}
|
|
||||||
|
|
||||||
//自己的信息
|
|
||||||
if playerEx != nil {
|
|
||||||
pd := &protocol.FortuneRabbitPlayerData{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Name: proto.String(playerEx.Name),
|
|
||||||
Head: proto.Int32(playerEx.Head),
|
|
||||||
Sex: proto.Int32(playerEx.Sex),
|
|
||||||
Coin: proto.Int64(playerEx.Coin),
|
|
||||||
Pos: proto.Int(playerEx.Pos),
|
|
||||||
Flag: proto.Int(playerEx.GetFlag()),
|
|
||||||
City: proto.String(playerEx.City),
|
|
||||||
HeadOutLine: proto.Int32(playerEx.HeadOutLine),
|
|
||||||
VIP: proto.Int32(playerEx.VIP),
|
|
||||||
}
|
|
||||||
pack.Player = pd
|
|
||||||
}
|
|
||||||
|
|
||||||
//get data
|
|
||||||
Response, err := slots.SlotsMgrSington.Enter(playerEx.SlotsSession, int64(s.GameId))
|
|
||||||
if err == nil {
|
|
||||||
data := assemble.DataToCli(Response).(assemble.TableInfo)
|
|
||||||
pi, _ := json.Marshal(data)
|
|
||||||
pack.PlayerInfo = string(pi)
|
|
||||||
if sceneEx.BetConfig == nil {
|
|
||||||
sceneEx.BetConfig = &data.BetConfig
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.Logger.Error("slots enter err:", err)
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params)
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
if s.GetSceneState().OnPlayerOp(s, p, opcode, params) {
|
|
||||||
p.SetLastOPTimer(time.Now())
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ScenePolicyFortuneRabbit) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneRabbit) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " eventcode=", evtcode, " params=", params)
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
s.GetSceneState().OnPlayerEvent(s, p, evtcode, params)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *ScenePolicyFortuneRabbit) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
return s.GetSceneState().CanChangeCoinScene(s, p)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态基类
|
|
||||||
type SceneBaseStateFortuneRabbit struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) GetTimeout(s *base.Scene) int {
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
return int(time.Now().Sub(sceneEx.GetStateStartTime()) / time.Second)
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) CanChangeTo(s base.SceneState) bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) OnEnter(s *base.Scene) {
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
sceneEx.SetStateStartTime(time.Now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) OnLeave(s *base.Scene) {}
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) OnTick(s *base.Scene) {
|
|
||||||
if time.Now().Sub(s.GameStartTime) > time.Second*3 {
|
|
||||||
if sceneEx, ok := s.ExtraData.(*FortuneRabbitSceneData); ok {
|
|
||||||
for _, p := range sceneEx.players {
|
|
||||||
if p.IsOnLine() {
|
|
||||||
p.leaveTime = 0
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
p.leaveTime++
|
|
||||||
if p.leaveTime < 60*2 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
//踢出玩家
|
|
||||||
sceneEx.PlayerLeave(p.Player, common.PlayerLeaveReason_LongTimeNoOp, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s.GameStartTime = time.Now()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneRabbit) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
// 开始状态
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
type SceneStateStartFortuneRabbit struct {
|
|
||||||
SceneBaseStateFortuneRabbit
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneRabbit) GetState() int {
|
|
||||||
return fortunerabbit.FortuneRabbitStateStart
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneRabbit) CanChangeTo(s base.SceneState) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *SceneStateStartFortuneRabbit) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneRabbitPlayerData); ok {
|
|
||||||
if playerEx.isFree {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneRabbit) GetTimeout(s *base.Scene) int {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneRabbit) OnEnter(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneRabbit.OnEnter(s)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
sceneEx.SetGameNowTime(time.Now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态离开时
|
|
||||||
func (this *SceneStateStartFortuneRabbit) OnLeave(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneRabbit.OnLeave(s)
|
|
||||||
logger.Logger.Tracef("(this *SceneStateStartFortuneRabbit) OnLeave, sceneid=%v", s.GetSceneId())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家操作
|
|
||||||
func (this *SceneStateStartFortuneRabbit) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
logger.Logger.Tracef("(this *SceneStateStartFortuneRabbit) OnPlayerOp, sceneid=%v params=%v", s.GetSceneId(), params)
|
|
||||||
if this.SceneBaseStateFortuneRabbit.OnPlayerOp(s, p, opcode, params) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneRabbitSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneRabbitPlayerData); ok {
|
|
||||||
switch opcode {
|
|
||||||
case fortunerabbit.FortuneRabbitPlayerOpStart:
|
|
||||||
playerEx.Clear()
|
|
||||||
if len(params) < 3 {
|
|
||||||
pack := &protocol.SCFortuneRabbitBilled{
|
|
||||||
OpRetCode: proto.Int32(1),
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
logger.Logger.Trace("SCFortuneRabbitBilled", pack.String())
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneRabbitPID_PACKET_FORTUNERABBIT_SCFORTUNERABBITBILLED), pack)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
playerEx.BetSizeIndex = params[0]
|
|
||||||
playerEx.BetLevelIndex = params[1]
|
|
||||||
playerEx.BetLineIndex = params[2]
|
|
||||||
//playerEx.BetMode = params[3]
|
|
||||||
needCoin := sceneEx.BetConfig.BetSize[params[0]] * float64(sceneEx.BetConfig.BetLevel[params[1]]) *
|
|
||||||
float64(sceneEx.BetConfig.BetLines[params[2]])
|
|
||||||
if needCoin > float64(playerEx.Coin) {
|
|
||||||
pack := &protocol.SCFortuneRabbitBilled{
|
|
||||||
OpRetCode: proto.Int32(1),
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
logger.Logger.Trace("SCFortuneRabbitBilled:", pack.String())
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneRabbitPID_PACKET_FORTUNERABBIT_SCFORTUNERABBITBILLED), pack)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
//playerEx.SlotsSession.SetCoin(playerEx.Coin * fortunerabbit.NowByte)
|
|
||||||
|
|
||||||
//get data
|
|
||||||
Response, err := slots.SlotsMgrSington.Play(playerEx.SlotsSession, &base.SpinReq{
|
|
||||||
GameId: int64(sceneEx.GameId),
|
|
||||||
BetSizeIndex: playerEx.BetSizeIndex,
|
|
||||||
BetLevelIndex: playerEx.BetLevelIndex,
|
|
||||||
BetLineIndex: playerEx.BetLineIndex,
|
|
||||||
BetMode: playerEx.BetMode,
|
|
||||||
Ts: time.Now().Unix(),
|
|
||||||
})
|
|
||||||
var gameEndStr string
|
|
||||||
var data assemble.GameEnd
|
|
||||||
if err == nil {
|
|
||||||
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
|
||||||
//第一次触发或者正常模式
|
|
||||||
playerEx.AddCoin(int64(-data.TotalBet), common.GainWay_HundredSceneLost, base.SyncFlag_ToClient, "system", s.GetSceneName())
|
|
||||||
playerEx.totalBet = int64(data.TotalBet)
|
|
||||||
}
|
|
||||||
var taxCoin float64
|
|
||||||
if data.RoundReward > 0 {
|
|
||||||
//税收比例
|
|
||||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
|
|
||||||
if taxRate < 0 || taxRate > 10000 {
|
|
||||||
taxRate = 500
|
|
||||||
}
|
|
||||||
taxCoin = data.RoundReward * float64(taxRate) / 10000
|
|
||||||
data.RoundReward = data.RoundReward - taxCoin
|
|
||||||
playerEx.AddServiceFee(int64(taxCoin))
|
|
||||||
playerEx.taxCoin = int64(taxCoin)
|
|
||||||
playerEx.winCoin = int64(data.RoundReward)
|
|
||||||
}
|
|
||||||
pi, _ := json.Marshal(data)
|
|
||||||
gameEndStr = string(pi)
|
|
||||||
|
|
||||||
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
|
||||||
playerEx.AddCoin(int64(data.RoundReward), common.GainWay_HundredSceneWin, 0, "system", s.GetSceneName())
|
|
||||||
//免费游戏结束或者正常模式
|
|
||||||
sceneEx.StaticsLaba(&base.StaticLabaParam{
|
|
||||||
SnId: playerEx.SnId,
|
|
||||||
Gain: int64(data.RoundReward - data.TotalBet),
|
|
||||||
GainTax: int64(taxCoin),
|
|
||||||
IsAddTimes: true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if data.Results[0].FreeNum > 0 {
|
|
||||||
playerEx.isFree = true
|
|
||||||
} else {
|
|
||||||
playerEx.isFree = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if data.Results[0].FreeNum > 0 {
|
|
||||||
playerEx.isFree = true
|
|
||||||
} else {
|
|
||||||
playerEx.isFree = false
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.Logger.Error("slots Play err:", err)
|
|
||||||
}
|
|
||||||
if playerEx.Coin != int64(data.FinalCoin) {
|
|
||||||
logger.Logger.Error("==========playerEx.Coin != Response.Coin==============", playerEx.Coin, data.FinalCoin)
|
|
||||||
}
|
|
||||||
pack := &protocol.SCFortuneRabbitBilled{
|
|
||||||
OpRetCode: proto.Int32(0),
|
|
||||||
GameEndStr: proto.String(gameEndStr),
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
logger.Logger.Trace("SCFortuneRabbitBilled", pack.String())
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneRabbitPID_PACKET_FORTUNERABBIT_SCFORTUNERABBITBILLED), pack)
|
|
||||||
|
|
||||||
// 记录本次操作
|
|
||||||
FortuneRabbitAndSaveLog(sceneEx, playerEx, data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家事件
|
|
||||||
func (this *SceneStateStartFortuneRabbit) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
logger.Logger.Trace("(this *SceneStateStartFortuneRabbit) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
|
|
||||||
this.SceneBaseStateFortuneRabbit.OnPlayerEvent(s, p, evtcode, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneRabbit) OnTick(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneRabbit.OnTick(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
func (this *ScenePolicyFortuneRabbit) RegisteSceneState(state base.SceneState) {
|
|
||||||
if state == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
stateid := state.GetState()
|
|
||||||
if stateid < 0 || stateid >= fortunerabbit.FortuneRabbitStateMax {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.states[stateid] = state
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ScenePolicyFortuneRabbit) GetSceneState(s *base.Scene, stateid int) base.SceneState {
|
|
||||||
if stateid >= 0 && stateid < fortunerabbit.FortuneRabbitStateMax {
|
|
||||||
return this.states[stateid]
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func FortuneRabbitAndSaveLog(sceneEx *FortuneRabbitSceneData, playerEx *FortuneRabbitPlayerData, data assemble.GameEnd) {
|
|
||||||
if !playerEx.IsRob {
|
|
||||||
data.SnId = playerEx.SnId
|
|
||||||
info, err := model.MarshalGameNoteByROLL(data)
|
|
||||||
if err == nil {
|
|
||||||
logid, _ := model.AutoIncGameLogId()
|
|
||||||
playerEx.currentLogId = logid
|
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
|
||||||
totalin := playerEx.totalBet
|
|
||||||
totalout := int64(data.RoundReward) + playerEx.taxCoin + totalin
|
|
||||||
validFlow := totalin + totalout
|
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
|
||||||
TotalIn: totalin,
|
|
||||||
TotalOut: totalout,
|
|
||||||
TaxCoin: playerEx.taxCoin,
|
|
||||||
BetAmount: playerEx.totalBet,
|
|
||||||
WinAmountNoAnyTax: int64(data.RoundReward) + playerEx.taxCoin,
|
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
|
||||||
}
|
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//统计输下注金币数
|
|
||||||
if !sceneEx.Testing && !playerEx.IsRob {
|
|
||||||
playerBet := &server.PlayerData{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Bet: proto.Int64(playerEx.CurrentBet),
|
|
||||||
Gain: proto.Int64(int64(data.RoundReward) + playerEx.taxCoin),
|
|
||||||
Tax: proto.Int64(playerEx.taxCoin),
|
|
||||||
Coin: proto.Int64(playerEx.GetCoin()),
|
|
||||||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
|
||||||
}
|
|
||||||
gwPlayerBet := &server.GWPlayerData{
|
|
||||||
SceneId: sceneEx.SceneId,
|
|
||||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
|
||||||
}
|
|
||||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
|
||||||
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
|
|
||||||
HasRobotGaming: false,
|
|
||||||
Data: gwPlayerBet,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx.taxCoin = 0
|
|
||||||
playerEx.winCoin = 0
|
|
||||||
|
|
||||||
if sceneEx.CheckNeedDestroy() && data.Results[0].FreeNum <= 0 {
|
|
||||||
sceneEx.PlayerLeave(playerEx.Player, common.PlayerLeaveReason_OnDestroy, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
//主状态
|
|
||||||
ScenePolicyFortuneRabbitSington.RegisteSceneState(&SceneStateStartFortuneRabbit{})
|
|
||||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
|
||||||
base.RegisteScenePolicy(common.GameId_FortuneRabbit, fortunerabbit.RoomMode_Classic, ScenePolicyFortuneRabbitSington)
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
@ -30,12 +30,9 @@ import (
|
||||||
_ "mongo.games.com/game/gamesrv/avengers"
|
_ "mongo.games.com/game/gamesrv/avengers"
|
||||||
_ "mongo.games.com/game/gamesrv/caishen"
|
_ "mongo.games.com/game/gamesrv/caishen"
|
||||||
_ "mongo.games.com/game/gamesrv/easterisland"
|
_ "mongo.games.com/game/gamesrv/easterisland"
|
||||||
_ "mongo.games.com/game/gamesrv/fortunedragon"
|
|
||||||
_ "mongo.games.com/game/gamesrv/fortunerabbit"
|
|
||||||
_ "mongo.games.com/game/gamesrv/fruits"
|
_ "mongo.games.com/game/gamesrv/fruits"
|
||||||
_ "mongo.games.com/game/gamesrv/iceage"
|
_ "mongo.games.com/game/gamesrv/iceage"
|
||||||
_ "mongo.games.com/game/gamesrv/richblessed"
|
_ "mongo.games.com/game/gamesrv/richblessed"
|
||||||
_ "mongo.games.com/game/gamesrv/slotspkg/slots"
|
|
||||||
_ "mongo.games.com/game/gamesrv/tamquoc"
|
_ "mongo.games.com/game/gamesrv/tamquoc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
||||||
package assemble
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/internal/module/shared"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/slots/types/cli"
|
|
||||||
"sort"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CoinRate float64 = 10000
|
|
||||||
|
|
||||||
func DataToCli(response any) interface{} {
|
|
||||||
switch Response := response.(type) {
|
|
||||||
case *cli.SlotsEnterResponse:
|
|
||||||
tableInfo := TableInfo{}
|
|
||||||
var BetSizes []float64
|
|
||||||
for _, size := range Response.BetSizes {
|
|
||||||
BetSizes = append(BetSizes, float64(size)/10000)
|
|
||||||
}
|
|
||||||
sort.Slice(Response.BetChangeList, func(i, j int) bool { return Response.BetChangeList[i] < Response.BetChangeList[j] })
|
|
||||||
sort.Slice(Response.BetLevels, func(i, j int) bool { return Response.BetLevels[i] < Response.BetLevels[j] })
|
|
||||||
sort.Slice(BetSizes, func(i, j int) bool { return BetSizes[i] < BetSizes[j] })
|
|
||||||
tableInfo.BetConfig = BetConfig{
|
|
||||||
BetChangeList: Response.BetChangeList,
|
|
||||||
BetSize: BetSizes,
|
|
||||||
BetLevel: Response.BetLevels,
|
|
||||||
BetLines: Response.BetLines,
|
|
||||||
BetType: 1,
|
|
||||||
BetSizeIndex: Response.BetSizeIndex,
|
|
||||||
BetLevelIndex: Response.BetLevelIndex,
|
|
||||||
BetLineIndex: Response.BetLineIndex,
|
|
||||||
}
|
|
||||||
tableInfo.Coin = float64(Response.Coin) / CoinRate
|
|
||||||
//////////////////////////////////////////////////////////////
|
|
||||||
res := response2NodeTree(Response.NodeTree)
|
|
||||||
ress := []*shared.Result{res}
|
|
||||||
gameEnd := shared.GameEndDto{
|
|
||||||
Results: ress,
|
|
||||||
RoundReward: Response.NodeTree.Nodes[0].ChildrenTotalWin,
|
|
||||||
TotalBet: Response.NodeTree.BetCoin.GetCoin(),
|
|
||||||
//BetBeforeCoin: Response.Coin - Response.ActualWin + Response.ActualBet,
|
|
||||||
//BetAfterCoin: Response.Coin - Response.ActualWin,
|
|
||||||
FinalCoin: Response.Coin,
|
|
||||||
ActualBet: Response.NodeTree.Nodes[0].Bet,
|
|
||||||
ActualWin: Response.Coin,
|
|
||||||
}
|
|
||||||
tableInfo.SpinResult = SpinRes2Dto(gameEnd)
|
|
||||||
return tableInfo
|
|
||||||
case *cli.SlotsPlayResponse:
|
|
||||||
res := response2NodeTree(Response.NodeTree)
|
|
||||||
ress := []*shared.Result{res}
|
|
||||||
gameEnd := shared.GameEndDto{
|
|
||||||
Results: ress,
|
|
||||||
RoundReward: Response.NodeTree.Nodes[0].ChildrenTotalWin,
|
|
||||||
TotalBet: Response.NodeTree.BetCoin.GetCoin(),
|
|
||||||
BetBeforeCoin: Response.Coin - Response.ActualWin + Response.ActualBet,
|
|
||||||
BetAfterCoin: Response.Coin - Response.ActualWin,
|
|
||||||
FinalCoin: Response.Coin,
|
|
||||||
ActualBet: Response.ActualBet,
|
|
||||||
ActualWin: Response.ActualWin,
|
|
||||||
}
|
|
||||||
//a, _ := json.Marshal(GameEnd)
|
|
||||||
//logx.Error("GameEnd:", string(a))
|
|
||||||
return SpinRes2Dto(gameEnd)
|
|
||||||
default:
|
|
||||||
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func response2NodeTree(NodeTree *shared.LiteNodeTree) *shared.Result {
|
|
||||||
Special, customFortune, featureTotalWin := getDataByTheme(NodeTree)
|
|
||||||
var ass []*shared.ArrSpins
|
|
||||||
for _, formation := range NodeTree.Formations {
|
|
||||||
item := formation.DisplaySymbols
|
|
||||||
spinType := formation.NodeType
|
|
||||||
indexs := formation.RandPositions
|
|
||||||
//win := formation.Win
|
|
||||||
items := cli.ToItems(formation.MatrixForm, item)
|
|
||||||
var lineReward float64
|
|
||||||
for _, info := range formation.RewardInfo {
|
|
||||||
lineReward += info.Reward
|
|
||||||
}
|
|
||||||
if formation.NewNodeType != "" {
|
|
||||||
spinType = formation.NewNodeType
|
|
||||||
}
|
|
||||||
spin := &shared.ArrSpins{
|
|
||||||
GearID: spinType,
|
|
||||||
Items: items,
|
|
||||||
Index: indexs,
|
|
||||||
Reward: float64(featureTotalWin) + lineReward, ///total_win
|
|
||||||
LineReward: lineReward, ///line_win
|
|
||||||
RewardInfo: formation.RewardInfo,
|
|
||||||
FinalSymbols: cli.ToItems(formation.MatrixForm, formation.GetFinalSymbols()),
|
|
||||||
}
|
|
||||||
if Special[formation.NodeID] != nil {
|
|
||||||
spin.Special = Special[formation.NodeID]
|
|
||||||
}
|
|
||||||
ass = append(ass, spin)
|
|
||||||
}
|
|
||||||
res := &shared.Result{
|
|
||||||
ArrSpins: ass,
|
|
||||||
}
|
|
||||||
|
|
||||||
res.TotalRewardBase = ass[0].LineReward ///line_win
|
|
||||||
res.TotalReward = ass[0].Reward ///total_win
|
|
||||||
|
|
||||||
res.FreeNumTrigger = customFortune.FreeNumTrigger
|
|
||||||
res.FreeNumMax = customFortune.FreeNumMax
|
|
||||||
res.FreeNum = customFortune.FreeSpinNum
|
|
||||||
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package assemble
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/internal/module/shared"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CustomFortune struct {
|
|
||||||
FreeSpinNum int64 `json:"fsn"` //剩余freespin
|
|
||||||
FreeNumMax int64 `json:"fnm"` //总次数
|
|
||||||
FreeNumTrigger int64 `json:"fnt"` //新增freespin
|
|
||||||
ForceRound int64 `json:"fr"` //第n次
|
|
||||||
}
|
|
||||||
|
|
||||||
func getDataByTheme(NodeTree *shared.LiteNodeTree) (map[int64]*shared.SpinLock, CustomFortune, int64) {
|
|
||||||
var Special = make(map[int64]*shared.SpinLock)
|
|
||||||
var customFortune CustomFortune
|
|
||||||
var FeatureTotalWin int64
|
|
||||||
for _, feature := range NodeTree.Features {
|
|
||||||
if strings.Contains(feature.Type, "Special") && len(feature.Custom) > 2 {
|
|
||||||
sp := shared.SpinLock{}
|
|
||||||
json.Unmarshal([]byte(feature.Custom), &sp)
|
|
||||||
Special[feature.NodeID] = &sp
|
|
||||||
json.Unmarshal([]byte(feature.Custom), &customFortune)
|
|
||||||
}
|
|
||||||
FeatureTotalWin += feature.Win
|
|
||||||
}
|
|
||||||
return Special, customFortune, FeatureTotalWin
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
package assemble
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamesrv/slotspkg/internal/module/shared"
|
|
||||||
)
|
|
||||||
|
|
||||||
func SpinRes2Dto(spinRes shared.GameEndDto) (spinResDto GameEnd) {
|
|
||||||
////////////////////////////////////
|
|
||||||
//数据组装
|
|
||||||
spinResDto.Results = make([]Result, len(spinRes.Results))
|
|
||||||
for i, result := range spinRes.Results {
|
|
||||||
spinResDto.Results[i].WinStatus = result.WinStatus
|
|
||||||
spinResDto.Results[i].FreeStatus = result.FreeStatus
|
|
||||||
spinResDto.Results[i].FreeNum = result.FreeNum
|
|
||||||
spinResDto.Results[i].FreeNumMax = result.FreeNumMax
|
|
||||||
spinResDto.Results[i].FreeNumTrigger = result.FreeNumTrigger
|
|
||||||
spinResDto.Results[i].TotalReward = result.TotalReward / CoinRate
|
|
||||||
spinResDto.Results[i].TotalRewardBase = result.TotalRewardBase / CoinRate
|
|
||||||
spinResDto.Results[i].BetMode = result.BetMode
|
|
||||||
spinResDto.Results[i].ArrSpins = make([]ArrSpins, len(result.ArrSpins))
|
|
||||||
for i2, spin := range result.ArrSpins {
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].GearID = spin.GearID
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].Items = spin.Items
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].FinalSymbols = spin.FinalSymbols
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].Index = spin.Index
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].Reward = spin.Reward / CoinRate
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].LineReward = spin.LineReward / CoinRate
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].Special = spin.Special
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].RewardInfo = make([]RewardInfo, len(spin.RewardInfo))
|
|
||||||
for i3, info := range spin.RewardInfo {
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].RewardInfo[i3].Type = info.Type
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].RewardInfo[i3].Index = info.Index
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].RewardInfo[i3].Item = info.Item
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].RewardInfo[i3].Reward = info.Reward / CoinRate
|
|
||||||
spinResDto.Results[i].ArrSpins[i2].RewardInfo[i3].Pos = info.Pos
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spinResDto.RoundReward = float64(spinRes.RoundReward) / CoinRate
|
|
||||||
spinResDto.BetSizeIndex = spinRes.BetSizeIndex
|
|
||||||
spinResDto.BetLevelIndex = spinRes.BetLevelIndex
|
|
||||||
spinResDto.LinesIndex = spinRes.LinesIndex
|
|
||||||
spinResDto.TotalBet = float64(spinRes.TotalBet) / CoinRate
|
|
||||||
spinResDto.BetBeforeCoin = float64(spinRes.BetBeforeCoin) / CoinRate
|
|
||||||
spinResDto.BetAfterCoin = float64(spinRes.BetAfterCoin) / CoinRate
|
|
||||||
spinResDto.FinalCoin = float64(spinRes.FinalCoin) / CoinRate
|
|
||||||
spinResDto.ActualBet = float64(spinRes.ActualBet) / CoinRate
|
|
||||||
spinResDto.ActualWin = float64(spinRes.ActualWin) / CoinRate
|
|
||||||
////////////////////////////////////
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
package assemble
|
|
||||||
|
|
||||||
type RewardInfo struct {
|
|
||||||
Type int `json:"type"` //0.指定线的数量 1.全线
|
|
||||||
Index int `json:"index"` //线的id
|
|
||||||
Item int64 `json:"item"` //图标id
|
|
||||||
Reward float64 `json:"reward"` //单线奖励
|
|
||||||
Pos [][]int `json:"pos"` //位置
|
|
||||||
}
|
|
||||||
type ArrSpins struct {
|
|
||||||
GearID string `json:"gear_id"` //"base","respin"
|
|
||||||
Items [][]int64 `json:"items"` //当前元素
|
|
||||||
FinalSymbols [][]int64 `json:"final_symbols"` //最终元素
|
|
||||||
Index []int64 `json:"index"` //reel索引
|
|
||||||
Reward float64 `json:"reward"` //总奖
|
|
||||||
LineReward float64 `json:"line_reward"` //线的总奖
|
|
||||||
RewardInfo []RewardInfo `json:"reward_info"`
|
|
||||||
Special interface{} `json:"special"` //null
|
|
||||||
}
|
|
||||||
type Result struct {
|
|
||||||
ArrSpins []ArrSpins `json:"arr_spins"`
|
|
||||||
WinStatus int `json:"win_status"` //0.无特效 1.bigWin(5) 2.megaWin(10) 3.superWin(20) 4.epicWin(1000000000)
|
|
||||||
FreeStatus int `json:"free_status"` //0.none trigger = 1, retrigger = 2, over = 3,
|
|
||||||
FreeNum int64 `json:"free_num"` //剩余free数量
|
|
||||||
FreeNumMax int64 `json:"free_num_max"` //最大的free数量
|
|
||||||
FreeNumTrigger int64 `json:"free_num_trigger"` //新增的free数量
|
|
||||||
TotalReward float64 `json:"total_reward"` //总奖
|
|
||||||
TotalRewardBase float64 `json:"total_reward_base"` //基础奖
|
|
||||||
BetMode int64 `json:"bet_mode"` //0.常规 1.必中
|
|
||||||
}
|
|
||||||
type GameEnd struct {
|
|
||||||
Results []Result `json:"results"`
|
|
||||||
RoundReward float64 `json:"round_reward"` //总奖
|
|
||||||
BetSizeIndex int64 `json:"bet_size_index"` //选中的单注下标
|
|
||||||
BetLevelIndex int64 `json:"bet_level_index"` //选中的等级下标
|
|
||||||
LinesIndex int64 `json:"lines_index"` //选中的线数下标
|
|
||||||
TotalBet float64 `json:"total_bet"` //下注
|
|
||||||
BetBeforeCoin float64 `json:"bet_before_coin"` //下注前
|
|
||||||
BetAfterCoin float64 `json:"bet_after_coin"` //下注后
|
|
||||||
FinalCoin float64 `json:"final_coin"` //结束
|
|
||||||
ActualBet float64 `json:"-"`
|
|
||||||
ActualWin float64 `json:"-"`
|
|
||||||
SnId int32 `json:"snid,omitempty"`
|
|
||||||
}
|
|
||||||
type BetConfig struct {
|
|
||||||
BetChangeList []float64 `json:"bet_change_list"`
|
|
||||||
BetSize []float64 `json:"bet_size"` //单注
|
|
||||||
BetLevel []int64 `json:"bet_level"` //下注线数
|
|
||||||
BetLines []int64 `json:"bet_lines"` //可选线数
|
|
||||||
BetType int `json:"bet_type"` //total计算方式 1.显示成Lines betSize*betLevel*lines (lines)
|
|
||||||
BetSizeIndex int64 `json:"bet_size_index"` //选中的单注下标
|
|
||||||
BetLevelIndex int64 `json:"bet_level_index"` //选中的等级下标
|
|
||||||
BetLineIndex int64 `json:"bet_line_index"` //选中的线数下标
|
|
||||||
}
|
|
||||||
type TableInfo struct {
|
|
||||||
SpinResult GameEnd `json:"spin_result"`
|
|
||||||
Coin float64 `json:"coin"`
|
|
||||||
BetConfig BetConfig `json:"bet_config"`
|
|
||||||
}
|
|
||||||
|
|
@ -1,382 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.CashManiaBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.6,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.9,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 1,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 9,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 10,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 30,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 90,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line1Form5X5TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 2,
|
|
||||||
node_type = "FreeSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line1Form5X5TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaReelBaseSpinRange = {
|
|
||||||
{ 5, 5, 5 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaReelBaseSpinReel = {
|
|
||||||
{ 1, 200, 2, 200, 3, 200, 4, 200, 5, 200 },
|
|
||||||
{ 6, 200, 7, 200, 8, 200, 9, 200, 10, 200, 11, 200, 12, 200, 13, 200, 14, 200, 15, 200, 16, 200, 17, 200, 18, 200, 19, 200 },
|
|
||||||
{ 1, 200, 2, 200, 3, 200, 4, 200, 5, 200 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "100倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 1 },
|
|
||||||
pay_rate = { 0, 0, 100 },
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "5倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 2 },
|
|
||||||
pay_rate = { 0, 0, 50 },
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "1倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 3 },
|
|
||||||
pay_rate = { 0, 0, 10 },
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "0.5倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 4 },
|
|
||||||
pay_rate = { 0, 0, 5 },
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "0.1倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 5 },
|
|
||||||
pay_rate = { 0, 0, 1 },
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "5FreeSpin",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 6 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "10FreeSpin",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 7 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "20FreeSpin",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
id = 9,
|
|
||||||
name = "wildx1",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 9 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
id = 10,
|
|
||||||
name = "wildx2",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 10 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
id = 11,
|
|
||||||
name = "wildx3",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 11 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
id = 12,
|
|
||||||
name = "wildx5",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 12 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[13] = {
|
|
||||||
id = 13,
|
|
||||||
name = "wildx10",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 13 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[14] = {
|
|
||||||
id = 14,
|
|
||||||
name = "wildx15",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 14 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[15] = {
|
|
||||||
id = 15,
|
|
||||||
name = "wildx20",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 15 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[16] = {
|
|
||||||
id = 16,
|
|
||||||
name = "wildx30",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 16 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[17] = {
|
|
||||||
id = 17,
|
|
||||||
name = "wildx40",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 17 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[18] = {
|
|
||||||
id = 18,
|
|
||||||
name = "wildx50",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 18 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[19] = {
|
|
||||||
id = 19,
|
|
||||||
name = "wildx100",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 19 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 200 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 0.1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
|
|
@ -1,334 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.15,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.45,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 0.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 0.75,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 2.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 4.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 7.5,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 22.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "FreeSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "FreeSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 2,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "SureWinBaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "SureWinBaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonReelBaseSpinRange = {
|
|
||||||
{ 3, 3, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonReelBaseSpinReel = {
|
|
||||||
{ 3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 7, 6, 6, 6, 4, 3, 4, 1, 3, 7, 7, 6, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 7, 4, 7, 3, 3, 3,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|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 2 },
|
|
||||||
pay_rate = { 0, 0, 50 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 3 },
|
|
||||||
pay_rate = { 0, 0, 25 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "灯笼",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 4 },
|
|
||||||
pay_rate = { 0, 0, 10 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "福炮",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 5 },
|
|
||||||
pay_rate = { 0, 0, 5 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "花结",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 6 },
|
|
||||||
pay_rate = { 0, 0, 3 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "铜钱",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 7 },
|
|
||||||
pay_rate = { 0, 0, 2 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "X2",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
id = 9,
|
|
||||||
name = "X5",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
id = 10,
|
|
||||||
name = "X10",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "Empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
|
|
@ -1,284 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.15,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.45,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 0.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 0.75,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 2.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 4.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 7.5,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 22.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "ReSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "ReSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelBaseSpinRange = {
|
|
||||||
{ 3, 3, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelBaseSpinReel = {
|
|
||||||
{ 3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 7, 6, 6, 6, 5, 3, 4, 2, 7, 7, 7, 6, 5, 5, 5, 4, 6, 5, 5, 5, 4, 7, 7, 7, 4, 7, 6, 5, 3, 3, 3, 5, 7, 6, 5, 7, 6, 5, 7, 7, 7, 6, 5, 7, 4, 3, 6, 5, 7, 6, 3, 6, 6, 2, 3, 5, 6, 3, 2, 2, 5, 7, 6, 6, 4, 1, 7, 7, 3, 6, 4, 7, 6, 1, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 1, 4, 4, 4, 5, 3, 5, 6, 7, 2, 5, 6, 5, 7, 7, 7, 6, 1, 5, 7, 6, 6, 7, 7, 6, 3, 5, 1, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 5, 1, 3, 7, 7, 7, 4, 5, 7, 6, 4, 5, 4, 6, 7, 4, 2, 6, 3, 5, 7, 5, 5, 5, 6, 1, 2, 4, 6, 5, 3, 3, 3, 2, 7, 4, 7, 6, 7, 7, 7, 6, 7, 4, 6, 1, 5, 6, 6, 6, 7, 4, 5, 2, 3, 7, 5, 7,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 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelReSpinRange = {
|
|
||||||
{ 3, 3, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelReSpinReel = {
|
|
||||||
{ 1, 1, 1, 2, 2, 2, 2, 7, 7, 7, 7, 8, 8, 8, 6, 6, 6, 6, 3, 3, 3, 3, 8, 8, 8, 5, 5, 5, 5, 4, 4, 4, 4, 8, 8, 8 },
|
|
||||||
{ 1, 1, 1 },
|
|
||||||
{ 1, 1, 1, 2, 2, 2, 2, 7, 7, 7, 7, 8, 8, 8, 6, 6, 6, 6, 3, 3, 3, 3, 8, 8, 8, 5, 5, 5, 5, 4, 4, 4, 4, 8, 8, 8 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 1 },
|
|
||||||
pay_rate = { 0, 0, 300 },
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "倒福",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 2 },
|
|
||||||
pay_rate = { 0, 0, 100 },
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 3 },
|
|
||||||
pay_rate = { 0, 0, 50 },
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "钱袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 4 },
|
|
||||||
pay_rate = { 0, 0, 30 },
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "爆竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 5 },
|
|
||||||
pay_rate = { 0, 0, 15 },
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "橘子",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 6 },
|
|
||||||
pay_rate = { 0, 0, 5 },
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "花生",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 7 },
|
|
||||||
pay_rate = { 0, 0, 3 },
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "SuperStack",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
|
|
@ -1,293 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.6,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.9,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 1,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 9,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 10,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 30,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 90,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "ReSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "ReSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxReelBaseSpinRange = {
|
|
||||||
{ 3, 4, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxReelBaseSpinReel = {
|
|
||||||
{ 3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 5, 6, 7, 6, 6, 6, 2, 2, 2, 1, 1, 4, 4, 4, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 7, 4, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 2, 6, 5, 7, 6, 6, 6, 2, 2, 2, 5, 6, 2, 2, 2, 5, 7, 6, 6, 4, 2, 7, 7, 7, 6, 5, 7, 6, 1, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 1, 6, 6, 6, 5, 7, 5, 6, 7, 2, 5, 6, 5, 7, 7, 7, 6, 2, 5, 7, 6, 6, 7, 7, 6, 7, 5, 2, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 2, 2, 2, 7, 7, 7, 4, 5, 4, 4, 4, 6, 4, 4, 7, 4, 2, 6, 7, 7, 5, 5, 5, 7, 6, 1, 2, 4, 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7, 7, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 1 },
|
|
||||||
pay_rate = { 0, 0, 200 },
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 2 },
|
|
||||||
pay_rate = { 0, 0, 100 },
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "金锦盒",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 3 },
|
|
||||||
pay_rate = { 0, 0, 50 },
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "钱袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 4 },
|
|
||||||
pay_rate = { 0, 0, 20 },
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 5 },
|
|
||||||
pay_rate = { 0, 0, 10 },
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "橘子",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 6 },
|
|
||||||
pay_rate = { 0, 0, 5 },
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "炮竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 7 },
|
|
||||||
pay_rate = { 0, 0, 3 },
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "SuperStack1",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
id = 9,
|
|
||||||
name = "SuperStack2",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 9 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
|
|
@ -1,346 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.6,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.9,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 1,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 9,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 10,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 30,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 90,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitCashPrizeWeight = {
|
|
||||||
{
|
|
||||||
id = 1,
|
|
||||||
prize_value = 0.5,
|
|
||||||
weight = 144,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 2,
|
|
||||||
prize_value = 1,
|
|
||||||
weight = 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 3,
|
|
||||||
prize_value = 2,
|
|
||||||
weight = 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 4,
|
|
||||||
prize_value = 5,
|
|
||||||
weight = 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 5,
|
|
||||||
prize_value = 10,
|
|
||||||
weight = 50,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 6,
|
|
||||||
prize_value = 20,
|
|
||||||
weight = 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 7,
|
|
||||||
prize_value = 30,
|
|
||||||
weight = 15,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 8,
|
|
||||||
prize_value = 50,
|
|
||||||
weight = 10,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 9,
|
|
||||||
prize_value = 100,
|
|
||||||
weight = 5,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 10,
|
|
||||||
prize_value = 500,
|
|
||||||
weight = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "FreeSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "FreeSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitReelBaseSpinRange = {
|
|
||||||
{ 3, 4, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitReelBaseSpinReel = {
|
|
||||||
{ 3, 7, 2, 2, 2, 3, 5, 4, 7, 8, 8, 8, 6, 2, 4, 5, 6, 7, 6, 6, 6, 2, 2, 2, 1, 5, 4, 4, 4, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 5, 6, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 2, 6, 5, 7, 8, 8, 8, 2, 2, 2, 5, 6, 2, 2, 2, 5, 7, 6, 6, 4, 2, 7, 7, 7, 6, 5, 7, 6, 1, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 1, 6, 6, 6, 5, 7, 5, 6, 7, 2, 5, 6, 5, 3, 3, 3, 6, 2, 5, 7, 6, 8, 8, 8, 6, 7, 5, 2, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 2, 2, 2, 7, 8, 8, 8, 5, 4, 4, 4, 6, 4, 4, 7, 4, 2, 6, 7, 7, 5, 5, 5, 7, 6, 1, 2, 4, 6, 5, 7, 2, 2, 2, 7, 4, 7, 5, 6, 8, 8, 8, 5, 6, 7, 4, 6, 1, 5, 5, 5, 6, 6, 6, 7, 4, 5, 2, 3, 7, 5, 7, 6, 4, 4, 4, 7, 7, 7, 3, 4, 5, 5, 5, 2, 7, 7, 7, 4, 5, 7, 6, 5, 7, 6, 5, 5, 7, 4, 5, 6, 7, 6, 4, 4, 2, 5, 5, 5, 7, 6, 4, 5, 4, 6, 7, 4, 7, 3, 6, 5, 8, 8, 8, 2, 7, 7, 2, 2, 6, 5, 2, 6, 4, 7, 6, 3, 5, 4, 6, 6, 6, 3, 4, 7, 2, 5,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 200, 200, 200, 200, 200 },
|
|
||||||
{ 200, 200, 200, 8, 8, 8, 8, 200, 200, 200, 200, 200 },
|
|
||||||
{ 200, 200, 200, 200, 8, 8, 8, 200, 200, 200, 200, 200 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 1 },
|
|
||||||
pay_rate = { 0, 0, 200 },
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 2 },
|
|
||||||
pay_rate = { 0, 0, 100 },
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "钱袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 3 },
|
|
||||||
pay_rate = { 0, 0, 50 },
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 4 },
|
|
||||||
pay_rate = { 0, 0, 10 },
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "铜币",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 5 },
|
|
||||||
pay_rate = { 0, 0, 5 },
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "爆竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 6 },
|
|
||||||
pay_rate = { 0, 0, 3 },
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "胡萝卜",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 7 },
|
|
||||||
pay_rate = { 0, 0, 2 },
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "Cash",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "Empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 200 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
|
|
@ -1,293 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.15,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.45,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 0.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 0.75,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 2.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 4.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 7.5,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 22.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "ReSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "ReSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelBaseSpinRange = {
|
|
||||||
{ 3, 3, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelBaseSpinReel = {
|
|
||||||
{ 3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 7, 6, 6, 6, 4, 3, 4, 0, 3, 7, 7, 6, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 7, 4, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 3, 6, 5, 7, 6, 3, 6, 6, 2, 3, 5, 6, 3, 2, 2, 5, 7, 6, 6, 4, 0, 7, 7, 3, 6, 4, 7, 6, 0, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 0, 4, 4, 4, 5, 3, 5, 6, 7, 2, 5, 6, 5, 7, 7, 7, 6, 0, 5, 7, 6, 6, 7, 7, 6, 3, 5, 0, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 5, 0, 3, 7, 7, 7, 4, 5, 4, 4, 4, 6, 4, 4, 7, 4, 2, 6, 3, 5, 7, 5, 5, 5, 6, 0, 2, 4, 6, 5, 3, 3, 3, 2, 7, 4, 7, 6, 7, 7, 7, 6, 7, 4, 6, 0, 5, 6, 6, 6, 7, 4, 5, 2, 3, 7, 5, 7, 6, 7, 7,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||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelReSpinRange = {
|
|
||||||
{ 3, 3, 3 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelReSpinReel = {
|
|
||||||
{ 8, 8, 0, 200, 200, 8, 8, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 200, 200, 8, 200, 200, 0, 8, 8, 200, 200, 8, 0, 0, 200, 200, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 0, 200, 200, 8, 200, 200, 0, 0, 8, 200, 200, 8, 200, 200 },
|
|
||||||
{ 8, 8, 0, 200, 200, 8, 8, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 200, 200, 8, 200, 200, 0, 8, 8, 200, 200, 8, 0, 0, 200, 200, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 0, 200, 200, 8, 200, 200, 0, 0, 8, 200, 200, 8, 200, 200 },
|
|
||||||
{ 8, 8, 0, 200, 200, 8, 8, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 200, 200, 8, 200, 200, 0, 8, 8, 200, 200, 8, 0, 0, 200, 200, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 0, 200, 200, 8, 200, 200, 0, 0, 8, 200, 200, 8, 200, 200 },
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = { 1 },
|
|
||||||
pay_rate = { 0, 0, 250 },
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 2 },
|
|
||||||
pay_rate = { 0, 0, 100 },
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "玉饰",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 3 },
|
|
||||||
pay_rate = { 0, 0, 25 },
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "福袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 4 },
|
|
||||||
pay_rate = { 0, 0, 10 },
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 5 },
|
|
||||||
pay_rate = { 0, 0, 8 },
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "爆竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 6 },
|
|
||||||
pay_rate = { 0, 0, 5 },
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "橘子",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 7 },
|
|
||||||
pay_rate = { 0, 0, 3 },
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "SuperStack",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 8 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "Empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = { 200 },
|
|
||||||
pay_rate = { 0, 0, 0 },
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,52 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.PrizeModelPrizeModelTypeA = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
ani_type = "big_win",
|
|
||||||
min_multiple = 10,
|
|
||||||
max_multiple = 25,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
ani_type = "mega_win",
|
|
||||||
min_multiple = 25,
|
|
||||||
max_multiple = 50,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
ani_type = "epic_win",
|
|
||||||
min_multiple = 50,
|
|
||||||
max_multiple = -1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.PrizeModelPrizeModelTypeB = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
ani_type = "big_win",
|
|
||||||
min_multiple = 15,
|
|
||||||
max_multiple = 30,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
ani_type = "mega_win",
|
|
||||||
min_multiple = 30,
|
|
||||||
max_multiple = 45,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
ani_type = "epic_win",
|
|
||||||
min_multiple = 45,
|
|
||||||
max_multiple = 60,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
ani_type = "epic_win",
|
|
||||||
min_multiple = 60,
|
|
||||||
max_multiple = -1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
@echo off
|
|
||||||
if exist "external" (cd external)
|
|
||||||
|
|
||||||
if not exist converter.exe (
|
|
||||||
echo Building converter...
|
|
||||||
go build -o converter.exe ../tools/converter
|
|
||||||
) else (
|
|
||||||
echo converter.exe already exists.
|
|
||||||
)
|
|
||||||
|
|
||||||
converter.exe go /excel ../internal/exported/excel2go ..
|
|
||||||
echo Done.
|
|
||||||
pause
|
|
||||||
exit
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# external
|
|
||||||
|
|
||||||
### 后续需要移植出去,暂时放这里
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue