refactor(LogicServer): 移除 360 平台相关代码

- 删除了 Platform360 和 Platform360sccs 的配置文件
- 移除了 ActivityType10022 和 ActivityType10040 的实现代码
- 更新了 Activitys.txt 和 GameConfigs.txt,移除了与 360 平台相关的引用
This commit is contained in:
2025-02-23 15:23:03 +08:00
parent 9a1675f261
commit b313a1c71a
6 changed files with 0 additions and 602 deletions

View File

@@ -1,9 +0,0 @@
--P-平台福利360.xlsx 大玩家礼包
Platform360Config={
host = "game.api.1360.com",
port = "80",
api = "/authcheck",
SPID = "14",
reward1 = {{type=0,id=421,count=5},{type=0,id=261,count=5},{type=0,id=269,count=5},{type=7,id=7,count=20},{type=2,id=2,count=20000}},
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}},
}

View File

@@ -1,38 +0,0 @@
--P-平台福利360沙城传说.xlsx 大玩家礼包
Platform360sccsConfig={
signreward = {
[1]={{type=0,id=421,count=1}},
[2]={{type=0,id=261,count=1}},
[3]={{type=0,id=269,count=1}},
[4]={{type=0,id=248,count=10}},
[5]={{type=7,id=7,count=10}},
[6]={{type=2,id=2,count=10000}},
[7]={{type=0,id=829,count=1}},
[8]={{type=0,id=421,count=1}},
[9]={{type=0,id=261,count=1}},
[10]={{type=0,id=269,count=1}},
[11]={{type=0,id=248,count=10}},
[12]={{type=7,id=7,count=10}},
[13]={{type=2,id=2,count=10000}},
[14]={{type=0,id=829,count=1}},
[15]={{type=0,id=421,count=1}},
[16]={{type=0,id=261,count=1}},
[17]={{type=0,id=269,count=1}},
[18]={{type=0,id=248,count=10}},
[19]={{type=7,id=7,count=10}},
[20]={{type=2,id=2,count=10000}},
[21]={{type=0,id=829,count=1}},
[22]={{type=0,id=421,count=1}},
[23]={{type=0,id=261,count=1}},
[24]={{type=0,id=269,count=1}},
[25]={{type=0,id=248,count=10}},
[26]={{type=7,id=7,count=10}},
[27]={{type=2,id=2,count=10000}},
[28]={{type=0,id=829,count=1}},
[29]={{type=0,id=421,count=1}},
[30]={{type=0,id=261,count=1}},
[31]={{type=0,id=269,count=1}},
},
BigPlayer = {{type=0,id=421,count=5},{type=0,id=261,count=5},{type=0,id=269,count=5},{type=7,id=7,count=20},{type=2,id=2,count=20000}},
SPID = "56",
}

View File

@@ -1,335 +0,0 @@
module("ActivityType10022", package.seeall)
--[[
个人活动玩法360大玩家特权
个人数据userData
{
ReqMainGiftType = 0(默认值) or 1 服务器使用
ReqSubGiftType1 = 0(默认值) or 1 服务器使用
privilegeGift = 0 or 1 是否领取 360大玩家特权
Fcm = 0 ~ 2 防沉迷 0:未填写身份证1成年2未成年
FcmGiftFlag = 0 or 1 防沉迷 礼包领取标志
}
]]--
--活动类型
ActivityType = 10022
--对应的活动配置
ActivityConfig = Platform360Config
local PfId = System.getPfId()
local HttpStatus = {
Success = "0", -- 成功
ArgError = "-4", -- param gkey error
SignError = "-2", -- sign error
}
Host = ActivityConfig.host or "game.api.1360.com"
Api = ActivityConfig.api or "/authcheck"
Port = ActivityConfig.port or "80"
function GetUserData(pActor)
print("[Tip] ActivityType10022 GetUserData")
local var = Actor.getStaticVar(pActor)
if var.userData== nil then
var.userData = {}
end
return var.userData
end
--------------------------------------------------------------------
-- CPP回调
--------------------------------------------------------------------
-- 360玩家登录
function On360Login(pActor)
print("[Tip] ActivityType10022 On360Login")
-- 平台验证
if not PfId then
print("[Tip] ActivityType10022 On360Login not PfId")
return
end
if not ActivityConfig then
print("[Tip] ActivityType10022 On360Login not ActivityConfig")
return
end
if not ActivityConfig.SPID then
print("[Tip] ActivityType10022 On360Login not ActivityConfig.SPID")
return
end
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
print("[Tip] [Platform360] [非本平台活动]")
return --非本平台活动
end
local userData = GetUserData(pActor)
if userData.ReqMainGiftType == nil then
userData.ReqMainGiftType = 0
end
if userData.ReqSubGiftType1 == nil then
userData.ReqSubGiftType1 = 0
end
if userData.privilegeGift == nil then
userData.privilegeGift = 0
end
if userData.Fcm == nil then
userData.Fcm = 0
end
if userData.FcmGiftFlag == nil then
userData.FcmGiftFlag = 0
end
local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, sSend360UserPrivilegeData)
if npack then
--print("[Tip] ActivityType10022 On360Login sSend360UserPrivilegeData ")
DataPack.writeByte(npack, (userData.privilegeGift or 0)) -- 是否领取 360大玩家特权 礼包 0否1是
DataPack.writeByte(npack, (userData.Fcm or 0)) -- 防沉迷 0:未填写身份证1成年2未成年
DataPack.writeByte(npack, (userData.FcmGiftFlag or 0)) -- 防沉迷 礼包领取标志
DataPack.flush(npack)
end
end
--------------------------------------------------------------------
-- 客户端请求协议回调
--------------------------------------------------------------------
-- 请求 360大玩家特权 礼包
function OnReq360PrivilegeGift(pActor)
print("[Tip] ActivityType10022 OnReq360PrivilegeGift")
-- 平台验证
if not PfId then
print("[Tip] ActivityType10022 OnReq360PrivilegeGift not PfId")
return
end
if not ActivityConfig then
print("[Tip] ActivityType10022 OnReq360PrivilegeGift not ActivityConfig")
return
end
if not ActivityConfig.SPID then
print("[Tip] ActivityType10022 OnReq360PrivilegeGift not ActivityConfig.SPID")
return
end
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
print("[Tip] [Platform360] [非本平台活动]")
return --非本平台活动
end
local userData = GetUserData(pActor)
if userData.privilegeGift == 1 then
print("[Tip] ActivityType10022 OnReq360PrivilegeGift userData.privilegeGift == 1 ")
return
end
if not ActivityConfig.reward1 then
print("[Tip] ActivityType10022 OnReq360PrivilegeGift not ActivityConfig.reward1 ")
return
end
--检测格子 16 : 活动通用
if CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) ~= true then
print("[Tip] ActivityType10022 OnReq360PrivilegeGift CheckBagIsEnough ")
return
end
local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, sSend360UserPrivilegeData)
if npack then
userData.privilegeGift = 1
DataPack.writeByte(npack, (userData.privilegeGift or 1)) -- 是否领取 360大玩家特权 礼包 0否1是
DataPack.writeByte(npack, (userData.Fcm or 0)) -- 防沉迷 0:未填写身份证1成年2未成年
DataPack.writeByte(npack, (userData.FcmGiftFlag or 0)) -- 防沉迷 礼包领取标志
DataPack.flush(npack)
local awards = ActivityConfig.reward1
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
CommonFunc.Awards.Give(pActor, awards, GameLog.Log_ActivityType10022)
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:领取成功|", tstUI)
print("[Tip] ActivityType10022 OnReq360PrivilegeGift Success ")
end
end
-- 请求奖励
function OnReq360Gift(pActor, packet)
print("[Tip] ActivityType10022 OnReq360Gift")
-- 平台验证
if not PfId then
print("[Tip] ActivityType10022 OnReq360Gift not PfId")
return
end
if not ActivityConfig then
print("[Tip] ActivityType10022 OnReq360Gift not ActivityConfig")
return
end
if not ActivityConfig.SPID then
print("[Tip] ActivityType10022 OnReq360Gift not ActivityConfig.SPID")
return
end
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
print("[Tip] [Platform360] [非本平台活动]")
return --非本平台活动
end
local userData = GetUserData(pActor)
userData.ReqMainGiftType = DataPack.readByte(packet)
userData.ReqSubGiftType1 = DataPack.readByte(packet)
if not userData.ReqMainGiftType then
print("[Tip] ActivityType10022 OnReq360Gift not userData.ReqMainGiftType")
return
end
if not userData.ReqSubGiftType1 then
print("[Tip] ActivityType10022 OnReq360Gift not userData.ReqSubGiftType1")
return
end
if 1 == userData.ReqMainGiftType then
if 1 == userData.ReqSubGiftType1 then
Req360UserInfo(pActor)
end
end
end
-- 发送 防沉迷奖励
function SendFcmGift(pActor)
print("[Tip] ActivityType10022 SendFcmGift")
local userData = GetUserData(pActor)
userData.ReqMainGiftType = 0
userData.ReqSubGiftType1 = 0
if not userData.Fcm or userData.Fcm == 0 then
print("[Tip] ActivityType10022 SendFcmGift not Fcm certification")
return
end
if 1 == userData.FcmGiftFlag then
print("[Tip] ActivityType10022 SendFcmGift already get FcmGift")
return
end
if not ActivityConfig or not ActivityConfig.authentication then
print("[Tip] ActivityType10022 SendFcmGift not ActivityConfig or not ActivityConfig.authentication")
return
end
--检测格子 16 : 活动通用
if true ~= CommonFunc.Awards.CheckBagIsEnough(pActor,16,tmDefNoBagNum,tstUI) then
print("[Tip] ActivityType10022 SendFcmGift CheckBagIsEnough ")
return
end
local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, sSend360UserPrivilegeData)
if npack then
userData.FcmGiftFlag = 1
DataPack.writeByte(npack, (userData.privilegeGift or 0)) -- 是否领取 360大玩家特权 礼包 0否1是
DataPack.writeByte(npack, (userData.Fcm or 0)) -- 防沉迷 0:未填写身份证1成年2未成年
DataPack.writeByte(npack, (userData.FcmGiftFlag or 1)) -- 是否领取 360大玩家特权 礼包 0否1是
DataPack.flush(npack)
Actor.SendActivityLog(pActor,ActivityType,ActivityType,1)
CommonFunc.Awards.Give(pActor, ActivityConfig.authentication, GameLog.Log_ActivityType10022)
Actor.SendActivityLog(pActor,ActivityType,ActivityType,2)
Actor.sendTipmsg(pActor, "|C:0xf56f00&T:领取成功|", tstUI)
print("[Tip] ActivityType10022 SendFcmGift Success ")
end
end
NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq360UserPrivilegeGift, OnReq360PrivilegeGift)
NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq360Gift, OnReq360Gift)
--------------------------------------------------------------------
-- 请求平台玩家数据信息
--------------------------------------------------------------------
-- 设置 360用户数据
function Set360UserData(paramPack,content,result)
print("[Tip] ActivityType10022 Set360UserData content : "..content)
print("[Tip] ActivityType10022 Set360UserData result : "..result)
local nActorId = paramPack[1]
local pActor = Actor.getActorById(nActorId)
if not pActor then
print("[Tip] ActivityType10022 Set360UserData [" .. nActorId .. "] 已离线")
return
end
print("[Tip] ActivityType10022 Set360UserData [" .. Actor.getName(pActor) .. "] content:"..content)
print("[Tip] ActivityType10022 Set360UserData result:"..result)
if 0 == result then
local status = string.match(content,"\"errno\":(%d+)")
if (HttpStatus.Success == status) then
local strFcm = string.match(content,"\"status\":(%d+)")
local nFcm = 0
if "null" ~= strFcm then
nFcm = tonumber(strFcm)
end
local userData = GetUserData(pActor)
userData.Fcm = nFcm
if 1 == userData.ReqMainGiftType then
if 1 == userData.ReqSubGiftType1 then
SendFcmGift(pActor)
end
end
end
end
end
-- 请求 360用户信息
function Req360UserInfo(pActor)
print("[Tip] ActivityType10022 Req360UserInfo")
local nActorId = Actor.getActorId(pActor)
local gkey = "sbcq"
local qid = Actor.getAccount(pActor)
local time = os.time()
local key = "uyTs8udOvowF3KAMsPbe3f1Kvfsyww1L"
local sign = System.MD5(gkey..qid..time..key)
local req = Api..'?&qid='..qid..'&gkey='..gkey..'&time='..time..'&sign='..sign
print("[Tip] ActivityType10022 Req360UserInfo [" .. Actor.getName(pActor) .. "] : ".. Host)
print("[Tip] ActivityType10022 Req360UserInfo [" .. Actor.getName(pActor) .. "] : ".. Port)
print("[Tip] ActivityType10022 Req360UserInfo [" .. Actor.getName(pActor) .. "] : ".. req)
AsyncWorkDispatcher.Add(
{'GetHttpContent',Host,Port,req},
Set360UserData,
{nActorId}
)
end

View File

@@ -1,218 +0,0 @@
module("ActivityType10040", package.seeall)
--[[
360沙城争霸 平台福利
个人数据userData
{
ReqMainGiftType = 0(默认值) ~ 2 请求奖励类型 服务器使用
ReqSubGiftType1 = 0(默认值) ~ 2 请求奖励子类型 服务器使用
LoginType = 0~3 0网页登录1微端登录2手机登录3360游戏大厅登录
LastSignMonthOfYear = 1~12 上一次签到月份
bigPlayerGiftFlag = 0 or 1 大玩家礼包领取标志
monthSingGiftFlag 月份签到领取标志
}
]]--
--对应的活动配置
ActivityConfig = Platform360sccsConfig
-- 平台Id
local PfId = System.getPfId()
-- 360沙城争霸 获取玩家数据
function Get360SCZBUserData(pActor)
local var = Actor.getStaticVar(pActor)
if nil == var.UserData360SCZB then
var.UserData360SCZB = {}
end
return var.UserData360SCZB
end
-- 360沙城争霸 发送玩家数据
function Send360SCZBUserData(pActor)
--print("ActivityType10040.lua Send360SCZBUserData 玩家 : "..Actor.getName(pActor))
local npack = DataPack.allocPacket(pActor, enPlatforMwelfareID, cSend360SCZBUserData)
if npack then
local userData = Get360SCZBUserData(pActor)
DataPack.writeByte(npack, userData.bigPlayerGiftFlag)
DataPack.writeUInt(npack, userData.monthSingGiftFlag)
DataPack.flush(npack)
end
end
-- 360沙城争霸 发送大玩家奖励
function Send360SCZBBigPlayerGift(pActor)
print("ActivityType10040.lua Send360SCZBBigPlayerGift 玩家 : "..Actor.getName(pActor))
if not ActivityConfig or not ActivityConfig.BigPlayer then
print("ActivityType10040.lua Send360SCZBBigPlayerGift not ActivityConfig or not ActivityConfig.BigPlayer")
return
end
local userData = Get360SCZBUserData(pActor)
if 1 == userData.bigPlayerGiftFlag then
print("ActivityType10040.lua Send360SCZBBigPlayerGift 玩家 : "..Actor.getName(pActor).." already get BigPlayerGift")
return
end
--检测格子 16 : 活动通用
if CommonFunc.Awards.CheckBagIsEnough(pActor, 16, tmDefNoBagNum, tstUI) ~= true then
print("ActivityType10040.lua Send360SCZBBigPlayerGift not CheckBagIsEnough")
return
end
CommonFunc.Awards.Give(pActor, ActivityConfig.BigPlayer, GameLog.Log_Activity10040)
-- 设置标志位
userData.bigPlayerGiftFlag = 1
Send360SCZBUserData(pActor)
end
-- 360沙城争霸 发送签到奖励
function Send360SCZBSignGift(pActor)
print("ActivityType10040.lua Send360SCZBSignGift 玩家 : "..Actor.getName(pActor))
local userData = Get360SCZBUserData(pActor)
-- 跨月份,清空月份签到领取标志
if System.getMonthOfNow() ~= userData.LastSignMonthOfYear then
userData.LastSignMonthOfYear = 0
userData.monthSingGiftFlag = 0
end
local nDayofMonth = System.getDayOfMonth()
if not ActivityConfig or not ActivityConfig.signreward or not ActivityConfig.signreward[nDayofMonth] then
print("ActivityType10040.lua Send360SCZBSignGift not ActivityConfig or not ActivityConfig.BigPlayer")
return
end
local userData = Get360SCZBUserData(pActor)
if 1 ~= userData.LoginType and 3 ~= userData.LoginType then -- 1微端登录3:360大厅登录
print("ActivityType10040.lua Send360SCZBSignGift 1 ~= userData.LoginType and 3 ~= userData.LoginType 玩家 : "..Actor.getName(pActor).." userData.LoginType : "..userData.LoginType)
return
end
if 1 == System.getIntBit(userData.monthSingGiftFlag, nDayofMonth) then
print("ActivityType10040.lua Send360SCZBSignGift 玩家 : "..Actor.getName(pActor).." already get SignGift nDayofMonth : "..nDayofMonth)
return
end
--检测格子 16 : 活动通用
if CommonFunc.Awards.CheckBagIsEnough(pActor, 16, tmDefNoBagNum, tstUI) ~= true then
print("ActivityType10040.lua Send360SCZBSignGift not CheckBagIsEnough")
return
end
CommonFunc.Awards.Give(pActor, ActivityConfig.signreward[nDayofMonth], GameLog.Log_Activity10040)
-- 设置标志位
userData.monthSingGiftFlag = System.setIntBit(userData.monthSingGiftFlag, nDayofMonth, 1)
userData.LastSignMonthOfYear = System.getMonthOfNow()
Send360SCZBUserData(pActor)
end
-- 360沙城争霸 玩家登录
function OnReq360SCZBLogin(pActor, packet)
-- print("ActivityType10040.lua OnReq360SCZBLogin 玩家 : "..Actor.getName(pActor))
-- 平台验证
if not PfId then
print("ActivityType10040.lua OnReq360SCZBLogin not PfId")
return
end
if not ActivityConfig or not ActivityConfig.SPID then
print("ActivityType10040.lua OnReq360SCZBLogin not ActivityConfig or not ActivityConfig.SPID")
return
end
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
print("ActivityType10040.lua OnReq360SCZBLogin tostring(PfId) ~= tostring(ActivityConfig.SPID) SPID : "..PfId)
return
end
local userData = Get360SCZBUserData(pActor)
userData.LoginType = DataPack.readByte(packet)
if nil == userData.LoginType or userData.LoginType < 0 or userData.LoginType > 3 then
print("ActivityType10040.lua OnReq360SCZBLogin nil == userData.LoginType or userData.LoginType < 0 or userData.LoginType > 3 玩家 : "..Actor.getName(pActor))
print(userData.LoginType)
return
end
if nil == userData.ReqMainGiftType then
userData.ReqMainGiftType = 0
end
if nil == userData.LastSignMonthOfYear then
userData.LastSignMonthOfYear = 0
end
if nil == userData.bigPlayerGiftFlag then
userData.bigPlayerGiftFlag = 0
end
if nil == userData.monthSingGiftFlag then
userData.monthSingGiftFlag = 0
end
Send360SCZBUserData(pActor)
end
-- 360沙城争霸 玩家请求平台福利
function OnReq360SCZBGift(pActor, packet)
print("ActivityType10040.lua OnReq360SCZBGift 玩家 : "..Actor.getName(pActor))
-- 平台验证
if not PfId then
print("ActivityType10040.lua OnReq360SCZBGift not PfId")
return
end
if not ActivityConfig or not ActivityConfig.SPID then
print("ActivityType10040.lua OnReq360SCZBGift not ActivityConfig or not ActivityConfig.SPID")
return
end
if tostring(PfId) ~= tostring(ActivityConfig.SPID) then
print("ActivityType10040.lua OnReq360SCZBGift tostring(PfId) ~= tostring(ActivityConfig.SPID) SPID : "..PfId)
return
end
local userData = Get360SCZBUserData(pActor)
userData.ReqMainGiftType = DataPack.readByte(packet)
if not userData.ReqMainGiftType then
print("ActivityType10040.lua OnReq360SCZBGift not userData.ReqMainGiftType 玩家 : "..Actor.getName(pActor))
return
end
if 1 == userData.ReqMainGiftType then -- 请求 360沙城争霸大玩家奖励
Send360SCZBBigPlayerGift(pActor)
elseif 2 == userData.ReqMainGiftType then -- 请求 360沙城争霸签到奖励
Send360SCZBSignGift(pActor)
end
end
NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq360SCZBLogin, OnReq360SCZBLogin)
NetmsgDispatcher.Reg(enPlatforMwelfareID, cReq360SCZBGift, OnReq360SCZBGift)
-- 跨天处理
function OnNewDayArrive(pActor, ndiffday)
print("ActivityType10040.lua OnNewDayArrive 玩家 : "..Actor.getName(pActor))
-- 跨月份,清空月份签到领取标志
local userData = Get360SCZBUserData(pActor)
if nil == userData.LastSignMonthOfYear then
return
end
if System.getMonthOfNow() ~= userData.LastSignMonthOfYear then
userData.LastSignMonthOfYear = 0
userData.monthSingGiftFlag = 0
Send360SCZBUserData(pActor)
end
end
ActorEventDispatcher.Reg(aeNewDayArrive, OnNewDayArrive, "ActivityType10040.lua")

View File

@@ -49,7 +49,6 @@ require("Activity.ActivityOnlineMin") --
require("Activity.ActivityType10020") --
require("Activity.ActivityType10021") --个人活动:二充
require("Activity.ActivityType10022") --玩法360大玩家特权
require("Activity.ActivityType10024") --鲁大师
require("Activity.ActivityType10033") --区服冠名
require("Activity.ActivityType10038") --神秘福袋

View File

@@ -66,7 +66,6 @@
--#include "data/config/OnlineTime/OnlineTimeconst.config" once --在线
--平台活动
--#include "data/config/Platform360/Platform360.config" once --360大玩家特权
--#include "data/config/Platformludashi/Ludashimember.config" once --鲁大师 会员
--#include "data/config/Platformludashi/Ludashivip.config" once --鲁大师 vip
--#include "data/config/Platformludashi/Platformludashi.config" once --鲁大师