فهرست منبع

Merge branch '360test' of http://43.226.57.217:3000/yishanyou/GongFuServer into 360test

pigflower 1 ماه پیش
والد
کامیت
16bfbb6599

+ 2 - 0
script/common/CommonDB.lua

@@ -45,6 +45,7 @@ KEY_BAN_DATA = "banData"								-- 封禁数据
 KEY_DESKTOP_DATA = "desktopData"					-- 桌面添加数据(账号级)
 KEY_REBATE_DATA = "rebateData"							-- 渠道返利数据
 KEY_ANOTHERWORLDBATTLE_START_TI = "anotherWorldBattleStart" -- 最近一轮异界之战开启时间
+KEY_BIGRPLAYER_SHOW_DATA = "bigRPlayerShowData"				-- 大R玩家实力展示相关数据
 
 db = db or {
 	serverStartTime = nil,								-- 开服时间
@@ -73,6 +74,7 @@ db = db or {
 	commerceActInfo = {},								-- 跨服商业活动信息
 	jjcNewladderInfo = {},								-- 天梯赛信息
 	commerceMiddleActInfo = {},							-- 中心服跨服商业活动信息
+	bigRPlayerShowData = {},
 }
 
 

+ 9 - 4
script/common/CommonDefine.lua

@@ -2,23 +2,28 @@ local Lang = require("common.Lang")
 
 ---------------------------------------------渠道标识--------------------------
 
-CHANNEL_TAG_MUZI = 1             -- 木子/tap
+CHANNEL_TAG_MUZI = 1             -- 木子/tap安卓
 CHANNEL_TAG_SANLI_ANDROID = 2    -- 三狸安卓
 CHANNEL_TAG_SANLI_IOS = 3        -- 三狸iOS
 CHANNEL_TAG_SANLI_QQ = 4         -- 三狸QQ大厅
 CHANNEL_TAG_SANLI_H5= 5          -- 三狸H5
 CHANNEL_TAG_SANLI_H5_4399 = 6    -- 三狸H5-4399
+CHANNEL_TAG_SANLI_360 = 7        -- 三狸360小游戏
+CHANNEL_TAG_SANLI_AIQI_H5 = 8    -- 艾七H5
+CHANNEL_TAG_MUZI_IOS = 9         -- 木子/tap IOS
+CHANNEL_TAG_SANLI_SHIYOU = 10    -- 三狸视游
+
 CHANNEL_TAG_WX = 11              -- 微信小程序,抖音游戏, 圣扬IOS
 CHANNEL_TAG_HP = 14              -- 虎扑
 CHANNEL_TAG_720 = 15             -- 720
 CHANNEL_TAG_MINNIGAME = 17       -- 美团, 华为, 淘宝
-
-
 CHANNEL_TAG_FT = 18             -- 繁体
 
+CHANNEL_TAG_GUILD1 = 23         -- 公会渠道1
+CHANNEL_TAG_GUILD2 = 24         -- 公会渠道2
 
 
-SEA_CHANNEL_ARR = {13, 18}  -- 海外渠道
+SEA_CHANNEL_ARR = {13, 18}  -- 海外渠道列表
 
 ----------------------------------------------------------------------------
 

+ 4 - 0
script/common/ProtoID.lua

@@ -1809,6 +1809,10 @@ _ENV[1849]="CG_BATTLEGIFT_QUERY"
 _ENV[1850]="GC_BATTLEGIFT_QUERY"
 _ENV[1851]="CG_BATTLEGIFT_GET"
 
+-- _ENV[1852]="CG_UNION_CREATE_COND_QUERY" -- 1折版本特有功能
+-- _ENV[1853]="GC_UNION_CREATE_COND_QUERY"
+
+_ENV[1854]="GC_POWERRANK_TOPONE_LOGIN"
 
 _ENV[1896]="CG_ZHUANPAN_SUBSCRIBE_REWARD_QUERY"
 _ENV[1897]="GC_ZHUANPAN_SUBSCRIBE_REWARD_QUERY"

+ 3 - 0
script/core/ObjHuman.lua

@@ -106,6 +106,7 @@ local AnotherWorldBattleNS = require("anotherWorldBattle.AnotherWorldBattleNS")
 local RoleStorageBox = require("roleSystem.RoleStorageBox")
 local BreakThroughTheme = require("battle.BreakThroughTheme")
 local BattleGift = require("battle.BattleGift")
+local BigRPlayerShow = require("broadcast.BigRPlayerShow")
 
 
 local Json = require("common.Json")
@@ -853,6 +854,8 @@ function onLogin(human, isNew)
 		msgRet.param2 = 0
 		Msg.send(msgRet,human.fd)
 	end
+
+	BigRPlayerShow.onLogin(human)
 	
 	-- 注意 这个函数写在doLogin的最后
 	MiddleLogic.onLogin(human)

+ 1 - 1
script/module/battle/EliteDefine.lua

@@ -41,7 +41,7 @@ BATTLEGIFT_FREE_LIMIT = 1000 -- 闯关礼金每日免费可提取额度
 BATTLEGIFT_BUYID_LIST = {93901,93902}  -- 闯关礼金购买项Id列表
 
 BATTLEGIFT_BUYID_2_LIMIT = {  -- 购买项Id与增加的可提取额度映射表
-    [93901] = 1000,
+    [93901] = 3000,
     [93902] = 5000000,
 }
 

+ 101 - 0
script/module/broadcast/BigRPlayerShow.lua

@@ -0,0 +1,101 @@
+-- 大R玩家实力显示
+
+local Msg = require("core.Msg")
+local ObjHuman = require("core.ObjHuman")
+local BillboardLogic = require("billboard.BillboardLogic")
+local BillboardDefine = require("billboard.BillboardDefine")
+local Util = require("common.Util")
+-- local CommonDB = require("common.CommonDB")
+
+-- local pRank1lastBroadcastTime
+
+
+-- local function getBigRPlayerData()
+--     return CommonDB.getValueByKey(CommonDB.KEY_BIGRPLAYER_SHOW_DATA)
+-- end
+
+-- local function updateBigRPlayerData(newData)
+--     CommonDB.updateValue(CommonDB.KEY_BIGRPLAYER_SHOW_DATA, newData)
+-- end
+
+-- local function getpRank1LastBroadcastTime()
+--     local data = getBigRPlayerData()
+--     return data and data.pRank1lastBroadcastTime
+-- end
+
+-- local function updatepRank1LastBroadcastTime()
+--     local data = getBigRPlayerData()
+--     data = data or {}
+--     local now  = os.time()
+--     data.pRank1lastBroadcastTime = now
+--     updateBigRPlayerData(data)
+
+--     -- 更新缓存
+--     pRank1lastBroadcastTime = now
+-- end
+
+local function isShowTips(human)
+    local bl = true
+    if not human.db.showTipsData then
+        return bl
+    end
+
+    if human.db.lv < 10 then
+        return bl
+    end
+
+    local showTipsData = human.db.showTipsData
+    local pRank1LoginShowTime = showTipsData.pRank1LoginShowTime
+    if not pRank1LoginShowTime then
+        return bl
+    end
+
+    if Util.isSameDay(pRank1LoginShowTime) then
+        bl = false
+    end
+
+    return bl
+end
+
+local function updateShowTipsData(human)
+    human.db.showTipsData = human.db.showTipsData or {}
+    human.db.showTipsData.pRank1LoginShowTime = os.time()
+end
+
+
+
+-- 战力排行榜排名第一的玩家上线的处理
+local function powerRankTopOneLogin(human)
+    -- if not pRank1lastBroadcastTime then
+    --     pRank1lastBroadcastTime = getpRank1LastBroadcastTime()
+    -- end
+
+    -- if pRank1lastBroadcastTime and Util.isSameDay(pRank1lastBroadcastTime) then
+    --     return
+    -- end
+
+    local rankList = BillboardLogic.GetRankList(BillboardDefine.TYPE_ZHANDOULI)
+    if not rankList or not rankList[1] or rankList[1].uuid ~= human.db._id then
+        return
+    end
+
+    local msg = Msg.gc.GC_POWERRANK_TOPONE_LOGIN
+    msg.playerName = human.db.name
+
+    for uuid, h in pairs(ObjHuman.onlineUuid) do
+        if uuid ~= human.db._id and isShowTips(h) then
+            Msg.send(msg, h.fd)
+
+            updateShowTipsData(h)
+        end
+    end
+
+    -- updatepRank1LastBroadcastTime()
+end
+
+
+
+
+function onLogin(human)
+    powerRankTopOneLogin(human)
+end

+ 5 - 0
script/module/broadcast/Proto.lua

@@ -3,3 +3,8 @@ GC_BROADCAST = {
 	{"displayTime",		1,	 "int"},
 	{"msg",			1,	 "string"},
 }
+
+
+GC_POWERRANK_TOPONE_LOGIN = {
+	{"playerName",			1,	 "string"},
+}

+ 1 - 1
script/module/combat/BeSkill.lua

@@ -854,7 +854,7 @@ function onHit(attacker,targets,skillID)
 
 
 	local target = targets[1]
-	if target and target.side == defendSide and CombatObj.getValue(attacker,RoleDefine.RATE_COMBAT_NOW) > 0 then
+	if target and target.side == defendSide and CombatObj.getValue(attacker,RoleDefine.HURT_COMBAT_NOW) > 0 then
 		if attacker.beSkillList[BESKILL_TYPE73] then
 			for _,v in ipairs(attacker.beSkillList[BESKILL_TYPE73]) do
 				use(attacker,targets,v)

+ 2 - 2
script/module/combat/Skill.lua

@@ -659,11 +659,11 @@ function CMD.hurt(obj,skillConfig,skillTargets)
 		hp = calcHp(obj,target,calcType,rate,limit)
 		if hp ~= 0 then
 			local d, _, extraHandleTb = CombatObj.updateHp(target,-hp,nil,true, obj.pos,CombatObj.EXTRA_HP_TYPE)
-			if d ~= 0 then
+			-- if d ~= 0 then
 				CombatImpl.setExtraHit(target,-hp,CMD2ID["hurt"])
 				CombatObj.onHpCB(target,d, obj.pos)
 				ret[#ret+1] = target
-			end
+			-- end
 
 			if extraHandleTb then
 				ExtraHandle(target, extraHandleTb)

+ 28 - 8
script/module/role/CreateRole.lua

@@ -42,9 +42,20 @@ local NEW_ROLE_MAIL_ID = 7023
 -- 特定渠道列表
 local TARGET_CHANNEL_ARRAY = {1, 9}
 
-local function sendMail(human)
-	local mailCfg = MailExcel.mail[NEW_ROLE_MAIL_ID]
-    MailManager.add(MailManager.SYSTEM, human.db._id, mailCfg.title, mailCfg.content, nil, mailCfg.senderName or "GM")
+-- 用于公会渠道创角时发送奖励邮件的邮件Id
+local CHANNEL_GUILD_MAIL_ID = 7037
+
+-- 公会渠道创角奖励
+local channel_guild_createRole_rewards = {{102,8888}, {124,20}, {1208,2}, {111,1000000}, {112,1000}, {101,2000000}, {510,4}}
+
+
+local function sendMail(human, mailId, items)
+	local mailCfg = MailExcel.mail[mailId]
+	if not mailCfg then
+		return
+	end
+
+    MailManager.add(MailManager.SYSTEM, human.db._id, mailCfg.title, mailCfg.content, items, mailCfg.senderName or "GM")
 end
 
 
@@ -101,6 +112,19 @@ function creatFakeDb(account, serverTag)
     return db
 end
 
+-- 创角时针对渠道的额外处理
+local function channelHandle(human)
+	-- 特定渠道用户创角时发送的邮件
+	if table.find(TARGET_CHANNEL_ARRAY, human.phpChanelID) then
+		sendMail(human, NEW_ROLE_MAIL_ID)
+	end
+
+	-- 公会渠道创角时发送奖励邮件
+	if human.phpChanelID == CommonDefine.CHANNEL_TAG_GUILD1 or human.phpChanelID == CommonDefine.CHANNEL_TAG_GUILD2 then
+		sendMail(human, CHANNEL_GUILD_MAIL_ID, channel_guild_createRole_rewards)
+	end
+end
+
 
 function createNewRole(human)
 	if _G.is_middle == true then
@@ -141,11 +165,7 @@ function createNewRole(human)
 
 	DataCache.Insert_PlayerUuidList(human.db._id, human.db.lv)
 
-	-- 特定渠道用户创角时发送的邮件
-	if table.find(TARGET_CHANNEL_ARRAY, human.phpChanelID) then
-		sendMail(human)
-	end
-
+	channelHandle(human)
 
 	ReportManager.register(human)
 end

+ 3 - 0
script/module/serverCommerce/ServerCommerceActBattleGroundCS.lua

@@ -497,6 +497,9 @@ function BG_N2C_Act_End(msg)
 
     local fd_2_PlayerList = {}
     local joinList = battleGroundData.joinList
+    if not joinList then
+        return
+    end
 
     local serverIdxMin = MiddleConnect.MiddleConnect_ConfServerID2TrueServerID(warZoneServerIdMin)
     local serverIdxMax = MiddleConnect.MiddleConnect_ConfServerID2TrueServerID(warZoneServerIdMax)

+ 2 - 67
script/module/topup/GiftLogic.lua

@@ -160,7 +160,7 @@ local handler = {
     [PRINCIPAL_LINE_EVNET] = function(human,param)
         for id,cfg in pairs(GiftExcel) do 
             -- 触发新礼包
-            if cfg.trigger == PRINCIPAL_LINE_EVNET and cfg.param[1] == param.id then 
+            if cfg.trigger == PRINCIPAL_LINE_EVNET and cfg.param[1] <= param.id then 
                 genGift(human,id)
             end
         end
@@ -168,7 +168,7 @@ local handler = {
     [EVAL_TOWER_EVENT] = function(human,param)
         for id,cfg in pairs(GiftExcel) do 
             -- 触发新礼包
-            if cfg.trigger == EVAL_TOWER_EVENT and cfg.param[1] == param.id then 
+            if cfg.trigger == EVAL_TOWER_EVENT and cfg.param[1] <= param.id then 
                 genGift(human,id)
             end
         end
@@ -191,71 +191,6 @@ local handler = {
             end
         end
     end,
-
-    -- [GIFT_UPGRADE_LV_EVENT] = function (human,param)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_UPGRADE_LV_EVENT and cfg.param[1] == param.newLv then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
-    -- [GIFT_TALISMAN_UPGRADE_STAR] = function (human,param)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_TALISMAN_UPGRADE_STAR and cfg.param[1] == param.newLv then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
-    -- [GIFT_WINNERRELIC_UPGRADE_STAR] = function (human,param)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_WINNERRELIC_UPGRADE_STAR and cfg.param[1] == param.newLv then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
-    -- [GIFT_ELF_UPGRADE_STAR] = function (human,param)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_ELF_UPGRADE_STAR and cfg.param[1] == param.newLv then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
-
-    -- [GIFT_TALISMAN_OPEN] = function (human)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_TALISMAN_OPEN then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
-    -- [GIFT_WINNERRELIC_OPEN] = function (human)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_WINNERRELIC_OPEN then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
-    -- [GIFT_ELF_OPEN] = function (human)
-    --     for id,cfg in pairs(GiftExcel) do
-    --         -- 触发新礼包
-    --         if cfg.trigger == GIFT_ELF_OPEN then
-    --             genGift(human,id)
-    --         end
-    --     end
-    -- end,
-
 }
 
 local handler2 = {