refactor: 移除 2144 平台福利相关代码
- 删除了 Platform2144 和 Platform2144sccs 的配置文件 - 移除了 ActivityType10034 和 ActivityType10041 的实现代码 - 从 Activitys.txt 和 GameConfigs.txt 中移除了相关引用
This commit is contained in:
		| @@ -1,6 +0,0 @@ | |||||||
| --P-平台福利2144.xlsx 2144 |  | ||||||
| Platform2144Config={ |  | ||||||
| 	authentication = {{type=0,id=365,count=1},{type=0,id=261,count=10},{type=0,id=300,count=1},{type=2,id=2,count=50000}}, |  | ||||||
| 	SPID = "33", |  | ||||||
| 	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}}, |  | ||||||
| } |  | ||||||
| @@ -1,7 +0,0 @@ | |||||||
| --P-平台福利2144沙城传说.xlsx 2144沙城传说 |  | ||||||
| Platform2144sccsConfig={ |  | ||||||
| 	SPID = "57", |  | ||||||
| 	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}}, |  | ||||||
| 	authentication = {{type=0,id=365,count=1},{type=0,id=261,count=10},{type=0,id=300,count=1},{type=2,id=2,count=50000}}, |  | ||||||
| 	type = 1, |  | ||||||
| } |  | ||||||
| @@ -1,166 +0,0 @@ | |||||||
| module("ActivityType10034", package.seeall) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| --[[ |  | ||||||
|     个人数据:userData |  | ||||||
|     { |  | ||||||
|         ReqMainGiftType                 2144 请求奖励类型 0:默认类型(服务器自用);1:绑定手机奖励;2:完善资料奖励 |  | ||||||
|  |  | ||||||
|         BindPhoneGiftFlag = 0 or 1      2144 绑定手机 礼包领取标志 |  | ||||||
|         RealNameAuthenGiftFlag = 0 or 1 2144 完善资料 礼包领取标志 |  | ||||||
|     } |  | ||||||
| ]]-- |  | ||||||
|  |  | ||||||
|  |  | ||||||
| --活动类型 |  | ||||||
| ActivityType = 10034 |  | ||||||
| --对应的活动配置 |  | ||||||
| ActivityConfig = Platform2144Config |  | ||||||
|  |  | ||||||
|  |  | ||||||
| local PfId = System.getPfId() |  | ||||||
|  |  | ||||||
|  |  | ||||||
| function Get2144UserData(pActor) |  | ||||||
|     local var = Actor.getStaticVar(pActor) |  | ||||||
|     if nil == var.UserData2144 then |  | ||||||
|         var.UserData2144 = {} |  | ||||||
|     end |  | ||||||
|     return var.UserData2144 |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 发送 2144 玩家数据 |  | ||||||
| function Send2144UserData(pActor) |  | ||||||
|     print("ActivityType10034 Send2144UserData actorName : "..Actor.getName(pActor)) |  | ||||||
|  |  | ||||||
|     local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, cSend2144UserData) |  | ||||||
|     if npack then |  | ||||||
|         local userData = Get2144UserData(pActor) |  | ||||||
|  |  | ||||||
|         DataPack.writeByte(npack, userData.BindPhoneGiftFlag) |  | ||||||
|         DataPack.writeByte(npack, userData.RealNameAuthenGiftFlag) |  | ||||||
|         DataPack.flush(npack) |  | ||||||
|     end |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 发送 手机绑定奖励 |  | ||||||
| function SendBindPhoneGift(pActor) |  | ||||||
|     print("ActivityType10034 SendBindPhoneGift") |  | ||||||
|  |  | ||||||
|     local userData = Get2144UserData(pActor) |  | ||||||
|     userData.ReqMainGiftType = 0 |  | ||||||
|  |  | ||||||
|     if 1 == userData.BindPhoneGiftFlag then |  | ||||||
|         print("ActivityType10034 SendBindPhoneGift already get BindPhoneGift!") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     if not ActivityConfig or not ActivityConfig.bindPhoneReward then |  | ||||||
|         print("ActivityType10034 SendBindPhoneGift not ActivityConfig or not ActivityConfig.bindPhoneReward!") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     --检测格子 16 : 活动通用 |  | ||||||
|     if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then |  | ||||||
|         print("[Tip] ActivityType10034 SendBindPhoneGift not CheckBagIsEnough") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     -- 设置标志 |  | ||||||
|     userData.BindPhoneGiftFlag = 1 |  | ||||||
|      |  | ||||||
|     CommonFunc.Awards.Give(pActor, ActivityConfig.bindPhoneReward, GameLog.Log_Activity10034) |  | ||||||
|  |  | ||||||
|     Send2144UserData(pActor) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 发送 手机绑定奖励 |  | ||||||
| function SendRealNameAuthenGift(pActor) |  | ||||||
|     print("ActivityType10034 SendRealNameAuthenGift") |  | ||||||
|  |  | ||||||
|     local userData = Get2144UserData(pActor) |  | ||||||
|     userData.ReqMainGiftType = 0 |  | ||||||
|  |  | ||||||
|     if 1 == userData.RealNameAuthenGiftFlag then |  | ||||||
|         print("ActivityType10034 SendRealNameAuthenGift already get RealNameAuthenGift!") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     if not ActivityConfig or not ActivityConfig.authentication then |  | ||||||
|         print("ActivityType10034 SendRealNameAuthenGift not ActivityConfig or not ActivityConfig.authentication!") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     --检测格子 16 : 活动通用 |  | ||||||
|     if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then |  | ||||||
|         print("[Tip] ActivityType10034 SendRealNameAuthenGift not CheckBagIsEnough") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     -- 设置标志 |  | ||||||
|     userData.RealNameAuthenGiftFlag = 1 |  | ||||||
|      |  | ||||||
|     CommonFunc.Awards.Give(pActor, ActivityConfig.authentication, GameLog.Log_Activity10034) |  | ||||||
|  |  | ||||||
|     Send2144UserData(pActor) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 2144 用户登录 |  | ||||||
| function OnReq2144Login(pActor) |  | ||||||
|     print("ActivityType10034 OnReq2144Login") |  | ||||||
|      |  | ||||||
|     local userData = Get2144UserData(pActor) |  | ||||||
|     if nil == userData.BindPhoneGiftFlag then |  | ||||||
|         userData.BindPhoneGiftFlag = 0 |  | ||||||
|     end |  | ||||||
|     if nil == userData.RealNameAuthenGiftFlag then |  | ||||||
|         userData.RealNameAuthenGiftFlag = 0 |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     Send2144UserData(pActor) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 请求 2144 奖励 |  | ||||||
| function OnReq2144Gift(pActor, packet) |  | ||||||
|     print("ActivityType10034 OnReq2144Gift") |  | ||||||
|  |  | ||||||
|     -- 平台验证 |  | ||||||
|     if not PfId then |  | ||||||
|         print("[Tip] ActivityType10034 OnReq2144Gift not PfId") |  | ||||||
|         return  |  | ||||||
|     end |  | ||||||
|     if not ActivityConfig then |  | ||||||
|         print("[Tip] ActivityType10034 OnReq2144Gift not ActivityConfig") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|     if not ActivityConfig.SPID then |  | ||||||
|         print("[Tip] ActivityType10034 OnReq2144Gift not ActivityConfig.SPID") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|     if tostring(PfId) ~= tostring(ActivityConfig.SPID) then |  | ||||||
|         print("[Tip] ActivityType10034 OnReq2144Gift [非本平台活动]")   |  | ||||||
|         return --非本平台活动 |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     -- 初始化 玩家数据 |  | ||||||
|     local userData = Get2144UserData(pActor) |  | ||||||
|     userData.ReqMainGiftType = DataPack.readByte(packet) |  | ||||||
|  |  | ||||||
|     print(userData.ReqMainGiftType) |  | ||||||
|  |  | ||||||
|     if not userData.ReqMainGiftType or userData.ReqMainGiftType < 1 or userData.ReqMainGiftType > 2 then |  | ||||||
|         print("ActivityType10034 OnReq2144Gift not userData.ReqMainGiftType or userData.ReqMainGiftType < 1 or userData.ReqMainGiftType > 2") |  | ||||||
|             |  | ||||||
|         return --非本平台活动 |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     if 1 == userData.ReqMainGiftType then |  | ||||||
|         SendBindPhoneGift(pActor) |  | ||||||
|     elseif 2 == userData.ReqMainGiftType then |  | ||||||
|         SendRealNameAuthenGift(pActor) |  | ||||||
|     end |  | ||||||
| end |  | ||||||
|  |  | ||||||
|  |  | ||||||
| NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq2144Login, OnReq2144Login) |  | ||||||
| NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq2144Gift, OnReq2144Gift) |  | ||||||
| @@ -1,186 +0,0 @@ | |||||||
| module("ActivityType10041", package.seeall) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| --[[ |  | ||||||
|     2144沙城争霸 平台福利 |  | ||||||
|  |  | ||||||
|     个人数据:userData |  | ||||||
|     { |  | ||||||
|         ReqMainGiftType = 0(默认值) ~ 2    1:手机绑定奖励;2:实名认证奖励 |  | ||||||
|  |  | ||||||
|         YBCount         =                  累计充值元宝数 |  | ||||||
|         SVIPGiftFlag    = 0 or 1           超级VIP奖励标志 |  | ||||||
|         BindPhoneGiftFlag = 0 or 1         手机绑定奖励标志 |  | ||||||
|         RealNameGiftFlag = 0 or 1          实名认证奖励标志 |  | ||||||
|     } |  | ||||||
| ]]-- |  | ||||||
|  |  | ||||||
| -- 对应的活动配置 |  | ||||||
| ActivityConfig = Platform2144sccsConfig |  | ||||||
|  |  | ||||||
| -- 平台Id |  | ||||||
| local PfId = System.getPfId() |  | ||||||
|  |  | ||||||
| -- 2144沙城争霸 获取玩家数据 |  | ||||||
| function Get2144SCZBUserData(pActor) |  | ||||||
|     local var = Actor.getStaticVar(pActor) |  | ||||||
|     if nil == var.UserData2144SCZB then |  | ||||||
|         var.UserData2144SCZB = {} |  | ||||||
|     end |  | ||||||
|     return var.UserData2144SCZB |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 2144沙城争霸 发送玩家数据 |  | ||||||
| function Send2144SCZBUserData(pActor) |  | ||||||
|     print("ActivityType10041.lua Send2144SCZBUserData 玩家 : "..Actor.getName(pActor)) |  | ||||||
|  |  | ||||||
|     local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, cSend2144SCZBUserData) |  | ||||||
|     if npack then |  | ||||||
|         local userData = Get2144SCZBUserData(pActor) |  | ||||||
|  |  | ||||||
|         if ActivityConfig and ActivityConfig.type then |  | ||||||
|             local cdkdata = getActorCdkData(pActor) |  | ||||||
|             if cdkdata then |  | ||||||
|                 if cdkdata.codeTypeTimes then |  | ||||||
|                     if cdkdata.codeTypeTimes[ActivityConfig.type] then |  | ||||||
|                         userData.SVIPGiftFlag = 1 |  | ||||||
|                     end |  | ||||||
|                 end |  | ||||||
|             end |  | ||||||
|         end |  | ||||||
|  |  | ||||||
|         DataPack.writeByte(npack, userData.SVIPGiftFlag) |  | ||||||
|         DataPack.writeByte(npack, userData.BindPhoneGiftFlag) |  | ||||||
|         DataPack.writeByte(npack, userData.RealNameGiftFlag) |  | ||||||
|         DataPack.flush(npack) |  | ||||||
|     end |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 2144沙城争霸 发送手机绑定奖励 |  | ||||||
| function Send2144SCZBBindPhoneGift(pActor) |  | ||||||
|     print("ActivityType10041.lua Send2144SCZBBindPhoneGift 玩家 : "..Actor.getName(pActor)) |  | ||||||
|  |  | ||||||
|     if not ActivityConfig or not ActivityConfig.bindPhoneReward then |  | ||||||
|         print("ActivityType10041.lua Send2144SCZBBindPhoneGift not ActivityConfig or not ActivityConfig.bindPhoneReward") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     local userData = Get2144SCZBUserData(pActor) |  | ||||||
|     if 1 == userData.BindPhoneGiftFlag then |  | ||||||
|         print("ActivityType10041.lua Send2144SCZBBindPhoneGift  玩家 : "..Actor.getName(pActor).." already get BindPhoneGift") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     --检测格子 16 : 活动通用 |  | ||||||
|     if CommonFunc.Awards.CheckBagIsEnough(pActor, 16, tmDefNoBagNum, tstUI) ~= true then |  | ||||||
|         print("ActivityType10041.lua Send2144SCZBBindPhoneGift not CheckBagIsEnough") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     CommonFunc.Awards.Give(pActor, ActivityConfig.bindPhoneReward, GameLog.Log_Activity10041) |  | ||||||
|  |  | ||||||
|     -- 设置标志位 |  | ||||||
|     userData.BindPhoneGiftFlag = 1 |  | ||||||
|  |  | ||||||
|     Send2144SCZBUserData(pActor) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 2144沙城争霸 发送手机绑定奖励 |  | ||||||
| function Send2144SCZBRealNameGift(pActor) |  | ||||||
|     print("ActivityType10041.lua Send2144SCZBRealNameGift 玩家 : "..Actor.getName(pActor)) |  | ||||||
|  |  | ||||||
|     if not ActivityConfig or not ActivityConfig.authentication then |  | ||||||
|         print("ActivityType10041.lua Send2144SCZBRealNameGift not ActivityConfig or not ActivityConfig.authentication") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     local userData = Get2144SCZBUserData(pActor) |  | ||||||
|     if 1 == userData.RealNameGiftFlag then |  | ||||||
|         print("ActivityType10041.lua Send2144SCZBRealNameGift  玩家 : "..Actor.getName(pActor).." already get RealNameGift") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     --检测格子 16 : 活动通用 |  | ||||||
|     if CommonFunc.Awards.CheckBagIsEnough(pActor, 16, tmDefNoBagNum, tstUI) ~= true then |  | ||||||
|         print("ActivityType10041.lua Send2144SCZBRealNameGift not CheckBagIsEnough") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     CommonFunc.Awards.Give(pActor, ActivityConfig.authentication, GameLog.Log_Activity10041) |  | ||||||
|  |  | ||||||
|     -- 设置标志位 |  | ||||||
|     userData.RealNameGiftFlag = 1 |  | ||||||
|  |  | ||||||
|     Send2144SCZBUserData(pActor) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 2144沙城争霸 玩家登录 |  | ||||||
| function OnReq2144SCZBLogin(pActor, packet) |  | ||||||
|     print("ActivityType10041.lua OnReq2144SCZBLogin 玩家 : "..Actor.getName(pActor)) |  | ||||||
|  |  | ||||||
|     -- 平台验证 |  | ||||||
|     if not PfId then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBLogin not PfId") |  | ||||||
|         return  |  | ||||||
|     end |  | ||||||
|     if not ActivityConfig or not ActivityConfig.SPID then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBLogin not ActivityConfig or not ActivityConfig.SPID") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|     if tostring(PfId) ~= tostring(ActivityConfig.SPID) then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBLogin tostring(PfId) ~= tostring(ActivityConfig.SPID) SPID : "..PfId)   |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     local userData = Get2144SCZBUserData(pActor) |  | ||||||
|     if nil == userData.ReqMainGiftType then |  | ||||||
|         userData.ReqMainGiftType = 0 |  | ||||||
|     end |  | ||||||
|     if nil == userData.SVIPGiftFlag then |  | ||||||
|         userData.SVIPGiftFlag = 0 |  | ||||||
|     end |  | ||||||
|     if nil == userData.BindPhoneGiftFlag then |  | ||||||
|         userData.BindPhoneGiftFlag = 0 |  | ||||||
|     end |  | ||||||
|     if nil == userData.RealNameGiftFlag then |  | ||||||
|         userData.RealNameGiftFlag = 0 |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     Send2144SCZBUserData(pActor) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| -- 2144沙城争霸 获取玩家数据 |  | ||||||
| function OnReq2144SCZBGift(pActor, packet) |  | ||||||
|     print("ActivityType10041.lua OnReq2144SCZBGift 玩家 : "..Actor.getName(pActor)) |  | ||||||
|  |  | ||||||
|     -- 平台验证 |  | ||||||
|     if not PfId then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBGift not PfId") |  | ||||||
|         return  |  | ||||||
|     end |  | ||||||
|     if not ActivityConfig or not ActivityConfig.SPID then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBGift not ActivityConfig or not ActivityConfig.SPID") |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|     if tostring(PfId) ~= tostring(ActivityConfig.SPID) then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBGift tostring(PfId) ~= tostring(ActivityConfig.SPID) SPID : "..PfId)   |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     local userData = Get2144SCZBUserData(pActor) |  | ||||||
|     userData.ReqMainGiftType = DataPack.readByte(packet) |  | ||||||
|     if not userData.ReqMainGiftType then |  | ||||||
|         print("ActivityType10041.lua OnReq2144SCZBGift not userData.ReqMainGiftType 玩家 : "..Actor.getName(pActor))   |  | ||||||
|         return |  | ||||||
|     end |  | ||||||
|  |  | ||||||
|     if 1 == userData.ReqMainGiftType then       -- 请求 2144沙城争霸手机绑定奖励 |  | ||||||
|         Send2144SCZBBindPhoneGift(pActor) |  | ||||||
|     elseif 2 == userData.ReqMainGiftType then   -- 请求 2144沙城争霸实名认证奖励 |  | ||||||
|         Send2144SCZBRealNameGift(pActor) |  | ||||||
|     end |  | ||||||
| end |  | ||||||
|  |  | ||||||
| NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq2144SCZBLogin, OnReq2144SCZBLogin) |  | ||||||
| NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq2144SCZBGift, OnReq2144SCZBGift) |  | ||||||
|  |  | ||||||
| @@ -53,7 +53,6 @@ require("Activity.ActivityType10022")  --玩法:360大玩家特权 | |||||||
| require("Activity.ActivityType10024")  --鲁大师 | require("Activity.ActivityType10024")  --鲁大师 | ||||||
| require("Activity.ActivityType10027")  --ku25  | require("Activity.ActivityType10027")  --ku25  | ||||||
| require("Activity.ActivityType10033")  --区服冠名 | require("Activity.ActivityType10033")  --区服冠名 | ||||||
| require("Activity.ActivityType10034")  --2144平台福利 |  | ||||||
| require("Activity.ActivityType10035")  --快玩平台福利 | require("Activity.ActivityType10035")  --快玩平台福利 | ||||||
| require("Activity.ActivityType10036")  --顺网平台福利 | require("Activity.ActivityType10036")  --顺网平台福利 | ||||||
| require("Activity.ActivityType10037")  --迅玩平台福利 | require("Activity.ActivityType10037")  --迅玩平台福利 | ||||||
|   | |||||||
| @@ -70,7 +70,6 @@ | |||||||
| --#include "data/config/Platformludashi/Ludashimember.config" once --鲁大师 会员 | --#include "data/config/Platformludashi/Ludashimember.config" once --鲁大师 会员 | ||||||
| --#include "data/config/Platformludashi/Ludashivip.config" once --鲁大师 vip | --#include "data/config/Platformludashi/Ludashivip.config" once --鲁大师 vip | ||||||
| --#include "data/config/Platformludashi/Platformludashi.config" once --鲁大师 | --#include "data/config/Platformludashi/Platformludashi.config" once --鲁大师 | ||||||
| --#include "data/config/Platform2144/Platform2144.config" once --2144 |  | ||||||
| --#include "data/config/Platformteeqee/Platformteeqee.config" once --快玩 | --#include "data/config/Platformteeqee/Platformteeqee.config" once --快玩 | ||||||
| --#include "data/config/Platformshunwang/Platformshunwang.config" once --顺网 | --#include "data/config/Platformshunwang/Platformshunwang.config" once --顺网 | ||||||
| --#include "data/config/Platformxunwan/Platformxunwan.config" once --迅玩 | --#include "data/config/Platformxunwan/Platformxunwan.config" once --迅玩 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user