Compare commits
26 Commits
b91f41037b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f6781ca4b | |||
|
|
fe82801742 | ||
| 971de6ec9f | |||
| 45a66fe5bc | |||
| a23b1c628f | |||
| e31f831a87 | |||
| d21d57ec67 | |||
| 50ee99099e | |||
| db9d3ca9a8 | |||
|
|
1d21e50432 | ||
|
|
f3c1acce25 | ||
|
|
8104229b4f | ||
| 0cc5ae49fc | |||
| 9ec0f9065f | |||
| dabd1fa4cf | |||
| dc2c88eb76 | |||
| 28e51858f5 | |||
| 384db24daa | |||
| 4161e71184 | |||
| 08dcb9fe93 | |||
| 6320dcde6f | |||
| c89dcae68d | |||
| 44e70d6d43 | |||
| 5af8cd0ed8 | |||
| 991a6da727 | |||
| 6cd840759a |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@ LogicServer/perfermance.txt
|
||||
LogicServer/scripterror.txt
|
||||
core.*
|
||||
.vscode/
|
||||
.idea/
|
||||
LogicServer/data/runtime/
|
||||
|
||||
@@ -40,7 +40,7 @@ DBServer = {
|
||||
|
||||
--数据库连接配置
|
||||
SQL = {
|
||||
Host = "127.0.0.1",
|
||||
Host = "192.168.25.110",
|
||||
Port = 3308,
|
||||
DBName = "mir_actor_s1",
|
||||
DBUser = "root",
|
||||
|
||||
@@ -6,6 +6,10 @@ path=`pwd`
|
||||
echo "======================【启动】========================"
|
||||
datetime=`date "+%Y-%m-%d.%H:%M:%S"`
|
||||
|
||||
echo "["$datetime"] 正在启动 build 服务群..."
|
||||
|
||||
/data/server/build/run.sh
|
||||
|
||||
echo "["$datetime"] 正在启动 DB 服务器 [dbserver_r]..."
|
||||
|
||||
$path/dbserver_r $path/DBServerLinux.txt
|
||||
@@ -10,7 +10,7 @@ GateServer = {
|
||||
},
|
||||
--后台服务器的地址和端口
|
||||
BackServer = {
|
||||
Host = "127.0.0.1",
|
||||
Host = "logic",
|
||||
Port = 10318,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6,6 +6,6 @@ path=`pwd`
|
||||
echo "======================【启动】========================"
|
||||
datetime=`date "+%Y-%m-%d.%H:%M:%S"`
|
||||
|
||||
echo "["$datetime"] 正在启动 Logic 服务器 [gateway_r]..."
|
||||
echo "["$datetime"] 正在启动 Gate 服务器 [gateway_r]..."
|
||||
|
||||
$path/gateway_r $path/GateWay.txt
|
||||
@@ -13,37 +13,37 @@ LogicServer = {
|
||||
|
||||
--连接:数据服务器
|
||||
DbServer = {
|
||||
Address = "127.0.0.1",
|
||||
Address = "172.36.10.25",
|
||||
Port = 10319,
|
||||
},
|
||||
|
||||
--连接:LocalLog服务器
|
||||
LocalLogServer = {
|
||||
Address = "127.0.0.1",
|
||||
Address = "172.36.10.25",
|
||||
Port = 35010,
|
||||
},
|
||||
|
||||
--连接:会话服务器
|
||||
SessionServer = {
|
||||
Address = "127.0.0.1",
|
||||
Address = "172.36.10.25",
|
||||
Port = 31000,
|
||||
},
|
||||
|
||||
--连接:Log服务器
|
||||
LogServer = {
|
||||
Address = "127.0.0.1",
|
||||
Address = "172.36.10.25",
|
||||
Port = 34000,
|
||||
},
|
||||
|
||||
--连接:AM服务器
|
||||
AMServer = {
|
||||
Host = "127.0.0.1",
|
||||
Host = "172.36.10.25",
|
||||
Port = 5660,
|
||||
},
|
||||
|
||||
--连接:后台服务器
|
||||
MgrServer = {
|
||||
Host = "127.0.0.1",
|
||||
Host = "172.36.10.25",
|
||||
Port = 8500,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -798,7 +798,7 @@ ItemMergeConfig = {
|
||||
mergebutton10 = 1,
|
||||
Eid = 57,
|
||||
second_index = 7,
|
||||
table = { { id = 365, type = 0, count = 5 }, { id = 2, type = 2, count = 1000 } },
|
||||
table = { { id = 365, type = 0, count = 3 }, { id = 2, type = 2, count = 1000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -813,7 +813,7 @@ ItemMergeConfig = {
|
||||
mergebutton10 = 1,
|
||||
Eid = 58,
|
||||
second_index = 7,
|
||||
table = { { id = 366, type = 0, count = 5 }, { id = 2, type = 2, count = 3000 } },
|
||||
table = { { id = 366, type = 0, count = 3 }, { id = 2, type = 2, count = 3000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -828,7 +828,7 @@ ItemMergeConfig = {
|
||||
mergebutton10 = 1,
|
||||
Eid = 59,
|
||||
second_index = 7,
|
||||
table = { { id = 367, type = 0, count = 5 }, { id = 2, type = 2, count = 5000 } },
|
||||
table = { { id = 367, type = 0, count = 3 }, { id = 2, type = 2, count = 5000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -843,7 +843,7 @@ ItemMergeConfig = {
|
||||
mergebutton10 = 1,
|
||||
Eid = 60,
|
||||
second_index = 7,
|
||||
table = { { id = 368, type = 0, count = 5 }, { id = 2, type = 2, count = 8000 } },
|
||||
table = { { id = 368, type = 0, count = 3 }, { id = 2, type = 2, count = 8000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -856,7 +856,7 @@ ItemMergeConfig = {
|
||||
text = "合成",
|
||||
Eid = 61,
|
||||
second_index = 7,
|
||||
table = { { id = 369, type = 0, count = 5 }, { id = 2, type = 2, count = 15000 } },
|
||||
table = { { id = 369, type = 0, count = 3 }, { id = 2, type = 2, count = 15000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -869,7 +869,7 @@ ItemMergeConfig = {
|
||||
text = "合成",
|
||||
Eid = 62,
|
||||
second_index = 7,
|
||||
table = { { id = 370, type = 0, count = 5 }, { id = 2, type = 2, count = 30000 } },
|
||||
table = { { id = 370, type = 0, count = 3 }, { id = 2, type = 2, count = 30000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -882,7 +882,7 @@ ItemMergeConfig = {
|
||||
text = "合成",
|
||||
Eid = 63,
|
||||
second_index = 7,
|
||||
table = { { id = 371, type = 0, count = 5 }, { id = 2, type = 2, count = 50000 } },
|
||||
table = { { id = 371, type = 0, count = 3 }, { id = 2, type = 2, count = 50000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -895,7 +895,7 @@ ItemMergeConfig = {
|
||||
text = "合成",
|
||||
Eid = 64,
|
||||
second_index = 7,
|
||||
table = { { id = 863, type = 0, count = 5 }, { id = 2, type = 2, count = 80000 } },
|
||||
table = { { id = 863, type = 0, count = 3 }, { id = 2, type = 2, count = 80000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -908,7 +908,7 @@ ItemMergeConfig = {
|
||||
text = "合成",
|
||||
Eid = 65,
|
||||
second_index = 7,
|
||||
table = { { id = 864, type = 0, count = 5 }, { id = 2, type = 2, count = 120000 } },
|
||||
table = { { id = 864, type = 0, count = 3 }, { id = 2, type = 2, count = 120000 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
redpointlimit = { zsLevel = 2 },
|
||||
@@ -1946,6 +1946,19 @@ ItemMergeConfig = {
|
||||
},
|
||||
},
|
||||
[2] = {
|
||||
[72] = {
|
||||
circle = 0,
|
||||
compose = { id = 840, type = 0, count = 1 },
|
||||
index = 3,
|
||||
text = "兑换",
|
||||
buttontxt10 = "合成10次",
|
||||
mergebutton10 = 1,
|
||||
Eid = 72,
|
||||
second_index = 2,
|
||||
table = { { id = 838, type = 0, count = 10 } },
|
||||
openserverday = 1,
|
||||
level = 1,
|
||||
},
|
||||
[73] = {
|
||||
circle = 0,
|
||||
compose = { id = 838, type = 0, count = 10 },
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
--P-平台福利4366.xlsx 连登礼包
|
||||
Login4366Config={
|
||||
[1] = {
|
||||
day = 1,
|
||||
reward = {{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[2] = {
|
||||
day = 2,
|
||||
reward = {{type=0,id=421,count=1},{type=7,id=7,count=3},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[3] = {
|
||||
day = 3,
|
||||
reward = {{type=0,id=261,count=1},{type=7,id=7,count=3},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[4] = {
|
||||
day = 4,
|
||||
reward = {{type=0,id=269,count=2},{type=7,id=7,count=4},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[5] = {
|
||||
day = 5,
|
||||
reward = {{type=0,id=421,count=2},{type=7,id=7,count=4},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[6] = {
|
||||
day = 6,
|
||||
reward = {{type=0,id=261,count=2},{type=7,id=7,count=5},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[7] = {
|
||||
day = 7,
|
||||
reward = {{type=0,id=421,count=3},{type=7,id=7,count=5},{type=2,id=2,count=10000}},
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
--P-平台福利4366.xlsx 手机、微信、认证礼包
|
||||
Platform4366Config={
|
||||
reward1 = {{type=0,id=1019,count=1}},
|
||||
reward2 = {{type=0,id=261,count=10},{type=0,id=269,count=1},{type=0,id=246,count=100},{type=2,id=2,count=30000}},
|
||||
reward3 = {{type=0,id=421,count=10},{type=0,id=269,count=1},{type=0,id=246,count=100},{type=2,id=2,count=30000}},
|
||||
type = 4,
|
||||
bagtype = 16,
|
||||
rewardClient = {{type=0,id=247,count=10},{type=7,id=7,count=5},{type=0,id=261,count=10},{type=2,id=2,count=20000}},
|
||||
tips = "|C:0xeee104&T:%s|领取微端登录礼包,端游操作PK更爽快",
|
||||
tips2 = "|C:0xeee104&T:%s|领取微端登录礼包,端游操作PK更爽快|E:-2,21,&U:&C:0x28ee01&T:[我也要礼包]|",
|
||||
SPID = "4",
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
--P-平台福利鲁大师.xlsx 会员礼包
|
||||
LudashimemberConfig={
|
||||
[1] = {
|
||||
id = 1,
|
||||
type = 1,
|
||||
memberLevel = 1,
|
||||
titleReward = {{type=0,id=1282,count=1}},
|
||||
giftReward = {{type=0,id=261,count=3},{type=0,id=853,count=3},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[2] = {
|
||||
id = 2,
|
||||
type = 1,
|
||||
memberLevel = 3,
|
||||
titleReward = {{type=0,id=1283,count=1}},
|
||||
giftReward = {{type=0,id=261,count=5},{type=0,id=854,count=5},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[3] = {
|
||||
id = 3,
|
||||
type = 2,
|
||||
memberLevel = 1,
|
||||
titleReward = {},
|
||||
giftReward = {{type=0,id=269,count=1},{type=0,id=247,count=3},{type=7,id=7,count=5},{type=2,id=2,count=10000}},
|
||||
},
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
--P-平台福利鲁大师.xlsx 平台vip
|
||||
LudashivipConfig={
|
||||
[1] = {
|
||||
id = 1,
|
||||
vipLevel = 1,
|
||||
titleReward = {{type=0,id=1279,count=1}},
|
||||
giftReward = {{type=0,id=421,count=3},{type=0,id=855,count=2}},
|
||||
},
|
||||
[2] = {
|
||||
id = 2,
|
||||
vipLevel = 4,
|
||||
titleReward = {{type=0,id=1280,count=1}},
|
||||
giftReward = {{type=0,id=421,count=6},{type=0,id=855,count=2}},
|
||||
},
|
||||
[3] = {
|
||||
id = 3,
|
||||
vipLevel = 7,
|
||||
titleReward = {{type=0,id=1281,count=1}},
|
||||
giftReward = {{type=0,id=421,count=8},{type=0,id=855,count=2}},
|
||||
},
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
--P-平台福利鲁大师.xlsx 鲁大师
|
||||
PlatformludashiConfig={
|
||||
host = "wan.ludashi.com",
|
||||
port = "80",
|
||||
api = "/openApi/platformVipInfo",
|
||||
SPID = "17",
|
||||
limit = 15000,
|
||||
type = 2,
|
||||
downloadBoxReward = {{type=0,id=247,count=10},{type=7,id=7,count=5},{type=0,id=261,count=10},{type=2,id=2,count=20000}},
|
||||
bindPhoneReward = {{type=0,id=351,count=1},{type=0,id=421,count=5},{type=0,id=302,count=1},{type=2,id=2,count=30000}},
|
||||
FcmReward = {{type=0,id=365,count=1},{type=0,id=261,count=10},{type=0,id=300,count=1},{type=2,id=2,count=50000}},
|
||||
boxdailyGift = {{type=0,id=269,count=1},{type=0,id=247,count=2},{type=7,id=7,count=3}},
|
||||
levelGift = {
|
||||
[1]={lvl=50,awards={{type=2,id=2,count=5000},{type=0,id=421,count=1}}},
|
||||
[2]={lvl=60,awards={{type=2,id=2,count=10000},{type=0,id=421,count=2}}},
|
||||
[3]={lvl=70,awards={{type=2,id=2,count=15000},{type=0,id=421,count=3}}},
|
||||
[4]={lvl=80,awards={{type=2,id=2,count=20000},{type=0,id=853,count=5}}},
|
||||
[5]={lvl=90,awards={{type=2,id=2,count=25000},{type=0,id=854,count=5}}},
|
||||
[6]={lvl=100,awards={{type=2,id=2,count=30000},{type=0,id=365,count=1}}},
|
||||
},
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
--P-平台福利鲁大师.xlsx 会员礼包
|
||||
ludashimemberConfig={
|
||||
[1] = {
|
||||
id = 1,
|
||||
type = 1,
|
||||
level = 1,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[2] = {
|
||||
id = 2,
|
||||
type = 1,
|
||||
level = 3,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[3] = {
|
||||
id = 3,
|
||||
type = 2,
|
||||
level = 1,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[4] = {
|
||||
id = 4,
|
||||
type = 2,
|
||||
level = 3,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
},
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
--P-平台福利鲁大师.xlsx 平台vip
|
||||
ludashivipConfig={
|
||||
[1] = {
|
||||
id = 1,
|
||||
level = 1,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[2] = {
|
||||
id = 2,
|
||||
level = 4,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=421,count=1},{type=7,id=7,count=3},{type=2,id=2,count=10000}},
|
||||
},
|
||||
[3] = {
|
||||
id = 3,
|
||||
level = 7,
|
||||
reward = {{type=0,id=1277,count=1}},
|
||||
reward1 = {{type=0,id=261,count=1},{type=7,id=7,count=3},{type=2,id=2,count=10000}},
|
||||
},
|
||||
}
|
||||
@@ -14,7 +14,7 @@ NSNoticeConfig={
|
||||
content = "购买|E:-2,19,&U:&C:0x28ee01&T:绿卡特权|,即刻获取大量转生材料、专属麻痹,急速飞升3转!升级打怪快人一步!同时开启大额金币回收!",
|
||||
starttime = 1,
|
||||
stoptime = 2,
|
||||
noticeInterval = 18000,
|
||||
noticeInterval = 1800000,
|
||||
trundle = 0,
|
||||
chatting = 1,
|
||||
},
|
||||
@@ -23,7 +23,7 @@ NSNoticeConfig={
|
||||
content = "购买|E:-2,19,&U:&C:0x28ee01&T:蓝卡特权|,晋升霸主贵族,额外金币收益、切割,属性、打金效率大幅提升,秒升六转不是梦!即刻开启寄售行道具上架,赚取你的第一桶金!",
|
||||
starttime = 1,
|
||||
stoptime = 5,
|
||||
noticeInterval = 36000,
|
||||
noticeInterval = 3600000,
|
||||
trundle = 0,
|
||||
chatting = 1,
|
||||
},
|
||||
@@ -31,7 +31,7 @@ NSNoticeConfig={
|
||||
Noticeid = 4,
|
||||
content = "|E:-2,25,&U:&C:0x28ee01&T:开启狂暴|,攻魔道大幅加成,增加10%伤害加成,输出秒天秒地。打怪回收装备金币+15%,打金效率瞬间提高!",
|
||||
starttime = 1,
|
||||
noticeInterval = 36000,
|
||||
noticeInterval = 3600000,
|
||||
trundle = 0,
|
||||
chatting = 1,
|
||||
},
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
--P-平台福利YY.xlsx 超玩俱乐部
|
||||
GameVIPConfig={
|
||||
host = "proxy.udblogin.game.yy.com",
|
||||
port = "80",
|
||||
api = "/query/cwVipInfo.do",
|
||||
vipMap = {[1]=2,[2]=6,[3]=9},
|
||||
vipGift = {
|
||||
[1]={{type=0,id=261,count=3},{type=0,id=421,count=3},{type=7,id=7,count=3},{type=0,id=247,count=3}},
|
||||
[2]={{type=0,id=261,count=3},{type=0,id=421,count=3},{type=7,id=7,count=3},{type=0,id=247,count=3}},
|
||||
[3]={{type=0,id=261,count=5},{type=0,id=269,count=10},{type=0,id=904,count=1},{type=0,id=914,count=1}},
|
||||
},
|
||||
VIPTitle = "超玩俱乐部会员礼包",
|
||||
VIPContent = "恭喜你领取了超玩俱乐部会员专属礼包",
|
||||
dailyGift = {
|
||||
[1]={{type=0,id=247,count=5},{type=2,id=2,count=3000},{type=5,id=5,count=1000}},
|
||||
[2]={{type=0,id=247,count=5},{type=2,id=2,count=4000},{type=5,id=5,count=2000}},
|
||||
[3]={{type=0,id=247,count=5},{type=2,id=2,count=5000},{type=5,id=5,count=3000}},
|
||||
},
|
||||
VIPDailyTitle = "超玩俱乐部会员每日礼包",
|
||||
VIPDailyContent = "恭喜你领取了超玩俱乐部会员专属礼包",
|
||||
GameVIPbuff = {
|
||||
[1]={buffid=0},
|
||||
[2]={buffid=0},
|
||||
[3]={buffid=0}
|
||||
},
|
||||
vipGiftDisplay = {
|
||||
[1]={index=1,viplvl=1,rewards={{type=0,id=261,count=3},{type=0,id=421,count=3},{type=7,id=7,count=3},{type=0,id=247,count=3}}},
|
||||
[2]={index=2,viplvl=1,rewards={{type=0,id=261,count=3},{type=0,id=421,count=3},{type=7,id=7,count=3},{type=0,id=247,count=3}}},
|
||||
[3]={index=3,viplvl=3,rewards={{type=0,id=261,count=5},{type=0,id=269,count=10},{type=0,id=904,count=1},{type=0,id=914,count=1}}},
|
||||
},
|
||||
dailyGiftDisplay = {
|
||||
[1]={index=1,viplvl=2,rewards={{type=0,id=247,count=5},{type=2,id=2,count=3000},{type=5,id=5,count=1000}}},
|
||||
[2]={index=2,viplvl=6,rewards={{type=0,id=247,count=5},{type=2,id=2,count=4000},{type=5,id=5,count=2000}}},
|
||||
[3]={index=3,viplvl=9,rewards={{type=0,id=247,count=5},{type=2,id=2,count=5000},{type=5,id=5,count=3000}}},
|
||||
},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
--P-平台福利YY.xlsx YY大厅特权
|
||||
YYMemberConfig={
|
||||
host = "proxy.udblogin.game.yy.com",
|
||||
port = "80",
|
||||
api = "/yy/lobbygift/query/queryInfo.do",
|
||||
freshmanGift = {{type=0,id=247,count=5},{type=7,id=7,count=3},{type=0,id=261,count=2},{type=2,id=2,count=20000}},
|
||||
fgTitle = "YY大厅新手礼包",
|
||||
fgContent = "恭喜你领取了YY大厅新手礼包",
|
||||
loginGift = {
|
||||
[1]={{type=0,id=269,count=1},{type=7,id=7,count=2},{type=2,id=2,count=10000}},
|
||||
[2]={{type=0,id=421,count=1},{type=7,id=7,count=3},{type=2,id=2,count=10000}},
|
||||
[3]={{type=0,id=261,count=1},{type=7,id=7,count=3},{type=2,id=2,count=10000}},
|
||||
[4]={{type=0,id=269,count=2},{type=7,id=7,count=4},{type=2,id=2,count=10000}},
|
||||
[5]={{type=0,id=421,count=2},{type=7,id=7,count=4},{type=2,id=2,count=10000}},
|
||||
[6]={{type=0,id=261,count=2},{type=7,id=7,count=5},{type=2,id=2,count=10000}},
|
||||
[7]={{type=0,id=421,count=3},{type=7,id=7,count=5},{type=2,id=2,count=10000}},
|
||||
},
|
||||
logTitle = "YY大厅登录礼包",
|
||||
logContent = "你已通过YY大厅登录超过了%d天,领取了YY大厅登录礼包",
|
||||
levelGift = {
|
||||
[1]={lvl=42,awards={{type=0,id=247,count=2},{type=7,id=7,count=2},{type=2,id=2,count=20000}}},
|
||||
[2]={lvl=49,awards={{type=0,id=247,count=3},{type=7,id=7,count=2},{type=2,id=2,count=20000}}},
|
||||
[3]={lvl=55,awards={{type=0,id=247,count=4},{type=7,id=7,count=2},{type=2,id=2,count=20000}}},
|
||||
[4]={lvl=65,awards={{type=0,id=247,count=5},{type=0,id=853,count=2},{type=2,id=2,count=20000}}},
|
||||
[5]={lvl=75,awards={{type=0,id=247,count=6},{type=0,id=365,count=1},{type=2,id=2,count=20000}}},
|
||||
[6]={lvl=85,awards={{type=0,id=247,count=6},{type=0,id=365,count=1},{type=2,id=2,count=20000}}},
|
||||
[7]={lvl=95,awards={{type=0,id=247,count=6},{type=0,id=365,count=1},{type=2,id=2,count=20000}}},
|
||||
},
|
||||
lvgTitle = "YY大厅等级礼包",
|
||||
nobleGift = {
|
||||
[1]={{type=0,id=261,count=5},{type=0,id=854,count=3},{type=2,id=2,count=10000}},
|
||||
[2]={{type=0,id=261,count=5},{type=0,id=854,count=3},{type=2,id=2,count=10000}},
|
||||
[3]={{type=0,id=261,count=5},{type=0,id=854,count=3},{type=2,id=2,count=10000}},
|
||||
},
|
||||
ngTitle = "YY大厅贵族礼包",
|
||||
lvgContent = "你的等级已达到了%d级,领取了YY大厅等级礼包",
|
||||
ngContent = "你的身份为%s,领取了YY大厅贵族礼包",
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
--P-平台福利YY.xlsx YY会员
|
||||
YYVIPConfig={
|
||||
host = "proxy.udblogin.game.yy.com",
|
||||
port = "80",
|
||||
api = "/query/yyVipInfo.do",
|
||||
newServerGift = {
|
||||
[1]={viplvl=1,title={type=16,id=7,count=1},gift={type=0,id=481,count=1}},
|
||||
[2]={viplvl=4,title={type=16,id=8,count=1},gift={type=0,id=482,count=1}},
|
||||
[3]={viplvl=7,title={type=16,id=9,count=1},gift={type=0,id=483,count=1}},
|
||||
},
|
||||
nsTitle = "YY会员新服豪礼",
|
||||
nsContent = "领取了YY会员新服豪礼",
|
||||
weeklyGift = {
|
||||
[1]={yb=160,viplvl=1,gift={type=0,id=487,count=1}},
|
||||
[2]={yb=188,viplvl=4,gift={type=0,id=488,count=1}},
|
||||
[3]={yb=288,viplvl=7,gift={type=0,id=489,count=1}},
|
||||
},
|
||||
wgTitle = "YY会员专属每周礼包",
|
||||
wgContent = "这是您购买的YY会员专属每周礼包,请收下",
|
||||
dailyGift = {
|
||||
[1]={yb=17,viplvl=1,item={type=0,id=484,count=1}},
|
||||
[2]={yb=20,viplvl=4,item={type=0,id=485,count=1}},
|
||||
[3]={yb=35,viplvl=7,item={type=0,id=486,count=1}},
|
||||
},
|
||||
dgTitle = "YY会员专属每日礼包",
|
||||
dgContent = "这是您购买的YY会员专属每日礼包,请收下",
|
||||
SPID = "dudu",
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
--#include "..\..\language\LangCode.txt" once
|
||||
--ͨ<>û<C3BB><EEB6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ActiGiftBagConfig =
|
||||
{
|
||||
|
||||
--------------------------------ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ActiGiftBagConst actiType
|
||||
--<2D><EFBFBD>б<EFBFBD>
|
||||
commonList=
|
||||
{
|
||||
--2015<31><35><EFBFBD>ڻ-<2D><><EFBFBD><EFBFBD>ӭ<EFBFBD><D3AD> type=1039
|
||||
--#include "actigiftbags/SF2015/SF2015BlessToSprirt.txt"
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
--测试 春节活动-祈福迎神 type=1039
|
||||
{
|
||||
--活动类型. --描述
|
||||
type=1039,
|
||||
--怪物Id
|
||||
name=1356,
|
||||
info=OldLang.Script.wildBossScene001,
|
||||
|
||||
actiList=
|
||||
{
|
||||
|
||||
{
|
||||
--活动id
|
||||
id=1,
|
||||
--名称:喜气礼包(免费领取)
|
||||
name=OldLang.Script.wildBossScene001,
|
||||
--XX礼包名称
|
||||
info=OldLang.Script.wildBossScene001,
|
||||
--最大可领取
|
||||
exValue=1,
|
||||
|
||||
--免费领
|
||||
costAwards=
|
||||
{
|
||||
{ type = 15,count = 0,},
|
||||
},
|
||||
|
||||
--获得的奖励
|
||||
awards =
|
||||
{
|
||||
{ type = 0, id = 2986, count = 2,},
|
||||
{ type = 0, id = 3380, count = 2,},
|
||||
{ type = 0, id = 3386, count = 5,},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
--活动id --对应服务器Id
|
||||
id=2,
|
||||
--名称
|
||||
name=OldLang.Script.wildBossScene002,
|
||||
--XX礼包名称
|
||||
info=OldLang.Script.wildBossScene002,
|
||||
--最大可领取
|
||||
exValue=10,
|
||||
--领取花费元宝
|
||||
costAwards=
|
||||
{
|
||||
{ type = 15,count = 50,},
|
||||
},
|
||||
--获得的奖励
|
||||
awards =
|
||||
{
|
||||
{ type = 0, id = 2745, count = 1,},
|
||||
{ type = 0, id = 2986, count = 3,},
|
||||
{ type = 0, id = 3380, count = 3,},
|
||||
{ type = 0, id = 3386, count = 5,},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
--活动id
|
||||
id=3,
|
||||
--名称
|
||||
name=OldLang.Script.wildBossScene003,
|
||||
--XX礼包名称
|
||||
info=OldLang.Script.wildBossScene003,
|
||||
--最大可领取
|
||||
exValue=10,
|
||||
--领取花费元宝
|
||||
costAwards=
|
||||
{
|
||||
{ type = 15,count = 100,},
|
||||
},
|
||||
--获得的奖励
|
||||
awards =
|
||||
{
|
||||
{ type = 0, id = 3304, count = 1 ,},
|
||||
{ type = 0, id = 3379, count = 2 ,},
|
||||
{ type = 0, id = 2986, count = 5 ,},
|
||||
{ type = 0, id = 3380, count = 5 ,},
|
||||
{ type = 0, id = 3386, count = 10,},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
@@ -1,9 +0,0 @@
|
||||
--AB-活动付费.xlsx 10014-YY微信礼包
|
||||
Activity10014Config={
|
||||
[10027] = {
|
||||
Id = 10027,
|
||||
OpenDays = 1,
|
||||
cdktype = 1015,
|
||||
NormalRewards = {{type=0,id=492,count=1},},
|
||||
},
|
||||
}
|
||||
@@ -2978,11 +2978,11 @@ BuffConf={
|
||||
group = 8,
|
||||
times = 86400,
|
||||
interval = 1,
|
||||
timeoverlay = false,
|
||||
timeoverlay = true,
|
||||
iconshow = 1,
|
||||
icon = 31,
|
||||
issave = true,
|
||||
dieremove = false,
|
||||
dieremove = true,
|
||||
},
|
||||
[241] = {
|
||||
id = 241,
|
||||
|
||||
@@ -1,52 +1,63 @@
|
||||
--AA-礼包码CDKey.xlsx 通码配置
|
||||
CommonCDKeyConf={
|
||||
["VIP666"] = {
|
||||
cdkey = "VIP666",
|
||||
awards = {{type=2,id=2,count=500000},{type=0,id=480,count=20},{type=0,id=970,count=5}},
|
||||
mailtitle = "系统邮件",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["VIP888"] = {
|
||||
cdkey = "VIP888",
|
||||
awards = {{type=0,id=1018,count=3},{type=0,id=994,count=3},{type=0,id=269,count=5}},
|
||||
mailtitle = "系统邮件",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["VIP999"] = {
|
||||
cdkey = "VIP999",
|
||||
awards = {{type=0,id=261,count=20},{type=0,id=421,count=5},{type=0,id=954,count=10}},
|
||||
mailtitle = "系统邮件",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["LINUXDO"] = {
|
||||
cdkey = "LINUXDO",
|
||||
awards = {{type=0,id=261,count=100},{type=0,id=421,count=10},{type=0,id=389,count=5},{type=0,id=1270,count=1}},
|
||||
mailtitle = "LINUXDO的各位佬,感谢你的支持!",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["weliowork"] = {
|
||||
cdkey = "weliowork",
|
||||
awards = {{type=0,id=1151,count=1},{type=0,id=1166,count=10},{type=0,id=1250,count=1}},
|
||||
mailtitle = "致敬论坛的黑白佬!",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["newyear"] = {
|
||||
cdkey = "辞旧迎新",
|
||||
awards = {{type=0,id=1151,count=1},{type=0,id=1164,count=100},{type=0,id=1250,count=1}},
|
||||
mailtitle = "预祝大家新年快乐,阖家欢乐!",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["bainian"] = {
|
||||
cdkey = "拜年",
|
||||
awards = {{type=0,id=1151,count=1},{type=0,id=1164,count=100},{type=0,id=1250,count=1}},
|
||||
mailtitle = "给您拜年啦!",
|
||||
mailcontent = "岁序常易,华章日新。在这辞旧迎新的美好时刻,愿新年的钟声为您带来无尽的喜悦与祥和。愿您在新的一年里,万事胜意,阖家幸福,身体安康,笑口常开!新春快乐,蛇年大吉!。",
|
||||
switch = 1,
|
||||
},
|
||||
CommonCDKeyConf = {
|
||||
["VIP666"] = {
|
||||
cdkey = "VIP666",
|
||||
awards = { { type = 2, id = 2, count = 500000 }, { type = 0, id = 480, count = 20 }, { type = 0, id = 970, count = 5 } },
|
||||
mailtitle = "系统邮件",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["VIP888"] = {
|
||||
cdkey = "VIP888",
|
||||
awards = { { type = 0, id = 1018, count = 3 }, { type = 0, id = 994, count = 3 }, { type = 0, id = 269, count = 5 } },
|
||||
mailtitle = "系统邮件",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["VIP999"] = {
|
||||
cdkey = "VIP999",
|
||||
awards = { { type = 0, id = 261, count = 20 }, { type = 0, id = 421, count = 5 }, { type = 0, id = 954, count = 10 } },
|
||||
mailtitle = "系统邮件",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["LINUXDO"] = {
|
||||
cdkey = "LINUXDO",
|
||||
awards = { { type = 0, id = 261, count = 100 }, { type = 0, id = 421, count = 10 }, { type = 0, id = 389, count = 5 }, {
|
||||
type = 0,
|
||||
id = 1270,
|
||||
count = 1,
|
||||
} },
|
||||
mailtitle = "LINUXDO的各位佬,感谢你的支持!",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["weliowork"] = {
|
||||
cdkey = "weliowork",
|
||||
awards = { { type = 0, id = 1151, count = 1 }, { type = 0, id = 1166, count = 10 }, { type = 0, id = 1250, count = 1 } },
|
||||
mailtitle = "致敬论坛的黑白佬!",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["newyear"] = {
|
||||
cdkey = "辞旧迎新",
|
||||
awards = { { type = 0, id = 1151, count = 1 }, { type = 0, id = 1164, count = 100 }, { type = 0, id = 1250, count = 1 } },
|
||||
mailtitle = "预祝大家新年快乐,阖家欢乐!",
|
||||
mailcontent = "尊敬的玩家:感谢您的支持,请查收您的礼包奖励。",
|
||||
switch = 1,
|
||||
},
|
||||
["bainian"] = {
|
||||
cdkey = "拜年",
|
||||
awards = { { type = 0, id = 1151, count = 1 }, { type = 0, id = 1164, count = 100 }, { type = 0, id = 1250, count = 1 } },
|
||||
mailtitle = "给您拜年啦!",
|
||||
mailcontent = "岁序常易,华章日新。在这辞旧迎新的美好时刻,愿新年的钟声为您带来无尽的喜悦与祥和。愿您在新的一年里,万事胜意,阖家幸福,身体安康,笑口常开!新春快乐,蛇年大吉!。",
|
||||
switch = 1,
|
||||
},
|
||||
["tiancijiyuan"] = {
|
||||
cdkey = "tiancijiyuan",
|
||||
awards = { { type = 0, id = 1395, count = 1 } },
|
||||
mailtitle = "天赐机缘",
|
||||
mailcontent = "国服和奶昔服合并,并降下机缘,附赠给您一个机缘宝箱,看看你的运气吧!宝盒包含了有刈鹿刀,霜华,不争,3阶魔器宝盒,天命之子(时装),5w元宝,黄金宸龙,辉金甲,金牛炎宝盒以及金牛宝盒,是非是欧,全靠运气,最后遥祝大家都能获得自己心仪的物品~",
|
||||
switch = 1,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
--lua script
|
||||
--#include "..\..\language\LangCode.config"
|
||||
--#include ".\StdItems.config"
|
||||
@@ -2220,6 +2220,11 @@ DropGroupConfig = {
|
||||
type = 2,
|
||||
group = { { rate = 100, id = 2100188 } },
|
||||
},
|
||||
[100882] = {
|
||||
id = 100882,
|
||||
type = 2,
|
||||
group = { { rate = 100, id = 2100189 } },
|
||||
},
|
||||
[110001] = {
|
||||
id = 110001,
|
||||
type = 2,
|
||||
@@ -8794,6 +8799,7 @@ DropGroupConfig = {
|
||||
{ rate = 0.1, id = 2010049 },
|
||||
{ rate = 20, id = 2100063 },
|
||||
{ rate = 100, id = 2100039 },
|
||||
{ rate = 5, id = 1000600 },
|
||||
},
|
||||
},
|
||||
[200140] = {
|
||||
@@ -8850,6 +8856,7 @@ DropGroupConfig = {
|
||||
{ rate = 30, id = 2100063 },
|
||||
{ rate = 5, id = 2100069 },
|
||||
{ rate = 100, id = 2100039 },
|
||||
{ rate = 5, id = 1000600 },
|
||||
},
|
||||
},
|
||||
[200141] = {
|
||||
|
||||
@@ -10366,4 +10366,23 @@ DropTableConfig = {
|
||||
},
|
||||
weeklimit = {},
|
||||
},
|
||||
[2100189] = {
|
||||
id = 2100189,
|
||||
type = 2,
|
||||
table = {
|
||||
{ rate = 2, type = 0, id = 1394, count = 1 },
|
||||
{ rate = 2, type = 0, id = 1384, count = 1 },
|
||||
{ rate = 2, type = 0, id = 1385, count = 1 },
|
||||
{ rate = 2, type = 0, id = 1386, count = 1 },
|
||||
{ rate = 2, type = 0, id = 1387, count = 1 },
|
||||
|
||||
{ rate = 2, type = 0, id = 1297, count = 1 },
|
||||
{ rate = 2, type = 0, id = 1129, count = 1 },
|
||||
{ rate = 6, type = 0, id = 380, count = 500 },
|
||||
{ rate = 10, type = 0, id = 1147, count = 3 },
|
||||
{ rate = 30, type = 0, id = 1383, count = 1 },
|
||||
{ rate = 40, type = 0, id = 1382, count = 1 },
|
||||
},
|
||||
weeklimit = {},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -27432,7 +27432,7 @@ StdItems = {
|
||||
desc = "可在【合成-换真充-银两兑换】中兑换银两。游戏内BOSS、夺宝有几率爆出,参加各类玩法活动均有机会获得",
|
||||
dropBroadcast = 1,
|
||||
dropEffect = 3,
|
||||
dup = 9999,
|
||||
dup = 99999,
|
||||
existScenes = { -1 },
|
||||
icon = 13131,
|
||||
id = 829,
|
||||
@@ -27463,7 +27463,7 @@ StdItems = {
|
||||
desc = "可在【合成-换真充-银两兑换】中兑换银两。游戏内BOSS、夺宝有几率爆出,参加各类玩法活动均有机会获得",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 14,
|
||||
dup = 9999,
|
||||
dup = 99999,
|
||||
existScenes = { -1 },
|
||||
icon = 13131,
|
||||
id = 830,
|
||||
@@ -27494,7 +27494,7 @@ StdItems = {
|
||||
desc = "可在【合成-换真充-银两兑换】中兑换银两。游戏内BOSS、夺宝有几率爆出,参加各类玩法活动均有机会获得",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 11,
|
||||
dup = 9999,
|
||||
dup = 99999,
|
||||
existScenes = { -1 },
|
||||
icon = 13131,
|
||||
id = 831,
|
||||
@@ -27525,7 +27525,7 @@ StdItems = {
|
||||
desc = "可在【合成-换真充-银两兑换】中兑换银两。游戏内BOSS、夺宝有几率爆出,参加各类玩法活动均有机会获得",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 12,
|
||||
dup = 9999,
|
||||
dup = 99999,
|
||||
existScenes = { -1 },
|
||||
icon = 13131,
|
||||
id = 832,
|
||||
@@ -34717,7 +34717,7 @@ StdItems = {
|
||||
desc = "该道具不可交易,开服第8天可以开启。使用后立即返还5元宝、并随机抽取一件永久时装!包含红玫瑰、紫玫瑰、黄金裁决、黄金屠龙、黄金嗜魂、黄金羽扇",
|
||||
dropBroadcast = 0,
|
||||
dropGroupid = 151016,
|
||||
dup = 0,
|
||||
dup = 9999,
|
||||
existScenes = { -1 },
|
||||
fashionTips = "bx_show_001",
|
||||
icon = 13532,
|
||||
@@ -38701,7 +38701,7 @@ StdItems = {
|
||||
desc = "银针[四方],四大内功装备之一,可以激活内功宝石【银花簪】的共鸣效果",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 11,
|
||||
dup = 0,
|
||||
dup = 999,
|
||||
existScenes = { -1 },
|
||||
icon = 13611,
|
||||
id = 1170,
|
||||
@@ -38926,7 +38926,7 @@ StdItems = {
|
||||
desc = "心决[四方],四大内功装备之一,可以激活内功宝石【养心玉】的共鸣效果",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 11,
|
||||
dup = 0,
|
||||
dup = 999,
|
||||
existScenes = { -1 },
|
||||
icon = 13606,
|
||||
id = 1175,
|
||||
@@ -39149,7 +39149,7 @@ StdItems = {
|
||||
desc = "金印[四方],四大内功装备之一,可以激活内功宝石【金曜珠】的共鸣效果",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 11,
|
||||
dup = 0,
|
||||
dup = 999,
|
||||
existScenes = { -1 },
|
||||
icon = 13601,
|
||||
id = 1180,
|
||||
@@ -39372,7 +39372,7 @@ StdItems = {
|
||||
desc = "檀珠[四方],四大内功装备之一,可以激活内功宝石【黑檀石】的共鸣效果",
|
||||
dropBroadcast = -1,
|
||||
dropEffect = 11,
|
||||
dup = 0,
|
||||
dup = 999,
|
||||
existScenes = { -1 },
|
||||
icon = 13596,
|
||||
id = 1185,
|
||||
@@ -46540,4 +46540,36 @@ StdItems = {
|
||||
trade = 3,
|
||||
type = 131,
|
||||
},
|
||||
[1395] = {
|
||||
cdTime = 0,
|
||||
colGroup = 0,
|
||||
conds = {},
|
||||
dealPrice = 10,
|
||||
dealType = 0,
|
||||
denyDeal = 1,
|
||||
denyDestroy = 1,
|
||||
denySell = 1,
|
||||
desc = "打开后随机获得三阶魔器中的任意一件,获得随机奖励",
|
||||
dropBroadcast = 0,
|
||||
dropGroupid = 100882,
|
||||
dup = 9999,
|
||||
existScenes = { -1 },
|
||||
icon = 13509,
|
||||
id = 1395,
|
||||
isShowUseBtn = 1,
|
||||
iseffect = 127,
|
||||
itemlvl = 3,
|
||||
name = "天赐机缘盒",
|
||||
packageType = 2,
|
||||
recordLog = 1,
|
||||
recoverid = 0,
|
||||
shape = 0,
|
||||
showQuality = 5,
|
||||
staitcAttrs = {},
|
||||
suggVocation = 0,
|
||||
suitId = 0,
|
||||
time = 0,
|
||||
trade = 3,
|
||||
type = 131,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
module("ActivityType10011", package.seeall)
|
||||
|
||||
--[[
|
||||
个人活动(玩法),YY大厅特权
|
||||
|
||||
个人数据:YYHallAtv
|
||||
{
|
||||
yydata = 0 YY大厅身份 1平民2贵族3王室
|
||||
freshmanGift = 0/1 是否领取YY大厅新手礼包(0否,1是)
|
||||
lastLoginTime = 0 上一次通过YY大厅登录的时间戳
|
||||
loginDay = 1 通过YY大厅登录的累计天数
|
||||
loginGift = 00000000 32位 是否领取某天的登录礼包
|
||||
levelGift = 00000000 32位 是否领取第n个等级礼包
|
||||
nobleGift = 00000000 32位 是否领取贵族礼包 1平民 2贵族 3王室
|
||||
}
|
||||
]]--
|
||||
|
||||
--活动类型
|
||||
ActivityType = 10011
|
||||
--对应的活动配置
|
||||
ActivityConfig = YYMemberConfig
|
||||
if ActivityConfig == nil then
|
||||
assert(false)
|
||||
end
|
||||
|
||||
local HttpStatus = {
|
||||
Success = "200", -- 成功
|
||||
ArgError = "302", -- 参数错误
|
||||
SignError = "304", -- 签名错误
|
||||
LinkLost = "305", -- 链接失效
|
||||
IpLimit = "306", -- IP受限
|
||||
AccountNotExits = "600", -- 账号不存在
|
||||
UnKnownedError = "299" -- 未知错误
|
||||
}
|
||||
|
||||
-- 服务接口
|
||||
Host = ActivityConfig.host or "proxy.udblogin.game.yy.com"
|
||||
Port = ActivityConfig.port or "80"
|
||||
Api = ActivityConfig.api or "/yy/lobbygift/query/queryInfo.do"
|
||||
|
||||
function getData(pActor)
|
||||
local var = Actor.getStaticVar(pActor)
|
||||
if var.YYHallAtv== nil then
|
||||
var.YYHallAtv = {}
|
||||
end
|
||||
return var.YYHallAtv
|
||||
end
|
||||
|
||||
function SendData(pActor,lvldata)
|
||||
|
||||
--对于lvldata不是 1 2 3 这三个指定数值的直接返回
|
||||
-- if not (lvldata and (lvldata ==1 or lvldata == 2 or lvldata == 3 )) then
|
||||
-- return
|
||||
-- end
|
||||
|
||||
local npack = DataPack.allocPacket(pActor, enActivityID, sYYHallData)
|
||||
if npack then
|
||||
local data = getData(pActor)
|
||||
data.yydata = lvldata
|
||||
DataPack.writeByte(npack, lvldata) --YY身份 1平民 2贵族 3王室
|
||||
DataPack.writeByte(npack, (data.freshmanGift or 0)) --是否已领取YY大厅新手礼包 0否1是
|
||||
DataPack.writeShort(npack, (data.loginDay or 1))--通过YY大厅登录的天数
|
||||
DataPack.writeUInt(npack, (data.loginGift or 0))--登录礼包的领取标记 32 位
|
||||
DataPack.writeUInt(npack, (data.levelGift or 0))--等级礼包的领取标记 32 位
|
||||
DataPack.writeUInt(npack, (data.nobleGift or 0))--贵族礼包的领取标记 32 位
|
||||
DataPack.flush(npack)
|
||||
end
|
||||
end
|
||||
|
||||
function AfterCheckYYHall(paramPack,content,result)
|
||||
local aid = paramPack[1]
|
||||
local pActor = Actor.getActorById(aid)
|
||||
if not pActor then
|
||||
print("[AfterCheckYYHall][" .. aid .. "] 已离线")
|
||||
return
|
||||
end
|
||||
print("[AfterCheckYYHall][" .. Actor.getName(pActor) .. "] content:"..content)
|
||||
print("[AfterCheckYYHall]result:"..result)
|
||||
|
||||
if result == 0 then
|
||||
local data = string.match(content,"\"data\":(%d+)")
|
||||
local status = string.match(content,"\"status\":(%d+)")
|
||||
if status == HttpStatus.Success then
|
||||
SendData(pActor,tonumber(data))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- CPP回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
function OnYYHallLogin(pActor)
|
||||
local account = Actor.getAccount(pActor)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local now = os.time()
|
||||
local gameflag = System.getGameFlag() or "DDCQ"
|
||||
local key = System.getYYKey()
|
||||
local sign = System.MD5(gameflag,account,"1001",now,key)
|
||||
local req = Api..'?account='..account..'&game='..gameflag..'&taskId=1001&time='..now.."&sign="..string.upper(sign)
|
||||
print("Require YYHallLogin[" .. Actor.getName(pActor) .. "] : ".. req)
|
||||
AsyncWorkDispatcher.Add(
|
||||
{'GetHttpContent',Host,Port,req},
|
||||
AfterCheckYYHall,
|
||||
{aid}
|
||||
)
|
||||
|
||||
-- 当天初始化
|
||||
local data = getData(pActor)
|
||||
if data.lastLoginTime == nil then
|
||||
data.lastLoginTime = System.getCurrMiniTime()
|
||||
data.loginDay = 1
|
||||
--print("第一天")
|
||||
else
|
||||
if not System.isSameDay(data.lastLoginTime, System.getCurrMiniTime()) then
|
||||
--print("跨一天")
|
||||
data.lastLoginTime = System.getCurrMiniTime()
|
||||
data.loginDay = data.loginDay + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 客户端请求协议回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
function OnReqYYHallFreshManGift(pActor, packet)
|
||||
local idx = DataPack.readByte(packet)
|
||||
local awards = ActivityConfig.freshmanGift
|
||||
local data = getData(pActor)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
if data.lastLoginTime then
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
if (data.freshmanGift == nil) or (data.freshmanGift == 0) then
|
||||
data.freshmanGift = 1
|
||||
SendMail(aid, ActivityConfig.fgTitle or "YY大厅新手礼包", ActivityConfig.fgContent or "恭喜你领取了YY大厅新手礼包!", ActivityConfig.freshmanGift)
|
||||
SendData(pActor,data.yydata)
|
||||
end
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
|
||||
function OnReqYYHallLoginGift(pActor, packet)
|
||||
local idx = DataPack.readByte(packet)
|
||||
if (idx > 30) or (idx == 0) then
|
||||
return
|
||||
end
|
||||
if idx > #ActivityConfig.loginGift then
|
||||
return
|
||||
end
|
||||
local awards = ActivityConfig.loginGift[idx]
|
||||
idx = idx - 1
|
||||
local data = getData(pActor)
|
||||
if awards and data.lastLoginTime then
|
||||
-- 领取检查
|
||||
if not data.loginGift then
|
||||
data.loginGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.loginGift, idx)
|
||||
--print("loginGift="..data.loginGift.." flag="..flag)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
-- 天数检查
|
||||
if data.loginDay and (data.loginDay > idx )then
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
data.loginGift = System.setIntBit(data.loginGift, idx, true)
|
||||
local mailcontent = string.format( ActivityConfig.logContent or "你已通过YY大厅登录超过了%d天,领取了YY大厅登录礼包!" , data.loginDay)
|
||||
SendMail(aid, ActivityConfig.logTitle or "YY大厅登录礼包", mailcontent, awards)
|
||||
SendData(pActor,data.yydata)
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function OnReqYYHallLevelGift(pActor, packet)
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #ActivityConfig.levelGift then
|
||||
return
|
||||
end
|
||||
local conf = ActivityConfig.levelGift[idx]
|
||||
local awards = conf.awards
|
||||
idx = idx - 1
|
||||
local data = getData(pActor)
|
||||
if conf and data.lastLoginTime then
|
||||
-- 领取检查
|
||||
if not data.levelGift then
|
||||
data.levelGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.levelGift, idx)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
-- 等级检查
|
||||
local lvl = Actor.getIntProperty(pActor,PROP_CREATURE_LEVEL)
|
||||
if lvl >= conf.lvl then
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
data.levelGift = System.setIntBit(data.levelGift, idx, true)
|
||||
local mailcontent = string.format( ActivityConfig.lvgContent or "你的等级已达到了%d级,领取了YY大厅等级礼包!" , conf.lvl)
|
||||
SendMail(aid, ActivityConfig.lvgTitle or "YY大厅等级礼包", mailcontent, awards)
|
||||
SendData(pActor,data.yydata)
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
YYIdentity = {[1]="平民",[2]="贵族",[3]="王室"}
|
||||
|
||||
function OnReqYYHallNobleGift(pActor, packet)
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #ActivityConfig.nobleGift then
|
||||
return
|
||||
end
|
||||
if idx > #YYIdentity then
|
||||
return
|
||||
end
|
||||
local awards = ActivityConfig.nobleGift[idx]
|
||||
idx = idx - 1
|
||||
local data = getData(pActor)
|
||||
if awards and data.lastLoginTime then
|
||||
-- 领取检查
|
||||
if not data.nobleGift then
|
||||
data.nobleGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.nobleGift, idx)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
-- 身份检查
|
||||
if data.yydata > idx then
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
data.nobleGift = System.setIntBit(data.nobleGift, idx, true)
|
||||
local mailcontent = string.format( ActivityConfig.ngContent or "你的身份为%s,领取了YY大厅贵族礼包!" , YYIdentity[idx+1])
|
||||
SendMail(aid, ActivityConfig.ngTitle or "YY大厅等级礼包", mailcontent, awards)
|
||||
SendData(pActor,data.yydata)
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYHallFreshManGift, OnReqYYHallFreshManGift)
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYHallLoginGift, OnReqYYHallLoginGift)
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYHallLevelGift, OnReqYYHallLevelGift)
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYHallNobleGift, OnReqYYHallNobleGift)
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 玩家 回调注册
|
||||
--------------------------------------------------------------------
|
||||
|
||||
-- 跨天
|
||||
function OnNewDayArrive(pActor,ndiffday)
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = getData(pActor)
|
||||
if data.lastLoginTime then
|
||||
if not System.isSameDay(data.lastLoginTime, System.getCurrMiniTime()) then
|
||||
data.lastLoginTime = System.getCurrMiniTime()
|
||||
data.loginDay = data.loginDay + 1
|
||||
end
|
||||
|
||||
SendData(pActor,data.yydata)
|
||||
end
|
||||
end
|
||||
|
||||
function OnUserLogout(pActor,actorId)
|
||||
if pActor ==nil then return end
|
||||
local data = getData(pActor)
|
||||
data.yydata =nil
|
||||
end
|
||||
|
||||
ActorEventDispatcher.Reg(aeNewDayArrive, OnNewDayArrive, "ActivityType10011.lua")
|
||||
ActorEventDispatcher.Reg(aeUserLogout, OnUserLogout, "ActivityType10011.lua")
|
||||
@@ -1,384 +0,0 @@
|
||||
module("ActivityType10012", package.seeall)
|
||||
|
||||
--[[
|
||||
个人活动(玩法),YY会员
|
||||
|
||||
个人数据:YYVIPeople
|
||||
{
|
||||
isVip = true/false, 是否为YY会员
|
||||
grade = 0, vip等级
|
||||
endTime = 0, vip过期时间戳
|
||||
lastTime = 0 上一次初始化的时间戳
|
||||
newServerGift = 00000000 32位 是否领取第n个新服豪礼
|
||||
dailyGift = 00000000 32位 是否领取第n个每日礼包
|
||||
weeklyGift = 00000000 32位 是否领取第n个每周礼包
|
||||
}
|
||||
]]--
|
||||
|
||||
--活动类型
|
||||
ActivityType = 10012
|
||||
--对应的活动配置
|
||||
ActivityConfig = YYVIPConfig
|
||||
PlatformConfig = YYVIPConfig
|
||||
local PfId = System.getPfId()
|
||||
|
||||
|
||||
if ActivityConfig == nil then
|
||||
assert(false)
|
||||
end
|
||||
|
||||
local HttpStatus = {
|
||||
Success = "200", -- 成功
|
||||
ArgError = "302", -- 参数错误
|
||||
SignError = "304", -- 签名错误
|
||||
LinkLost = "305", -- 链接失效
|
||||
IpLimit = "306", -- IP受限
|
||||
AccountNotExits = "600", -- 账号不存在
|
||||
UnKnownedError = "299" -- 未知错误
|
||||
}
|
||||
|
||||
-- 服务接口
|
||||
Host = ActivityConfig.host or "proxy.udblogin.game.yy.com"
|
||||
Port = ActivityConfig.port or "80"
|
||||
Api = ActivityConfig.api or "/query/yyVipInfo.do"
|
||||
|
||||
function getData(pActor)
|
||||
local var = Actor.getStaticVar(pActor)
|
||||
if var.YYVIPeople== nil then
|
||||
var.YYVIPeople = {}
|
||||
end
|
||||
return var.YYVIPeople
|
||||
end
|
||||
|
||||
function SendData(pActor)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local npack = DataPack.allocPacket(pActor, enActivityID, sYYVipData)
|
||||
if npack then
|
||||
local data = getData(pActor)
|
||||
DataPack.writeByte(npack, (data.isVip or 0)) -- 是否为VIP 0否1是
|
||||
DataPack.writeByte(npack, (data.grade or 1)) -- vip等级
|
||||
DataPack.writeInt64(npack, (data.endTime or 0)) -- 过期时间戳
|
||||
DataPack.writeUInt(npack, (data.newServerGift or 0))-- 32位 是否领取第n个新服豪礼
|
||||
DataPack.writeUInt(npack, (data.dailyGift or 0)) -- 32位 是否领取第n个每日礼包
|
||||
DataPack.writeUInt(npack, (data.weeklyGift or 0)) -- 32位 是否领取第n个每周礼包
|
||||
DataPack.flush(npack)
|
||||
end
|
||||
end
|
||||
|
||||
function AfterCheckYYLogin(paramPack,content,result)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local aid = paramPack[1]
|
||||
local pActor = Actor.getActorById(aid)
|
||||
if not pActor then
|
||||
print("[AfterCheckYYLogin][" .. aid .. "] 已离线")
|
||||
return
|
||||
end
|
||||
print("[AfterCheckYYLogin][" .. Actor.getName(pActor) .. "] content:"..content)
|
||||
print("[AfterCheckYYLogin]result:"..result)
|
||||
|
||||
if result == 0 then
|
||||
local status = string.match(content,"\"status\":(%d+)")
|
||||
if (status == HttpStatus.Success) then
|
||||
local isvip = string.match(content,"\"isVip\":(%a+)")
|
||||
local grade = string.match(content,"\"grade\":(%d+)")
|
||||
local endTime = string.match(content,"\"endTime\":(%a+)")
|
||||
if isvip == "true" then
|
||||
isvip = 1
|
||||
else
|
||||
isvip = 0
|
||||
end
|
||||
grade = tonumber(grade)
|
||||
if endTime ~= "null" then
|
||||
endTime = tonumber(endTime)
|
||||
else
|
||||
endTime = 0
|
||||
end
|
||||
local data = getData(pActor)
|
||||
data.isVip = isvip
|
||||
data.grade = grade
|
||||
data.endTime = endTime
|
||||
SendData(pActor)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- CPP回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
function OnYYLogin(pActor)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local account = Actor.getAccount(pActor)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local now = os.time()
|
||||
local gameflag = System.getGameFlag() or "DDCQ"
|
||||
local key = System.getYYKey()
|
||||
local sign = System.MD5(gameflag,account,now,key)
|
||||
local req = Api..'?game='..gameflag..'&account='..account..'&ts='..now.."&sign="..string.upper(sign)
|
||||
print("Require OnYYLogin[" .. Actor.getName(pActor) .. "] : ".. req)
|
||||
AsyncWorkDispatcher.Add(
|
||||
{'GetHttpContent',Host,Port,req},
|
||||
AfterCheckYYLogin,
|
||||
{aid}
|
||||
)
|
||||
|
||||
-- 当天初始化
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = getData(pActor)
|
||||
if data.lastTime == nil then
|
||||
data.lastTime = currMiniTime
|
||||
data.newServerGift = 0
|
||||
data.dailyGift = 0
|
||||
data.weeklyGift = 0
|
||||
--print("第一天")
|
||||
else
|
||||
if not System.isSameDay(data.lastTime, currMiniTime) then
|
||||
--print("跨一天")
|
||||
if System.isSameWeek(data.lastTime, currMiniTime) then
|
||||
--print("跨一周")
|
||||
data.weeklyGift = 0
|
||||
end
|
||||
data.lastTime = currMiniTime
|
||||
data.dailyGift = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 客户端请求协议回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
function OnReqYYVIPNewSrvGift(pActor, packet)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > (2 * #ActivityConfig.newServerGift) then
|
||||
return
|
||||
end
|
||||
local confid = math.ceil(idx/2)
|
||||
local conf = ActivityConfig.newServerGift[confid]
|
||||
|
||||
local istitle = (idx%2 == 1)
|
||||
|
||||
idx = idx - 1
|
||||
local data = getData(pActor)
|
||||
|
||||
if conf and data.lastTime then
|
||||
|
||||
-- 领取检查
|
||||
if not data.newServerGift then
|
||||
data.newServerGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.newServerGift, idx)
|
||||
print("newServerGift="..data.newServerGift.." flag="..flag)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
-- 等级检查
|
||||
if data.grade < conf.viplvl then
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子
|
||||
if CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
data.newServerGift = System.setIntBit(data.newServerGift, idx, true)
|
||||
SendData(pActor)
|
||||
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
if istitle then
|
||||
local awards = {conf.title}
|
||||
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_Activity10012, "YYVIP NewSrvGift")
|
||||
else
|
||||
--获取
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local awards = {conf.gift}
|
||||
SendMail(aid, ActivityConfig.nsTitle, ActivityConfig.nsContent, awards)
|
||||
end
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
|
||||
function OnReqYYVIPDailyGift(pActor, packet)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #ActivityConfig.dailyGift then
|
||||
return
|
||||
end
|
||||
local conf = ActivityConfig.dailyGift[idx]
|
||||
idx = idx - 1
|
||||
local data = getData(pActor)
|
||||
if conf and data.lastTime then
|
||||
-- 领取检查
|
||||
if not data.dailyGift then
|
||||
data.dailyGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.dailyGift, idx)
|
||||
--print("dailyGift="..data.dailyGift.." flag="..flag)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
-- 等级检查
|
||||
if data.grade < conf.viplvl then
|
||||
return
|
||||
end
|
||||
|
||||
-- 元宝检查
|
||||
local consumes = {{type=4,id=4,count=conf.yb}}
|
||||
if CommonFunc.Consumes.CheckActorSources(pActor, consumes, tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
|
||||
--消耗
|
||||
CommonFunc.Consumes.Remove(pActor, consumes, GameLog.Log_Activity10012, "YYVIP dailyGift | " .. ActivityType)
|
||||
|
||||
-- 设置标志
|
||||
data.dailyGift = System.setIntBit(data.dailyGift, idx, true)
|
||||
SendData(pActor)
|
||||
|
||||
--获取
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local awards = {conf.item}
|
||||
SendMail(aid, ActivityConfig.dgTitle, ActivityConfig.dgContent, awards)
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
|
||||
function OnReqYYVIPWeeklyGift(pActor, packet)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #ActivityConfig.weeklyGift then
|
||||
return
|
||||
end
|
||||
local conf = ActivityConfig.weeklyGift[idx]
|
||||
idx = idx - 1
|
||||
local data = getData(pActor)
|
||||
if conf and data.lastTime then
|
||||
-- 领取检查
|
||||
if not data.weeklyGift then
|
||||
data.weeklyGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.weeklyGift, idx)
|
||||
--print("weeklyGift="..data.weeklyGift.." flag="..flag)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
-- 等级检查
|
||||
if data.grade < conf.viplvl then
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子
|
||||
if CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
|
||||
-- 元宝检查
|
||||
local consumes = {{type=4,id=4,count=conf.yb}}
|
||||
if CommonFunc.Consumes.CheckActorSources(pActor, consumes, tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
|
||||
--消耗
|
||||
CommonFunc.Consumes.Remove(pActor, consumes, GameLog.Log_Activity10012, "YYVIP WeeklyGift | " .. ActivityType)
|
||||
|
||||
-- 设置标志
|
||||
data.weeklyGift = System.setIntBit(data.weeklyGift, idx, true)
|
||||
SendData(pActor)
|
||||
|
||||
--获取
|
||||
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_Activity10012, "YYVIP WeeklyGift | " .. ActivityType)
|
||||
|
||||
--获取
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local awards = {conf.gift}
|
||||
SendMail(aid, ActivityConfig.wgTitle, ActivityConfig.wgContent, awards)
|
||||
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
end
|
||||
end
|
||||
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYVIPNewSrvGift, OnReqYYVIPNewSrvGift)
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYVIPDailyGift, OnReqYYVIPDailyGift)
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqYYVIPWeeklyGift, OnReqYYVIPWeeklyGift)
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 玩家 回调注册
|
||||
--------------------------------------------------------------------
|
||||
|
||||
-- 跨天
|
||||
function OnNewDayArrive(pActor,ndiffday)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [YYVIP] SendData ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [YYVIP] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = getData(pActor)
|
||||
if data.lastTime then
|
||||
if not System.isSameDay(data.lastTime, currMiniTime) then
|
||||
--print("跨一天")
|
||||
if not System.isSameWeek(data.lastTime, currMiniTime) then
|
||||
--print("跨一周")
|
||||
data.weeklyGift = 0
|
||||
end
|
||||
data.lastTime = currMiniTime
|
||||
data.dailyGift = 0
|
||||
end
|
||||
SendData(pActor)
|
||||
end
|
||||
end
|
||||
|
||||
ActorEventDispatcher.Reg(aeNewDayArrive, OnNewDayArrive, "ActivityType10012.lua")
|
||||
@@ -1,289 +0,0 @@
|
||||
module("ActivityType10013", package.seeall)
|
||||
|
||||
--[[
|
||||
个人活动(玩法),超玩会员
|
||||
|
||||
个人数据:SupperVIPeople
|
||||
{
|
||||
isVip = true/false 是否是会员
|
||||
lastTime = 0 上一次初始化的时间戳
|
||||
v1_v3Gift = 00000000 32位 是否领取第n个v1-v3礼包
|
||||
dailyGift = 00000000 32位 是否领取第n个每日礼包
|
||||
}
|
||||
]]--
|
||||
|
||||
--活动类型
|
||||
ActivityType = 10013
|
||||
--对应的活动配置
|
||||
ActivityConfig = GameVIPConfig
|
||||
if ActivityConfig == nil then
|
||||
assert(false)
|
||||
end
|
||||
|
||||
local HttpStatus =
|
||||
{
|
||||
Success = "200", -- 成功
|
||||
ArgError = "302", -- 参数错误
|
||||
SignError = "304", -- 签名错误
|
||||
LinkLost = "305", -- 链接失效
|
||||
IpLimit = "306", -- IP受限
|
||||
AccountNotExits = "600", -- 账号不存在
|
||||
UnKnownedError = "299", -- 未知错误
|
||||
}
|
||||
|
||||
-- 服务接口
|
||||
Host = ActivityConfig.host or "proxy.udblogin.game.yy.com"
|
||||
Port = ActivityConfig.port or "80"
|
||||
Api = ActivityConfig.api or "/query/cwVipInfo.do"
|
||||
|
||||
function getData(pActor)
|
||||
local var = Actor.getStaticVar(pActor)
|
||||
if var.SupperVIPeople== nil then
|
||||
var.SupperVIPeople = {}
|
||||
end
|
||||
return var.SupperVIPeople
|
||||
end
|
||||
|
||||
function SendData(pActor)
|
||||
local npack = DataPack.allocPacket(pActor, enActivityID, sSupperVipData)
|
||||
if npack then
|
||||
local data = getData(pActor)
|
||||
DataPack.writeUInt(npack, (data.v1_v3Gift or 0))
|
||||
--print("v1-v3 giftbit : "..(data.v1_v3Gift or 0 ) )
|
||||
DataPack.writeUInt(npack, (data.dailyGift or 0))
|
||||
--print("daily giftbit : "..(data.dailyGift or 0))
|
||||
DataPack.flush(npack)
|
||||
end
|
||||
end
|
||||
|
||||
function AfterCheckSupperLogin(paramPack,content,result)
|
||||
local aid = paramPack[1]
|
||||
local pActor = Actor.getActorById(aid)
|
||||
if not pActor then
|
||||
--print("[AfterCheckSupperLogin][" .. aid .. "] 已离线")
|
||||
return
|
||||
end
|
||||
--print("[AfterCheckSupperLogin][" .. Actor.getName(pActor) .. "] content:"..content)
|
||||
--print("[AfterCheckSupperLogin]result:"..result)
|
||||
|
||||
if Actor.getEntityType(pActor) ~= enActor then
|
||||
return
|
||||
end
|
||||
|
||||
--先清buff
|
||||
for i = 1 , #ActivityConfig.GameVIPbuff do
|
||||
Actor.delBuffById(pActor, (ActivityConfig.GameVIPbuff[i].buffid or 0))
|
||||
end
|
||||
|
||||
local data = getData(pActor)
|
||||
|
||||
if result == 0 then
|
||||
local status = string.match(content,"\"status\":(%d+)")
|
||||
if status == HttpStatus.Success then
|
||||
local vipLevel = string.match(content,"\"vipLevel\":(%d+)")
|
||||
vipLevel = tonumber(vipLevel)
|
||||
Actor.setUIntProperty(pActor,PROP_ACTOR_SUPPER_PLAY_LVL,vipLevel)
|
||||
Actor.updateActorEntityProp(pActor)
|
||||
--local grade = string.match(content,"\"grade\":(%d+)")
|
||||
--local endTime = string.match(content,"\"endTime\":(%a+)")
|
||||
data.isVip = 1
|
||||
|
||||
--加超玩特权buff
|
||||
if(vipLevel >= 9) then
|
||||
Actor.addBuffById(pActor, (ActivityConfig.GameVIPbuff[3].buffid or 0))
|
||||
elseif (vipLevel >= 6) then
|
||||
Actor.addBuffById(pActor, (ActivityConfig.GameVIPbuff[2].buffid or 0))
|
||||
elseif (vipLevel >= 2) then
|
||||
Actor.addBuffById(pActor, (ActivityConfig.GameVIPbuff[1].buffid or 0))
|
||||
end
|
||||
|
||||
else
|
||||
data.isVip = 0
|
||||
Actor.setUIntProperty(pActor,PROP_ACTOR_SUPPER_PLAY_LVL,0)
|
||||
Actor.updateActorEntityProp(pActor)
|
||||
end
|
||||
|
||||
end
|
||||
SendData(pActor)
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- CPP回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
function OnSupperLogin(pActor)
|
||||
local account = Actor.getAccount(pActor)
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local now_milli = os.time()*1000
|
||||
local gameflag = System.getGameFlag() or "DDCQ"
|
||||
local key = System.getYYKey()
|
||||
local sign = System.MD5(gameflag,account,now_milli,key)
|
||||
local req = Api..'?game='..gameflag..'&account='..account..'&ts='..now_milli.."&sign="..string.upper(sign)
|
||||
--print("Require OnSupperLogin[" .. Actor.getName(pActor) .. "] : ".. req)
|
||||
AsyncWorkDispatcher.Add(
|
||||
{'GetHttpContent',Host,Port,req},
|
||||
AfterCheckSupperLogin,
|
||||
{aid}
|
||||
)
|
||||
|
||||
-- 当天初始化
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = getData(pActor)
|
||||
if data.lastTime == nil then
|
||||
data.lastTime = currMiniTime
|
||||
--print("第一天")
|
||||
else
|
||||
if not System.isSameDay(data.lastTime, currMiniTime) then
|
||||
data.lastTime = currMiniTime
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 客户端请求协议回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
--v1-v3等级礼包
|
||||
function OnReqSuperVipV1_V3(pActor, packet)
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #ActivityConfig.vipGift or idx <= 0 then
|
||||
return
|
||||
end
|
||||
local conf = ActivityConfig.vipGift[idx]
|
||||
local myLevel = Actor.getIntProperty(pActor, PROP_ACTOR_SUPPER_PLAY_LVL)
|
||||
|
||||
--一级玩家增加领取范围
|
||||
if myLevel ==1 then
|
||||
myLevel = 2
|
||||
end
|
||||
|
||||
local data = getData(pActor)
|
||||
|
||||
if data.isVip == 0 then
|
||||
return
|
||||
end
|
||||
if conf and data.lastTime then
|
||||
-- 领取检查
|
||||
if not data.v1_v3Gift then
|
||||
data.v1_v3Gift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.v1_v3Gift, idx-1)
|
||||
if flag == 1 then
|
||||
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:奖励已领取|", tstUI)
|
||||
return
|
||||
end
|
||||
-- 等级检查
|
||||
if myLevel < idx then
|
||||
return
|
||||
end
|
||||
|
||||
--消耗
|
||||
--CommonFunc.Consumes.Remove(pActor, consumes, GameLog.Log_Activity10013, "super Player v1-v3")
|
||||
|
||||
--记录日志
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
|
||||
--获取
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local awards = conf
|
||||
SendMail(aid, ActivityConfig.VIPTitle, ActivityConfig.VIPContent, awards)
|
||||
|
||||
--记录日志
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
-- 设置标志
|
||||
data.v1_v3Gift = System.setIntBit(data.v1_v3Gift, idx-1, true)
|
||||
SendData(pActor)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
-- 每日礼包,初中高级
|
||||
function OnReqSuperVipDaily(pActor, packet)
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #ActivityConfig.dailyGift or idx <= 0 then
|
||||
return
|
||||
end
|
||||
local conf = ActivityConfig.dailyGift[idx]
|
||||
|
||||
local myLevel = Actor.getIntProperty(pActor, PROP_ACTOR_SUPPER_PLAY_LVL)
|
||||
|
||||
local data = getData(pActor)
|
||||
|
||||
if data.isVip == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
if conf and data.lastTime then
|
||||
-- 领取检查
|
||||
if not data.dailyGift then
|
||||
data.dailyGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.dailyGift, idx-1)
|
||||
if flag == 1 then
|
||||
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:奖励已领取|", tstUI)
|
||||
return
|
||||
end
|
||||
|
||||
-- 等级检查
|
||||
if myLevel < ActivityConfig.vipMap[idx] then
|
||||
return
|
||||
end
|
||||
|
||||
--记录日志
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
|
||||
|
||||
--获取
|
||||
local aid = Actor.getActorId(pActor)
|
||||
local awards = conf
|
||||
SendMail(aid, ActivityConfig.VIPDailyTitle, ActivityConfig.VIPDailyContent, awards)
|
||||
|
||||
--记录日志
|
||||
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
|
||||
|
||||
-- 设置标志
|
||||
data.dailyGift = System.setIntBit(data.dailyGift, idx-1, true)
|
||||
|
||||
SendData(pActor)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqSuperVipV1_V3, OnReqSuperVipV1_V3)
|
||||
NetmsgDispatcher.Reg(enActivityID, cReqSuperVipDaily, OnReqSuperVipDaily)
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 玩家 回调注册
|
||||
--------------------------------------------------------------------
|
||||
|
||||
-- 跨天
|
||||
function OnNewDayArrive(pActor,ndiffday)
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = getData(pActor)
|
||||
if data.lastTime then
|
||||
if not System.isSameDay(data.lastTime, currMiniTime) then
|
||||
--print("跨一天")
|
||||
data.lastTime = currMiniTime
|
||||
data.dailyGift = 0
|
||||
end
|
||||
SendData(pActor)
|
||||
end
|
||||
end
|
||||
|
||||
function OnUserLogout(pActor,actorId)
|
||||
--local pActor = Actor.getActorById(actorId)
|
||||
|
||||
--离线就删除buff
|
||||
--没有对会员时间处理,上线是超玩就加buff,离线就删buff
|
||||
for i = 1 , #ActivityConfig.GameVIPbuff do
|
||||
Actor.delBuffById(pActor, (ActivityConfig.GameVIPbuff[i].buffid or 0))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
ActorEventDispatcher.Reg(aeNewDayArrive, OnNewDayArrive, "ActivityType10013.lua")
|
||||
ActorEventDispatcher.Reg(aeUserLogout, OnUserLogout, "ActivityType10013.lua")
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
module("ActivityType10014", package.seeall)
|
||||
--[[
|
||||
|
||||
微信礼包
|
||||
|
||||
个人数据:ActorData[AtvId]
|
||||
{
|
||||
}
|
||||
|
||||
全局缓存:Cache[AtvId]
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
全局数据:GlobalData[AtvId]
|
||||
{
|
||||
|
||||
}
|
||||
]]--
|
||||
|
||||
--活动类型
|
||||
ActivityType = 10014
|
||||
--对应的活动配置
|
||||
ActivityConfig = Activity10014Config
|
||||
if ActivityConfig == nil then
|
||||
assert(false)
|
||||
end
|
||||
|
||||
|
||||
--------------------------我是分界线----------------------------
|
||||
-- 初始化玩家数据
|
||||
function OnInit(atvId, pActor)
|
||||
-- local Cfg = ActivityConfig[atvId];
|
||||
-- if Cfg == nil then
|
||||
-- return;
|
||||
-- end
|
||||
-- local data = getActorCdkData(pActor)
|
||||
-- if data then
|
||||
-- if data.codeTypeTimes then
|
||||
-- if data.codeTypeTimes[Cfg.cdktype] then
|
||||
-- Actor.closeOneActivity(pActor,atvId)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
--活动开始
|
||||
function OnStart(atvId, pActor)
|
||||
-- local Cfg = ActivityConfig[atvId];
|
||||
-- if Cfg == nil then
|
||||
-- return;
|
||||
-- end
|
||||
-- local data =getActorCdkData(pActor)
|
||||
-- if data then
|
||||
-- if data.codeTypeTimes then
|
||||
-- if data.codeTypeTimes[Cfg.cdktype] then
|
||||
-- Actor.closeOneActivity(pActor,atvId)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
|
||||
-- 获取活动数据
|
||||
function OnReqData(atvId, pActor, outPack)
|
||||
-- local Cfg = ActivityConfig[atvId];
|
||||
-- if Cfg == nil then
|
||||
-- return;
|
||||
-- end
|
||||
-- local data = getActorCdkData(pActor)
|
||||
-- if data then
|
||||
-- if data.codeTypeTimes then
|
||||
-- if data.codeTypeTimes[Cfg.cdktype] then
|
||||
-- Actor.closeOneActivity(pActor,atvId)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
-- 活动结束
|
||||
function OnUpdate(atvId, curTime, pActor)
|
||||
local Cfg = ActivityConfig[atvId];
|
||||
if Cfg == nil then
|
||||
return;
|
||||
end
|
||||
local data = getActorCdkData(pActor)
|
||||
if data then
|
||||
if data.codeTypeTimes then
|
||||
if data.codeTypeTimes[Cfg.cdktype] then
|
||||
Actor.closeOneActivity(pActor,atvId)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
ActivityDispatcher.Reg(ActivityEvent.OnStart, ActivityType, OnStart, "ActivityType10014.lua")
|
||||
ActivityDispatcher.Reg(ActivityEvent.OnInit, ActivityType, OnInit, "ActivityType10014.lua")
|
||||
|
||||
ActivityDispatcher.Reg(ActivityEvent.OnReqData, ActivityType, OnReqData, "ActivityType10014.lua")
|
||||
ActivityDispatcher.Reg(ActivityEvent.OnUpdate, ActivityType, OnUpdate, "ActivityType10014.lua")
|
||||
@@ -1,283 +0,0 @@
|
||||
module("ActivityType10016", package.seeall)
|
||||
|
||||
--[[
|
||||
YY4366大厅特权
|
||||
|
||||
个人数据:YYHallAtv
|
||||
{
|
||||
phoneGift = 0/1 是否领取手机礼包(0否,1是)
|
||||
idCardGift = 0/1 是否领取认证礼包(0否,1是)
|
||||
lastLoginTime = 0 上一次通过YY大厅登录的时间戳
|
||||
loginDay = 1 通过YY大厅登录的累计天数
|
||||
loginGift = 00000000 32位 是否领取某天的登录礼包
|
||||
loginTypeGift
|
||||
loginType;//登录问题
|
||||
}
|
||||
]]--
|
||||
PlatformConfig = Platform4366Config
|
||||
LoginConfig = Login4366Config
|
||||
local PfId = System.getPfId()
|
||||
--对应的活动配置
|
||||
function get4366Data(pActor)
|
||||
local var = Actor.getStaticVar(pActor)
|
||||
if var.YY4366HallAtv== nil then
|
||||
var.YY4366HallAtv = {}
|
||||
end
|
||||
return var.YY4366HallAtv
|
||||
end
|
||||
|
||||
function Send4366Data(pActor)
|
||||
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] Send4366Data ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, sGet4366Infos)
|
||||
if npack then
|
||||
-- print("1111")
|
||||
local data = get4366Data(pActor)
|
||||
local cdkFlag = 0;
|
||||
local cdkdata = getActorCdkData(pActor)
|
||||
if cdkdata then
|
||||
if cdkdata.codeTypeTimes then
|
||||
if cdkdata.codeTypeTimes[PlatformConfig.type] then
|
||||
cdkFlag = 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
DataPack.writeByte(npack, (cdkFlag or 0)) --是否领取cdk礼包(0否,1是)
|
||||
DataPack.writeByte(npack, (data.phoneGift or 0)) --是否领取手机礼包(0否,1是)
|
||||
DataPack.writeByte(npack, (data.idCardGift or 0)) --是否领取认证礼包(0否,1是)
|
||||
DataPack.writeShort(npack, (data.loginDay or 1))--登录的天数
|
||||
DataPack.writeUInt(npack, (data.loginGift or 0))--礼包的领取标记 32 位
|
||||
DataPack.writeByte(npack, (data.loginTypeGift or 0)) --
|
||||
DataPack.flush(npack)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- CPP回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
function OnYY4366HallLogin(pActor)
|
||||
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnYY4366HallLogin ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
-- 当天初始化
|
||||
local data = get4366Data(pActor)
|
||||
if data.lastLoginTime == nil then
|
||||
data.lastLoginTime = System.getCurrMiniTime()
|
||||
data.loginDay = 1
|
||||
--print("第一天")
|
||||
else
|
||||
if not System.isSameDay(data.lastLoginTime, System.getCurrMiniTime()) then
|
||||
--print("跨一天")
|
||||
data.lastLoginTime = System.getCurrMiniTime()
|
||||
data.loginDay = data.loginDay + 1
|
||||
end
|
||||
end
|
||||
-- print("1111")
|
||||
Send4366Data(pActor);
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 客户端请求协议回调
|
||||
-------------------------------------------------------------------
|
||||
--登录
|
||||
function OnReqYY4366HallLoginGift(pActor, packet)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnReqYY4366HallLoginGift ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
|
||||
local idx = DataPack.readByte(packet)
|
||||
if idx > #LoginConfig then
|
||||
return
|
||||
end
|
||||
local conf = PlatformConfig
|
||||
local awards = LoginConfig[idx].reward
|
||||
idx = idx - 1
|
||||
local data = get4366Data(pActor)
|
||||
if awards and data.lastLoginTime then
|
||||
-- 领取检查
|
||||
if not data.loginGift then
|
||||
data.loginGift = 0
|
||||
end
|
||||
local flag = System.getIntBit(data.loginGift, idx)
|
||||
--print("loginGift="..data.loginGift.." flag="..flag)
|
||||
if flag == 1 then
|
||||
return
|
||||
end
|
||||
if (data.loginDay == nil) or (data.loginDay < idx ) then
|
||||
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:登录天数不足|", tstUI)
|
||||
return
|
||||
end
|
||||
if CommonFunc.Awards.CheckBagIsEnough(pActor,conf.bagtype,tmLeftBagNumNotEnough,tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
-- 天数检查
|
||||
if data.loginDay and (data.loginDay > idx )then
|
||||
data.loginGift = System.setIntBit(data.loginGift, idx, true)
|
||||
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_4366Login)
|
||||
Send4366Data(pActor)
|
||||
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:领取成功|", tstUI)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--认证
|
||||
function OnReqYY4366HallPhoneGift(pActor, packet)
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnReqYY4366HallPhoneGift ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local conf = PlatformConfig
|
||||
local awards = conf.reward2
|
||||
local data = get4366Data(pActor)
|
||||
if data.phoneGift then
|
||||
return
|
||||
end
|
||||
if CommonFunc.Awards.CheckBagIsEnough(pActor,conf.bagtype,tmLeftBagNumNotEnough,tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_4366Phone)
|
||||
data.phoneGift = 1;
|
||||
Send4366Data(pActor)
|
||||
end
|
||||
--认证
|
||||
function OnReqYY4366HallIdCardGift(pActor, packet)
|
||||
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnReqYY4366HallIdCardGift ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local conf = PlatformConfig
|
||||
local awards = conf.reward3
|
||||
local data = get4366Data(pActor)
|
||||
if data.idCardGift then
|
||||
return
|
||||
end
|
||||
if CommonFunc.Awards.CheckBagIsEnough(pActor,conf.bagtype,tmLeftBagNumNotEnough,tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_4366IdCard)
|
||||
data.idCardGift = 1;
|
||||
Send4366Data(pActor)
|
||||
end
|
||||
|
||||
function OnReqYY4366Login(pActor, packet)
|
||||
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnReqYY4366Login ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local idx = DataPack.readByte(packet)
|
||||
local data = get4366Data(pActor)
|
||||
data.loginType = idx;
|
||||
end
|
||||
|
||||
function OnReqYY4366LoginTypeGift(pActor, packet)
|
||||
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnReqYY4366LoginTypeGift ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
local conf = PlatformConfig
|
||||
local awards = conf.rewardClient
|
||||
local data = get4366Data(pActor)
|
||||
if data.loginTypeGift then
|
||||
return
|
||||
end
|
||||
if data.loginType == nil or data.loginType == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
if CommonFunc.Awards.CheckBagIsEnough(pActor,conf.bagtype,tmLeftBagNumNotEnough,tstUI) ~= true then
|
||||
return
|
||||
end
|
||||
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_4366ExeLogin)
|
||||
data.loginTypeGift = 1;
|
||||
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:领取成功|", tstUI)
|
||||
Send4366Data(pActor)
|
||||
Actor.setStaticCount(pActor, 10005, 1);
|
||||
|
||||
local strName = Actor.getName(pActor)
|
||||
if conf and conf.tips then
|
||||
local strTips = string.format(conf.tips,strName)
|
||||
System.broadcastTipmsgLimitLev(strTips, tstKillDrop)
|
||||
end
|
||||
|
||||
if conf and conf.tips2 then
|
||||
local strTips2 = string.format(conf.tips2,strName)
|
||||
System.broadcastTipmsgLimitLev(strTips2, tstChatSystem)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, cGet4366Infos, OnYY4366HallLogin)
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, cGet4366LoginAward, OnReqYY4366HallLoginGift)
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, cGet4366PhoneAward, OnReqYY4366HallPhoneGift)
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, cGet4366IdCardAward, OnReqYY4366HallIdCardGift)
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, c4366LoginType, OnReqYY4366Login)
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, c4366LoginTypeGift, OnReqYY4366LoginTypeGift)
|
||||
--------------------------------------------------------------------
|
||||
-- 玩家 回调注册
|
||||
--------------------------------------------------------------------
|
||||
|
||||
-- 跨天
|
||||
function OnNewDayArrive(pActor,ndiffday)
|
||||
|
||||
if PfId ~= nil and PlatformConfig.SPID ~= nil then
|
||||
--print("[Tip] [Platform4366] OnNewDayArrive ---------------------PfId:"..PfId.."--- SPID:"..PlatformConfig.SPID)
|
||||
if tostring(PfId) ~= tostring(PlatformConfig.SPID) then
|
||||
|
||||
print("[Tip] [Platform4366] [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
end
|
||||
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = get4366Data(pActor)
|
||||
if data.lastLoginTime then
|
||||
if not System.isSameDay(data.lastLoginTime, System.getCurrMiniTime()) then
|
||||
data.lastLoginTime = System.getCurrMiniTime()
|
||||
data.loginDay = data.loginDay + 1
|
||||
end
|
||||
|
||||
Send4366Data(pActor)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
ActorEventDispatcher.Reg(aeNewDayArrive, OnNewDayArrive, "ActivityType10016.lua")
|
||||
@@ -1,819 +0,0 @@
|
||||
module("ActivityType10024", package.seeall)
|
||||
|
||||
|
||||
--[[
|
||||
个人数据:userData
|
||||
{
|
||||
LoginType = 0 or 1 鲁大师 登录类型(1:游戏盒子登录)
|
||||
LastTime = 0 鲁大师 上一次初始化的时间戳
|
||||
ReqMainGiftType = 0 ~ 4 鲁大师 请求奖励类型((服务器使用 登录发送奖励数据):0;
|
||||
vip:1(一级子类型:1:称号奖励(二级子类型:奖励Id);2:礼包奖励(二级子类型:奖励Id));
|
||||
会员:2(一级子类型:1:称号奖励(二级子类型:奖励Id);2:礼包奖励(二级子类型:奖励Id);3:每日奖励(二级子类型:奖励Id));
|
||||
手机礼包:3(一级子类型:1:手机绑定奖励(二级子类型:奖励Id);2:防沉迷奖励(二级子类型:奖励Id));
|
||||
游戏盒子:4(一级子类型:1:下载奖励(二级子类型:奖励Id);2:每日奖励(二级子类型:奖励Id);3:等级奖励(二级子类型:奖励Id)))
|
||||
ReqSubGiftType = 1 ~ 2 or 1 ~ 3 鲁大师 请求奖励一级子类型
|
||||
ReqSubGiftType2 = 0 ~ 4 鲁大师 请求奖励二级子类型(对应的奖励Id;0暂未使用)
|
||||
VipLevel = 0~9 鲁大师 vip等级 0-9
|
||||
PlusLevel = 0,1-4 鲁大师 超玩会等级 0,1-4
|
||||
BindPhone = 0 or 1 鲁大师 绑定手机 0表示未绑定, 1表示绑定
|
||||
Fcm = 0 or 1 鲁大师 防沉迷验证 0表示未通过防沉迷验证,1表示通过
|
||||
SVIPGiftFlag = 0 or 1 鲁大师 超级Vip 礼包领取标志
|
||||
DownLoadGameBoxGiftFlag = 0 or 1 鲁大师 游戏盒子下载 礼包领取标志
|
||||
BindPhoneGiftFlag = 0 or 1 鲁大师 手机绑定 礼包领取标志
|
||||
WeChatGiftFlag = 0 or 1 鲁大师 微信 礼包领取标志
|
||||
FcmGiftFlag = 0 or 1 鲁大师 防沉迷 礼包领取标志
|
||||
VipTitleFlag = 00000000 32位 鲁大师 Vip称号 礼包领取标志
|
||||
VipGiftFlag = 00000000 32位 鲁大师 Vip礼包 礼包领取标志
|
||||
MemberTitleFlag = 00000000 32位 鲁大师 会员称号 礼包领取标志
|
||||
MemberGiftFlag = 00000000 32位 鲁大师 会员礼包 礼包领取标志
|
||||
MemberDailyGiftFlag = 0 or 1 鲁大师 会员每日礼包 礼包领取标志
|
||||
GameBoxDailyGiftFlag = 0 or 1 鲁大师 游戏盒子每日礼包 礼包领取标志
|
||||
GameBoxLevelGiftFlag = 00000000 32位 鲁大师 游戏盒子等级礼包 礼包领取标志
|
||||
}
|
||||
]]--
|
||||
|
||||
|
||||
--活动类型
|
||||
ActivityType = 10024
|
||||
--对应的活动配置
|
||||
ActivityConfig = PlatformludashiConfig
|
||||
VipConfig= LudashivipConfig
|
||||
MemberConfig = LudashimemberConfig
|
||||
|
||||
local PfId = System.getPfId()
|
||||
|
||||
|
||||
local HttpStatus = {
|
||||
Success = "0", -- 成功
|
||||
ArgError = "302", -- 参数错误
|
||||
SignError = "304", -- 签名错误
|
||||
LinkLost = "305", -- 链接失效,超时
|
||||
}
|
||||
|
||||
-- 服务接口
|
||||
Host = ActivityConfig.host or "wan.ludashi.com"
|
||||
Api = ActivityConfig.api or "/openApi/platformVipInfo"
|
||||
Port = ActivityConfig.port or "80"
|
||||
|
||||
|
||||
function GetMasterLuUserData(pActor)
|
||||
local var = Actor.getStaticVar(pActor)
|
||||
if nil == var.MasterLuUserData then
|
||||
var.MasterLuUserData = {}
|
||||
end
|
||||
return var.MasterLuUserData
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 请求平台玩家数据信息
|
||||
--------------------------------------------------------------------
|
||||
|
||||
|
||||
-- 请求 鲁大师用户信息
|
||||
function ReqMasterLuUserInfo(pActor)
|
||||
print("[Tip] ActivityType10024 ReqMasterLuUserInfo")
|
||||
|
||||
local nActorId = Actor.getActorId(pActor)
|
||||
|
||||
local gid = "sbcq"
|
||||
local uid = Actor.getAccount(pActor)
|
||||
local time = os.time()
|
||||
local token = "2cA4xA5BiwRPyZJEb#eJYmeS@NznzaH6"
|
||||
|
||||
local sign = System.MD5(gid..uid..time..token)
|
||||
local req = Api..'?gid='..gid..'&uid='..uid..'&time='..time..'&sign='..sign
|
||||
|
||||
-- print("[Tip] ActivityType10024 ReqMasterLuUserInfo [" .. Actor.getName(pActor) .. "] : ".. Host)
|
||||
-- print("[Tip] ActivityType10024 ReqMasterLuUserInfo [" .. Actor.getName(pActor) .. "] : ".. Port)
|
||||
-- print("[Tip] ActivityType10024 ReqMasterLuUserInfo [" .. Actor.getName(pActor) .. "] : ".. req)
|
||||
AsyncWorkDispatcher.Add(
|
||||
{'GetHttpContent',Host,Port,req},
|
||||
SetMasterLuUserData,
|
||||
{nActorId}
|
||||
)
|
||||
end
|
||||
|
||||
-- 设置 鲁大师用户数据
|
||||
function SetMasterLuUserData(paramPack,content,result)
|
||||
-- print("[Tip] ActivityType10024 SetMasterLuUserData content : "..content)
|
||||
-- print("[Tip] ActivityType10024 SetMasterLuUserData result : "..result)
|
||||
local nActorId = paramPack[1]
|
||||
local pActor = Actor.getActorById(nActorId)
|
||||
if not pActor then
|
||||
print("[Tip] ActivityType10024 SetMasterLuUserData [" .. nActorId .. "] 已离线")
|
||||
return
|
||||
end
|
||||
print("[Tip] ActivityType10024 SetMasterLuUserData [" .. Actor.getName(pActor) .. "] content:"..content)
|
||||
print("[Tip] ActivityType10024 SetMasterLuUserData result:"..result)
|
||||
|
||||
if 0 == result then
|
||||
local status = string.match(content,"\"errno\":(%d+)")
|
||||
if (HttpStatus.Success == status) then
|
||||
local strVip = string.match(content,"\"vip\":(%d+)")
|
||||
local strPlus = string.match(content,"\"plus\":(%d+)")
|
||||
local strBindPhone = string.match(content,"\"bindPhone\":(%d+)")
|
||||
local strFcm = string.match(content,"\"fcm\":(%d+)")
|
||||
|
||||
local nVip = 0
|
||||
local nPlus = 0
|
||||
local nBindPhone = 0
|
||||
local nFcm = 0
|
||||
|
||||
if "null" ~= strVip then
|
||||
nVip = tonumber(strVip)
|
||||
end
|
||||
if "null" ~= strPlus then
|
||||
nPlus = tonumber(strPlus)
|
||||
end
|
||||
if "null" ~= strBindPhone then
|
||||
nBindPhone = tonumber(strBindPhone)
|
||||
end
|
||||
if "null" ~= strFcm then
|
||||
nFcm = tonumber(strFcm)
|
||||
end
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
userData.VipLevel = nVip
|
||||
userData.PlusLevel = nPlus
|
||||
userData.BindPhone = nBindPhone
|
||||
userData.Fcm = nFcm
|
||||
|
||||
if 0 == userData.ReqMainGiftType then
|
||||
SendMasterLuUserData(pActor)
|
||||
elseif 1 == userData.ReqMainGiftType then -- vip:1(一级子类型:1:称号奖励;2:礼包奖励)
|
||||
SendVipAwards(pActor)
|
||||
elseif 2 == userData.ReqMainGiftType then -- 会员:2(一级子类型:1:称号奖励;2:礼包奖励;3:每日奖励)
|
||||
if 1 == userData.ReqSubGiftType or 2 == userData.ReqSubGiftType then
|
||||
SendMemberAwards(pActor)
|
||||
elseif 3 == userData.ReqSubGiftType then
|
||||
SendMemberDailyGift(pActor)
|
||||
end
|
||||
elseif 3 == userData.ReqMainGiftType then -- 手机礼包:3(一级子类型:1:手机绑定奖励;2:防沉迷奖励);
|
||||
if 1 == userData.ReqSubGiftType then
|
||||
SendBindPhoneGift(pActor)
|
||||
elseif 2 == userData.ReqSubGiftType then
|
||||
SendFcmGift(pActor)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 发送 鲁大师玩家数据
|
||||
function SendMasterLuUserData(pActor)
|
||||
print("[Tip] ActivityType10024 SendMasterLuUserData")
|
||||
|
||||
-- 平台验证
|
||||
if not PfId then
|
||||
print("[Tip] ActivityType10024 SendMasterLuUserData not PfId")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig then
|
||||
print("[Tip] ActivityType10024 SendMasterLuUserData not ActivityConfig")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig.SPID then
|
||||
print("[Tip] ActivityType10024 SendMasterLuUserData not ActivityConfig.SPID")
|
||||
return
|
||||
end
|
||||
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
|
||||
print("[Tip] ActivityType10024 SendMasterLuUserData [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, sSendMasterLuGitfData)
|
||||
if npack then
|
||||
local cdkdata = getActorCdkData(pActor)
|
||||
if cdkdata then
|
||||
-- 超级vip奖励
|
||||
if cdkdata.codeTypeTimes and PlatformConfig.type then
|
||||
if cdkdata.codeTypeTimes[PlatformConfig.type] then
|
||||
userData.SVIPGiftFlag = 1
|
||||
end
|
||||
end
|
||||
|
||||
-- 微信奖励
|
||||
if cdkdata.codeTypeTimes and PlatformConfig.type2 then
|
||||
if cdkdata.codeTypeTimes[PlatformConfig.type2] then
|
||||
userData.WeChatGiftFlag = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
DataPack.writeByte(npack, (userData.VipLevel or 0))
|
||||
DataPack.writeByte(npack, (userData.PlusLevel or 0))
|
||||
DataPack.writeByte(npack, (userData.BindPhone or 0))
|
||||
DataPack.writeByte(npack, (userData.Fcm or 0))
|
||||
DataPack.writeByte(npack, (userData.SVIPGiftFlag or 0))
|
||||
DataPack.writeByte(npack, (userData.DownLoadGameBoxGiftFlag or 0))
|
||||
DataPack.writeByte(npack, (userData.BindPhoneGiftFlag or 0))
|
||||
DataPack.writeByte(npack, (userData.WeChatGiftFlag or 0))
|
||||
DataPack.writeByte(npack, (userData.FcmGiftFlag or 0))
|
||||
DataPack.writeUInt(npack, (userData.VipTitleFlag or 0))
|
||||
DataPack.writeUInt(npack, (userData.VipGiftFlag or 0))
|
||||
DataPack.writeUInt(npack, (userData.MemberTitleFlag or 0))
|
||||
DataPack.writeUInt(npack, (userData.MemberGiftFlag or 0))
|
||||
DataPack.writeByte(npack, (userData.MemberDailyGiftFlag or 0))
|
||||
DataPack.writeByte(npack, (userData.GameBoxDailyGiftFlag or 0))
|
||||
DataPack.writeUInt(npack, (userData.GameBoxLevelGiftFlag or 0))
|
||||
DataPack.flush(npack)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- 客户端请求协议回调
|
||||
--------------------------------------------------------------------
|
||||
|
||||
|
||||
-- 鲁大师玩家登录
|
||||
function OnReqMasterLuLogin(pActor, packet)
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuLogin")
|
||||
|
||||
-- 平台验证
|
||||
if not PfId then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuLogin not PfId")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuLogin not ActivityConfig")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig.SPID then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuLogin not ActivityConfig.SPID")
|
||||
return
|
||||
end
|
||||
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuLogin [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
|
||||
local nLoginType = DataPack.readByte(packet) -- 1:游戏盒子登录
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
-- 初始化 登录类型
|
||||
userData.LoginType = nLoginType
|
||||
|
||||
-- 初始化 每天奖励数据
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
if nil == userData.LastTime then
|
||||
userData.LastTime = currMiniTime
|
||||
userData.MemberDailyGiftFlag = 0
|
||||
userData.GameBoxDailyGiftFlag = 0
|
||||
else
|
||||
if not System.isSameDay(userData.LastTime, currMiniTime) then
|
||||
userData.LastTime = currMiniTime
|
||||
userData.MemberDailyGiftFlag = 0
|
||||
userData.GameBoxDailyGiftFlag = 0
|
||||
end
|
||||
end
|
||||
|
||||
-- 初始化 奖励 相关数据
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
-- 请求 鲁大师平台 用户信息
|
||||
ReqMasterLuUserInfo(pActor)
|
||||
end
|
||||
|
||||
-- 请求 鲁大师奖励
|
||||
function OnReqMasterLuGift(pActor, packet)
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift")
|
||||
|
||||
-- 平台验证
|
||||
if not PfId then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift not PfId")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift not ActivityConfig")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig.SPID then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift not ActivityConfig.SPID")
|
||||
return
|
||||
end
|
||||
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
|
||||
local nMainGiftType = DataPack.readByte(packet)
|
||||
local nSubGiftType = DataPack.readByte(packet)
|
||||
local nSubGiftType2 = DataPack.readByte(packet)
|
||||
|
||||
if nMainGiftType < 1 or nMainGiftType > 4 then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift nMainGiftType < 1 or nMainGiftType > 4")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == nMainGiftType or 3 == nMainGiftType then
|
||||
if nSubGiftType < 1 or nSubGiftType > 2 then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift nSubGiftType < 1 or nSubGiftType > 2 : "..nMainGiftType)
|
||||
return
|
||||
end
|
||||
elseif 2 == nMainGiftType or 4 == nMainGiftType then
|
||||
if nSubGiftType < 1 or nSubGiftType > 3 then
|
||||
print("[Tip] ActivityType10024 OnReqMasterLuGift nSubGiftType < 1 or nSubGiftType > 3 : "..nMainGiftType)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
userData.ReqMainGiftType = nMainGiftType
|
||||
userData.ReqSubGiftType = nSubGiftType
|
||||
userData.ReqSubGiftType2 = nSubGiftType2
|
||||
|
||||
if 4 ~= nMainGiftType then -- 请求 鲁大师平台 用户信息
|
||||
ReqMasterLuUserInfo(pActor)
|
||||
else --游戏盒子:4(一级子类型:1:下载奖励(二级子类型:奖励Id);2:每日奖励(二级子类型:奖励Id);3:等级奖励(二级子类型:奖励Id)))
|
||||
if 1 == userData.ReqSubGiftType then
|
||||
SendDownLoadGameBoxGift(pActor)
|
||||
elseif 2 == userData.ReqSubGiftType then
|
||||
SendGameBoxDailyGift(pActor)
|
||||
elseif 3 == userData.ReqSubGiftType then
|
||||
SendGameBoxLevelGift(pActor)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 发送 游戏盒子下载奖励
|
||||
function SendDownLoadGameBoxGift(pActor)
|
||||
print("[Tip] ActivityType10024 SendDownLoadGameBoxGift ")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
if not userData.LoginType then
|
||||
print("[Tip] ActivityType10024 SendDownLoadGameBoxGift not userData.LoginType")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == userData.DownLoadGameBoxGiftFlag then
|
||||
print("[Tip] ActivityType10024 SendDownLoadGameBoxGift already get award")
|
||||
return
|
||||
end
|
||||
|
||||
if not ActivityConfig.downloadBoxReward then
|
||||
print("[Tip] ActivityType10024 SendDownLoadGameBoxGift not ActivityConfig.downloadBoxReward")
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10024 SendDownLoadGameBoxGift not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.DownLoadGameBoxGiftFlag = 1
|
||||
|
||||
CommonFunc.Awards.Give(pActor, ActivityConfig.downloadBoxReward, GameLog.Log_Activity10024)
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 绑定手机奖励
|
||||
function SendBindPhoneGift(pActor)
|
||||
print("[Tip] ActivityType10024 SendBindPhoneGift")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
if not userData.BindPhone or 1 ~= userData.BindPhone then
|
||||
print("[Tip] ActivityType10024 SendBindPhoneGift not userData.BindPhone or 1 ~= userData.BindPhone")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == userData.BindPhoneGiftFlag then
|
||||
print("[Tip] ActivityType10024 SendBindPhoneGift already get BindPhoneGift")
|
||||
return
|
||||
end
|
||||
|
||||
if not ActivityConfig.bindPhoneReward then
|
||||
print("[Tip] ActivityType10024 SendBindPhoneGift not ActivityConfig.bindPhoneReward")
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10022 SendBindPhoneGift not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.BindPhoneGiftFlag = 1
|
||||
|
||||
CommonFunc.Awards.Give(pActor, ActivityConfig.bindPhoneReward, GameLog.Log_Activity10024)
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 防沉迷奖励
|
||||
function SendFcmGift(pActor)
|
||||
print("[Tip] ActivityType10024 SendFcmGift")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
if not userData.Fcm or 1 ~= userData.Fcm then
|
||||
print("[Tip] ActivityType10024 SendBindPhoneGift not userData.Fcm or 1 ~= userData.Fcm")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == userData.FcmGiftFlag then
|
||||
print("[Tip] ActivityType10024 SendFcmGift already get FcmGift")
|
||||
return
|
||||
end
|
||||
|
||||
if not ActivityConfig.FcmReward then
|
||||
print("[Tip] ActivityType10024 SendFcmGift not ActivityConfig.FcmReward")
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10022 SendFcmGift not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.FcmGiftFlag = 1
|
||||
|
||||
CommonFunc.Awards.Give(pActor, ActivityConfig.FcmReward, GameLog.Log_Activity10024)
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 Vip奖励
|
||||
function SendVipAwards(pActor)
|
||||
print("[Tip] ActivityType10024 SendVipAwards")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
|
||||
if not userData.VipLevel or userData.VipLevel < 0 or userData.VipLevel > 9 then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not userData.VipLevel or userData.VipLevel < 0 or userData.VipLevel > 9")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.ReqSubGiftType < 1 or userData.ReqSubGiftType > 2 then
|
||||
print("[Tip] ActivityType10024 SendVipAwards userData.ReqSubGiftType < 1 or userData.ReqSubGiftType > 2")
|
||||
return
|
||||
end
|
||||
|
||||
if not VipConfig then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not VipConfig")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.ReqSubGiftType2 > #VipConfig then
|
||||
print("[Tip] ActivityType10024 SendVipAwards ReqSubGiftType2 > #VipConfig ReqSubGiftType : "..userData.ReqSubGiftType.."ReqSubGiftType2 : "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
|
||||
if not VipConfig[userData.ReqSubGiftType2].vipLevel then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not VipConfig[userData.ReqSubGiftType2].vipLevel")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == userData.ReqSubGiftType then
|
||||
if not VipConfig[userData.ReqSubGiftType2].titleReward then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not VipConfig[userData.ReqSubGiftType2].titleReward")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.VipLevel >= VipConfig[userData.ReqSubGiftType2].vipLevel then
|
||||
if 0 == System.getIntBit(userData.VipTitleFlag, userData.ReqSubGiftType2 - 1) then
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.VipTitleFlag = System.setIntBit(userData.VipTitleFlag, userData.ReqSubGiftType2 - 1, true)
|
||||
CommonFunc.Awards.Give(pActor, VipConfig[userData.ReqSubGiftType2].titleReward, GameLog.Log_Activity10024)
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendVipAwards already get titleReward Id : "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendVipAwards titleReward userData.VipLevel < VipConfig[userData.ReqSubGiftType2].vipLevel")
|
||||
return
|
||||
end
|
||||
elseif 2 == userData.ReqSubGiftType then
|
||||
if not VipConfig[userData.ReqSubGiftType2].giftReward then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not VipConfig[userData.ReqSubGiftType2].giftReward")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.VipLevel >= VipConfig[userData.ReqSubGiftType2].vipLevel then
|
||||
if 0 == System.getIntBit(userData.VipGiftFlag, userData.ReqSubGiftType2 - 1) then
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10024 SendVipAwards not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.VipGiftFlag = System.setIntBit(userData.VipGiftFlag, userData.ReqSubGiftType2 - 1, true)
|
||||
CommonFunc.Awards.Give(pActor, VipConfig[userData.ReqSubGiftType2].giftReward, GameLog.Log_Activity10024)
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendVipAwards already get giftReward Id : "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendVipAwards giftReward userData.VipLevel < VipConfig[userData.ReqSubGiftType2].vipLevel")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 会员奖励
|
||||
function SendMemberAwards(pActor)
|
||||
print("[Tip] ActivityType10024 SendMemberAwards")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
if not userData.PlusLevel or userData.PlusLevel < 1 or userData.PlusLevel > 4 then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not userData.PlusLevel or userData.PlusLevel < 1 or userData.PlusLevel > 4")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.ReqSubGiftType < 1 or userData.ReqSubGiftType > 2 then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards userData.ReqSubGiftType < 1 or userData.ReqSubGiftType > 2")
|
||||
return
|
||||
end
|
||||
|
||||
if not MemberConfig then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not MemberConfig")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.ReqSubGiftType2 > #MemberConfig then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards ReqSubGiftType2 > #MemberConfig ReqSubGiftType : "..userData.ReqSubGiftType.."ReqSubGiftType2 : "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
|
||||
if not MemberConfig[userData.ReqSubGiftType2].memberLevel then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not MemberConfig[userData.ReqSubGiftType2].memberLevel")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
if 1 == userData.ReqSubGiftType then
|
||||
if not MemberConfig[userData.ReqSubGiftType2].titleReward then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not MemberConfig[userData.ReqSubGiftType2].titleReward")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.PlusLevel >= MemberConfig[userData.ReqSubGiftType2].memberLevel then
|
||||
if 0 == System.getIntBit(userData.MemberTitleFlag, userData.ReqSubGiftType2 - 1) then
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.MemberTitleFlag = System.setIntBit(userData.MemberTitleFlag, userData.ReqSubGiftType2 - 1, true)
|
||||
CommonFunc.Awards.Give(pActor, MemberConfig[userData.ReqSubGiftType2].titleReward, GameLog.Log_Activity10024)
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendMemberAwards already get titleReward Id : "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendMemberAwards titleReward userData.PlusLevel < MemberConfig[userData.ReqSubGiftType2].memberLevel")
|
||||
return
|
||||
end
|
||||
elseif 2 == userData.ReqSubGiftType then
|
||||
if not MemberConfig[userData.ReqSubGiftType2].giftReward then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not MemberConfig[userData.ReqSubGiftType2].giftReward")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.PlusLevel >= MemberConfig[userData.ReqSubGiftType2].memberLevel then
|
||||
if 0 == System.getIntBit(userData.MemberGiftFlag, userData.ReqSubGiftType2 - 1) then
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10024 SendMemberAwards not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.MemberGiftFlag = System.setIntBit(userData.MemberGiftFlag, userData.ReqSubGiftType2 - 1, true)
|
||||
CommonFunc.Awards.Give(pActor, MemberConfig[userData.ReqSubGiftType2].giftReward, GameLog.Log_Activity10024)
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendMemberAwards already get giftReward Id : "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
else
|
||||
print("[Tip] ActivityType10024 SendMemberAwards giftReward userData.PlusLevel < MemberConfig[userData.ReqSubGiftType2].memberLevel")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 会员每日礼包
|
||||
function SendMemberDailyGift(pActor)
|
||||
print("[Tip] ActivityType10024 SendMemberDailyGift")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
|
||||
if userData.PlusLevel < 1 or userData.PlusLevel > 4 then
|
||||
print("[Tip] ActivityType10024 SendMemberDailyGift userData.PlusLevel < 1 or userData.PlusLevel > 4")
|
||||
return
|
||||
end
|
||||
|
||||
if 3 ~= userData.ReqSubGiftType then
|
||||
print("[Tip] ActivityType10024 SendMemberDailyGift 3 ~= userData.ReqSubGiftType")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == userData.MemberDailyGiftFlag then
|
||||
print("[Tip] ActivityType10024 SendMemberDailyGift already get MemberDailyGift")
|
||||
return
|
||||
end
|
||||
|
||||
if not MemberConfig then
|
||||
print("[Tip] ActivityType10024 SendMemberDailyGift not MemberConfig")
|
||||
return
|
||||
end
|
||||
|
||||
if not MemberConfig[userData.ReqSubGiftType] or not MemberConfig[userData.ReqSubGiftType].giftReward then
|
||||
print("[Tip] ActivityType10024 SendMemberDailyGift not MemberConfig[userData.ReqSubGiftType].giftReward")
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10022 SendMemberDailyGift CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.MemberDailyGiftFlag = 1
|
||||
|
||||
CommonFunc.Awards.Give(pActor, MemberConfig[userData.ReqSubGiftType].giftReward, GameLog.Log_Activity10024)
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 游戏盒子每日礼包
|
||||
function SendGameBoxDailyGift(pActor)
|
||||
print("[Tip] ActivityType10024 SendGameBoxDailyGift")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
if not userData.LoginType then
|
||||
print("[Tip] ActivityType10024 SendGameBoxDailyGift not userData.LoginType")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == userData.GameBoxDailyGiftFlag then
|
||||
print("[Tip] ActivityType10024 SendGameBoxDailyGift already get GameBoxDailyGift")
|
||||
return
|
||||
end
|
||||
|
||||
if not ActivityConfig or not ActivityConfig.boxdailyGift then
|
||||
print("[Tip] ActivityType10024 SendGameBoxDailyGift not ActivityConfig or not ActivityConfig.dailyGift")
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10022 SendGameBoxDailyGift CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.GameBoxDailyGiftFlag = 1
|
||||
|
||||
CommonFunc.Awards.Give(pActor, ActivityConfig.boxdailyGift, GameLog.Log_Activity10024)
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
-- 发送 游戏盒子等级礼包
|
||||
function SendGameBoxLevelGift(pActor)
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift")
|
||||
|
||||
local userData = GetMasterLuUserData(pActor)
|
||||
if not userData.LoginType then
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift not userData.LoginType")
|
||||
return
|
||||
end
|
||||
|
||||
if userData.ReqSubGiftType2 < 1 or userData.ReqSubGiftType2 > #ActivityConfig.levelGift or not ActivityConfig.levelGift[userData.ReqSubGiftType2] then
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift userData.ReqSubGiftType2 < 1 or userData.ReqSubGiftType2 > #ActivityConfig.levelGift or not ActivityConfig.levelGift[userData.ReqSubGiftType2]")
|
||||
return
|
||||
end
|
||||
|
||||
local nActorLevel = Actor.getIntProperty(pActor,PROP_CREATURE_LEVEL)
|
||||
if not ActivityConfig.levelGift[userData.ReqSubGiftType2].lvl or ActivityConfig.levelGift[userData.ReqSubGiftType2].lvl > nActorLevel then
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift not ActivityConfig.levelGift[userData.ReqSubGiftType2].lvl and ActivityConfig.levelGift[userData.ReqSubGiftType2].lvl > nActorLevel")
|
||||
return
|
||||
end
|
||||
|
||||
if not ActivityConfig.levelGift[userData.ReqSubGiftType2].awards then
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift not ActivityConfig.levelGift[userData.ReqSubGiftType2].awards")
|
||||
return
|
||||
end
|
||||
|
||||
if 1 == System.getIntBit(userData.GameBoxLevelGiftFlag, userData.ReqSubGiftType2 - 1) then
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift already get levelGift Id: "..userData.ReqSubGiftType2)
|
||||
return
|
||||
end
|
||||
|
||||
--检测格子 16 : 活动通用
|
||||
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
|
||||
print("[Tip] ActivityType10024 SendGameBoxLevelGift not CheckBagIsEnough")
|
||||
return
|
||||
end
|
||||
|
||||
-- 设置标志
|
||||
userData.GameBoxLevelGiftFlag = System.setIntBit(userData.GameBoxLevelGiftFlag, userData.ReqSubGiftType2 - 1, true)
|
||||
CommonFunc.Awards.Give(pActor, ActivityConfig.levelGift[userData.ReqSubGiftType2].awards, GameLog.Log_Activity10024)
|
||||
|
||||
userData.ReqMainGiftType = 0
|
||||
userData.ReqSubGiftType = 0
|
||||
userData.ReqSubGiftType2 = 0
|
||||
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
|
||||
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, cMasterLuLogin, OnReqMasterLuLogin)
|
||||
NetmsgDispatcher.Reg(enPlatforMwelfareID, cReqMasterLuAward, OnReqMasterLuGift)
|
||||
|
||||
|
||||
-- 跨天
|
||||
function OnNewDayArrive(pActor,ndiffday)
|
||||
print("[Tip] ActivityType10024 OnNewDayArrive")
|
||||
|
||||
-- 平台验证
|
||||
if not PfId then
|
||||
print("[Tip] ActivityType10024 OnNewDayArrive not PfId")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig then
|
||||
print("[Tip] ActivityType10024 OnNewDayArrive not ActivityConfig")
|
||||
return
|
||||
end
|
||||
if not ActivityConfig.SPID then
|
||||
print("[Tip] ActivityType10024 OnNewDayArrive not ActivityConfig.SPID")
|
||||
return
|
||||
end
|
||||
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
|
||||
print("[Tip] ActivityType10024 OnNewDayArrive [非本平台活动]")
|
||||
return --非本平台活动
|
||||
end
|
||||
|
||||
local currMiniTime = System.getCurrMiniTime()
|
||||
local data = GetMasterLuUserData(pActor)
|
||||
if data.LastTime then
|
||||
if not System.isSameDay(data.LastTime, currMiniTime) then
|
||||
--print("跨一天")
|
||||
data.LastTime = currMiniTime
|
||||
data.MemberDailyGiftFlag = 0
|
||||
data.GameBoxDailyGiftFlag = 0
|
||||
SendMasterLuUserData(pActor)
|
||||
end
|
||||
-- SendData(pActor)
|
||||
end
|
||||
end
|
||||
|
||||
ActorEventDispatcher.Reg(aeNewDayArrive, OnNewDayArrive, "ActivityType10024.lua")
|
||||
@@ -35,20 +35,13 @@ require("Activity.ActivityType10005") --个人活动:月份签到
|
||||
require("Activity.ActivityType10006") --个人活动:登录基金
|
||||
require("Activity.ActivityType10009") --个人活动:达标活动
|
||||
require("Activity.ActivityType10010") --个人活动:寻宝活动
|
||||
require("Activity.ActivityType10011") --玩法:YY大厅特权
|
||||
require("Activity.ActivityType10012") --玩法:YY会员
|
||||
require("Activity.ActivityType10013") --玩法:超玩会员
|
||||
require("Activity.ActivityType10014") --玩法:微信礼包
|
||||
require("Activity.ActivityType10015") --全局个人活动:每周固定时间的礼包活动
|
||||
require("Activity.ActivityType10016") --玩法:YY4366
|
||||
require("Activity.ActivityType10017") --兑换活动
|
||||
require("Activity.ActivityQQHall") --QQ大厅
|
||||
require("Activity.ActivityType10019") --
|
||||
require("Activity.ActivityLuckyTree") --
|
||||
require("Activity.ActivityOnlineMin") --
|
||||
require("Activity.ActivityType10020") --
|
||||
require("Activity.ActivityType10019") --个人活动:达标活动
|
||||
require("Activity.ActivityLuckyTree") --摇钱树
|
||||
require("Activity.ActivityOnlineMin") --累计在线
|
||||
require("Activity.ActivityType10020") --个人活动:寻宝
|
||||
require("Activity.ActivityType10021") --个人活动:二充
|
||||
|
||||
require("Activity.ActivityType10024") --鲁大师
|
||||
require("Activity.ActivityType10033") --区服冠名
|
||||
require("Activity.ActivityType10038") --神秘福袋
|
||||
|
||||
@@ -243,7 +243,6 @@ end
|
||||
|
||||
--使用通码
|
||||
function UseCommonCDKey(pActor, code)
|
||||
print("[DEBUG] UseCommonCDKey, code="..code)
|
||||
|
||||
local data = getActorData(pActor)
|
||||
local time = System.getCurrMiniTime()
|
||||
@@ -252,6 +251,12 @@ function UseCommonCDKey(pActor, code)
|
||||
return
|
||||
end
|
||||
|
||||
-- 2025-4-15 12转130级才能领取
|
||||
if Actor.checkCommonLimit(pActor,130,12,0,0) == false and code == "tiancijiyuan" then
|
||||
Actor.sendTipmsg(pActor,"请不要使用小号注册进行刷去奖励!")
|
||||
return
|
||||
end
|
||||
|
||||
if CommonCDKeyConf[code].switch == 0 then
|
||||
local npack = DataPack.allocPacket(pActor, enMiscSystemID, sUseCdkey)
|
||||
if npack then
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
--#include "data/config/activity/Activity10006Config.config" once
|
||||
--#include "data/config/activity/Activity10009Config.config" once
|
||||
--#include "data/config/activity/Activity10010Config.config" once
|
||||
--#include "data/config/activity/Activity10014Config.config" once
|
||||
--#include "data/config/activity/Activity10015Config.config" once
|
||||
--#include "data/config/activity/Activity10017Config.config" once
|
||||
--#include "data/config/activity/Activity10019Config.config" once
|
||||
@@ -65,18 +64,6 @@
|
||||
--#include "data/config/OnlineTime/OnlineTimeReward.config" once --累计在线
|
||||
--#include "data/config/OnlineTime/OnlineTimeconst.config" once --在线
|
||||
|
||||
--平台活动
|
||||
--#include "data/config/Platformludashi/Ludashimember.config" once --鲁大师 会员
|
||||
--#include "data/config/Platformludashi/Ludashivip.config" once --鲁大师 vip
|
||||
--#include "data/config/Platformludashi/Platformludashi.config" once --鲁大师
|
||||
--#include "data/config/YYPlatform/YYMemberConfig.config" once
|
||||
--#include "data/config/YYPlatform/YYVIPConfig.config" once
|
||||
--#include "data/config/YYPlatform/GameVIPConfig.config" once
|
||||
|
||||
--#include "data/config/Platform4366/Login4366.config" once --4366
|
||||
--#include "data/config/Platform4366/Platform4366.config" once --4366
|
||||
|
||||
|
||||
-- 套装
|
||||
--#include "data/config/SuitConfig.config" once
|
||||
|
||||
|
||||
@@ -1989,23 +1989,28 @@ TipMsg={
|
||||
},
|
||||
[497] = {
|
||||
id = 497,
|
||||
tipmsg = "%s赞助白卡会员,|C:0xfc21ed&T:智能回收|轻松挂机续航,交易功能直接开启|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
tipmsg = "",
|
||||
-- tipmsg = "%s赞助白卡会员,|C:0xfc21ed&T:智能回收|轻松挂机续航,交易功能直接开启|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
},
|
||||
[498] = {
|
||||
id = 498,
|
||||
tipmsg = "%s赞助绿卡会员,|C:0xfc21ed&T:麻痹戒指|三职业通用麻天麻地,打怪回收|C:0xfc21ed&T:金币+18%|,攻速大增|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
tipmsg = "",
|
||||
-- tipmsg = "%s赞助绿卡会员,|C:0xfc21ed&T:麻痹戒指|三职业通用麻天麻地,打怪回收|C:0xfc21ed&T:金币+18%|,攻速大增|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
},
|
||||
[499] = {
|
||||
id = 499,
|
||||
tipmsg = "%s赞助蓝卡会员,打怪回收|C:0xfc21ed&T:金币+36%|,打怪|C:0xfc21ed&T:经验+20%|,|C:0xfc21ed&T:切割+20%|打怪砍瓜切菜|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
tipmsg = "",
|
||||
-- tipmsg = "%s赞助蓝卡会员,打怪回收|C:0xfc21ed&T:金币+36%|,打怪|C:0xfc21ed&T:经验+20%|,|C:0xfc21ed&T:切割+20%|打怪砍瓜切菜|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
},
|
||||
[500] = {
|
||||
id = 500,
|
||||
tipmsg = "%s赞助紫卡会员,体力永久|C:0xfc21ed&T:+1000|,幸运永久额外|C:0xfc21ed&T:+7|,打怪|C:0xfc21ed&T:经验+40%||E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
tipmsg = "",
|
||||
-- tipmsg = "%s赞助紫卡会员,体力永久|C:0xfc21ed&T:+1000|,幸运永久额外|C:0xfc21ed&T:+7|,打怪|C:0xfc21ed&T:经验+40%||E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
},
|
||||
[501] = {
|
||||
id = 501,
|
||||
tipmsg = "%s赞助橙卡会员,|C:0xfc21ed&T:超麻神戒|天地唯我,|C:0xfc21ed&T:暴击倍率+50%|不暴则已一暴惊人|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
tipmsg = "",
|
||||
-- tipmsg = "%s赞助橙卡会员,|C:0xfc21ed&T:超麻神戒|天地唯我,|C:0xfc21ed&T:暴击倍率+50%|不暴则已一暴惊人|E:-2,19,&U:&C:0x28ee01&T:[我也要特权]|",
|
||||
},
|
||||
[502] = {
|
||||
id = 502,
|
||||
|
||||
29
buildConfig/AMServerLinux.txt
Executable file
29
buildConfig/AMServerLinux.txt
Executable file
@@ -0,0 +1,29 @@
|
||||
amconfig=
|
||||
{
|
||||
httpport =11001, --绑定的http回调的端口
|
||||
amport =5660, --连接地址
|
||||
platform =
|
||||
{
|
||||
{
|
||||
spid="wyi2",
|
||||
codeid=1, --产品的编号
|
||||
code="djrm", --产品的code
|
||||
db="mir_amdb", --数据库名
|
||||
host="192.168.25.110", --数据库主机
|
||||
port=3307, --数据库端口
|
||||
user="root", --数据库账号
|
||||
pass="mysql_Adkijc", --数据库密码
|
||||
paykey="GAmqXI8ao8kGAOIQmjFVqg==", --
|
||||
awdkey="GAmqXI8ao8kGAOIQmjFVqg==", --
|
||||
bianma="utf8", --
|
||||
|
||||
--允许的ip列表,最多32个
|
||||
hosts=
|
||||
{
|
||||
"116.22.44.53",
|
||||
"127.0.0.1",
|
||||
"116.233.207.20"
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
24
buildConfig/BackStageServerLinux.txt
Executable file
24
buildConfig/BackStageServerLinux.txt
Executable file
@@ -0,0 +1,24 @@
|
||||
BackServer =
|
||||
{
|
||||
spguid = 1, --默认的spid
|
||||
|
||||
--监听:服务器参数配置
|
||||
Server =
|
||||
{
|
||||
ServiceName="BackStageServer",
|
||||
BindAddress = "0.0.0.0",
|
||||
Port = 8500 ,
|
||||
HttpPort = 111,
|
||||
},
|
||||
|
||||
--数据库连接相关
|
||||
SQL =
|
||||
{
|
||||
Host = "192.168.25.110",
|
||||
Port = 3307,
|
||||
DBName = "mir_command",
|
||||
DBUser = "root",
|
||||
DBPass = "mysql_Adkijc",
|
||||
utf8=1,
|
||||
},
|
||||
}
|
||||
29
buildConfig/LoggerServerLinux.txt
Executable file
29
buildConfig/LoggerServerLinux.txt
Executable file
@@ -0,0 +1,29 @@
|
||||
LoggerServer =
|
||||
{
|
||||
--监听:服务器参数配置
|
||||
Server =
|
||||
{
|
||||
BindAddress = "0.0.0.0",
|
||||
Port = 34000 ,
|
||||
ServiceName="LoggerServer",
|
||||
},
|
||||
|
||||
--监听:发送聊天消息给工具
|
||||
ChatLog =
|
||||
{
|
||||
ServiceName="LogServer",
|
||||
BindAddress = "0.0.0.0",
|
||||
Port = 35010,
|
||||
},
|
||||
|
||||
--数据库连接相关
|
||||
SQL =
|
||||
{
|
||||
Host = "192.168.25.110",
|
||||
Port = 3307,
|
||||
DBName = "mir_log_s1",
|
||||
DBUser = "root",
|
||||
DBPass = "mysql_Adkijc",
|
||||
utf8=1,
|
||||
},
|
||||
}
|
||||
24
buildConfig/NameServerLinux.txt
Executable file
24
buildConfig/NameServerLinux.txt
Executable file
@@ -0,0 +1,24 @@
|
||||
NameServer =
|
||||
{
|
||||
--服务器名称
|
||||
ServerName = "zgame-nameserver",
|
||||
spguid=1,
|
||||
|
||||
--监听:名称服务绑定地址和端口
|
||||
NameService =
|
||||
{
|
||||
Address = "0.0.0.0",
|
||||
Port = 35000
|
||||
},
|
||||
|
||||
--数据库连接配置
|
||||
SQL =
|
||||
{
|
||||
--Host = "192.168.0.173",
|
||||
Host = "192.168.25.110",
|
||||
Port = 3307,
|
||||
DBName = "mir_name",
|
||||
DBUser = "root",
|
||||
DBPass = "mysql_Adkijc"
|
||||
}
|
||||
}
|
||||
51
buildConfig/SessionServerLinux.txt
Executable file
51
buildConfig/SessionServerLinux.txt
Executable file
@@ -0,0 +1,51 @@
|
||||
SessionServer =
|
||||
{
|
||||
--服务器名称
|
||||
ServerName = "会话服(sid=1)",
|
||||
--SPID(运营商ID)定义
|
||||
SPID = "wyi2",
|
||||
spguid = 1,
|
||||
fcmOpen=false,
|
||||
checksign=0,
|
||||
autoaccount = 1,
|
||||
autocard = 1,
|
||||
phptime = 1200,
|
||||
|
||||
--监听:会话服务器
|
||||
SessionService =
|
||||
{
|
||||
Address = "0.0.0.0",
|
||||
Port = 31000
|
||||
},
|
||||
|
||||
--监听:网关服务器(无用)
|
||||
GateService =
|
||||
{
|
||||
Address = "0.0.0.0",
|
||||
Port = 21001
|
||||
},
|
||||
|
||||
--连接:Log服务器
|
||||
LogServer =
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = 34000
|
||||
},
|
||||
|
||||
--连接:AM服务器
|
||||
AMServer =
|
||||
{
|
||||
Host = "127.0.0.1",
|
||||
Port = 5660
|
||||
},
|
||||
|
||||
--数据库连接配置
|
||||
SQL =
|
||||
{
|
||||
Host = "192.168.25.110",
|
||||
Port = 3307,
|
||||
DBName = "mir_account",
|
||||
DBUser = "root",
|
||||
DBPass = "mysql_Adkijc",
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,72 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/kubbo/chuanqi-os:latest
|
||||
container_name: chuanqi-server-db
|
||||
base:
|
||||
image: chuanqi-server-base:latest
|
||||
networks:
|
||||
network:
|
||||
ipv4_address: 172.36.10.25
|
||||
stdin_open: true
|
||||
# ports:
|
||||
# - 10319:10319
|
||||
# - 35010:35010
|
||||
# - 31000:31000
|
||||
# - 34000:34000
|
||||
# - 5660:5660
|
||||
# - 8500:8500
|
||||
volumes:
|
||||
- ./DBServer:/data/server/s1/DBServer
|
||||
- ./wch:/etc/yum/wch
|
||||
- ./buildConfig/AMServerLinux.txt:/data/server/build/AMServer/AMServerLinux.txt
|
||||
- ./buildConfig/BackStageServerLinux.txt:/data/server/build/BackStageServer/BackStageServerLinux.txt
|
||||
- ./buildConfig/LoggerServerLinux.txt:/data/server/build/LoggerServer/LoggerServerLinux.txt
|
||||
- ./buildConfig/NameServerLinux.txt:/data/server/build/NameServer/NameServerLinux.txt
|
||||
- ./buildConfig/SessionServerLinux.txt:/data/server/build/SessionServer/SessionServerLinux.txt
|
||||
entrypoint: "/data/server/s1/DBServer/start.sh"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
logic:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/kubbo/chuanqi-os:latest
|
||||
container_name: chuanqi-server-logic
|
||||
networks:
|
||||
- network
|
||||
ports:
|
||||
- 10318:10318
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
depends_on:
|
||||
- db # 等待db服务启动
|
||||
- base
|
||||
stdin_open: true
|
||||
volumes:
|
||||
- ./LogicServer:/data/server/s1/LogicServer
|
||||
- ./wch:/etc/yum/wch
|
||||
entrypoint: "/data/server/s1/LogicServer/start.sh"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
gate:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/kubbo/chuanqi-os:latest
|
||||
container_name: chuanqi-server-gate
|
||||
networks:
|
||||
- network
|
||||
ports:
|
||||
- 10317:10317
|
||||
depends_on:
|
||||
- logic # 等待logic服务启动
|
||||
- logic
|
||||
stdin_open: true
|
||||
volumes:
|
||||
- ./Gateway:/data/server/s1/Gateway
|
||||
- ./wch:/etc/yum/wch
|
||||
entrypoint: "/data/server/s1/Gateway/start.sh"
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
TZ: Asia/Shanghai
|
||||
networks:
|
||||
network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.36.10.0/24
|
||||
Reference in New Issue
Block a user