Kaynağa Gözat

同步360test分支修改

gitxsm 3 ay önce
ebeveyn
işleme
480ff35898

+ 5 - 0
script/common/ProtoID.lua

@@ -1793,3 +1793,8 @@ _ENV[1896]="CG_ZHUANPAN_SUBSCRIBE_REWARD_QUERY"
 _ENV[1897]="GC_ZHUANPAN_SUBSCRIBE_REWARD_QUERY"
 _ENV[1898]="CG_ZHUANPAN_SUBSCRIBE_REWARD_GET"
 
+_ENV[1899]="CG_ZHUANPAN_TB_ADD_DESKTOP"
+_ENV[1900]="CG_ZHUANPAN_TB_QUERY"
+_ENV[1891]="GC_ZHUANPAN_TB_QUERY"
+_ENV[1892]="CG_ZHUANPAN_TB_REWARD_GET"
+

+ 84 - 10
script/module/battle/BattleLogic.lua

@@ -456,7 +456,7 @@ local function resetTeamRecord(human)
 end
 
 
--- 当前应该是第几支队伍出战。 目前闯关最多有三支队伍
+-- 当前应该是第几支队伍出战(目前闯关最多有三支队伍)
 local function getTeamIdx(human)
     local teamIdx = 1
 
@@ -480,6 +480,8 @@ local function getCombatTypeByTeamIdx(teamIdx)
         return CombatDefine.COMBAT_TYPE1
     elseif teamIdx == 2 then
         return CombatDefine.COMBAT_TYPE30
+    elseif teamIdx == 3 then
+        return CombatDefine.COMBAT_TYPE38
     else
         -- assert(false, "错误类型")
 
@@ -2195,16 +2197,74 @@ function battleWorldMapQuery(human)
     
     local tBattleLevelPlayerList = BATTLE_LEVEL_PLAYER_LIST[nBattleType]
 
-    for i = 1, len do
-        local v = worldMapConfig[i]
-        msgRet.worldMap[i].mapID = i
+    -- for i = 1, len do
+    --     local v = worldMapConfig[i]
+    --     msgRet.worldMap[i].mapID = i
+    --     msgRet.worldMap[i].mapName = v.name or ""
+    --     msgRet.worldMap[i].mapBuild = v.build or 0
+    --     msgRet.worldMap[i].mapBg = v.bg or 0
+    --     msgRet.worldMap[i].mapPos[0] = 2
+    --     msgRet.worldMap[i].mapPos[1] = v.pos[1]
+    --     msgRet.worldMap[i].mapPos[2] = v.pos[2]
+    --     msgRet.worldMap[i].status =(battleNodeConfig.mapID >= i) and 1 or 0
+    --     msgRet.worldMap[i].story = v.des or ""
+    --     if battleNodeConfig.mapID == i then
+    --         msgRet.worldMap[i].maxLevel = battleNodeConfig.maxLevel
+    --         msgRet.worldMap[i].curLevel = battleNodeConfig.curLevel
+    --     else
+    --         msgRet.worldMap[i].maxLevel = 0
+    --         msgRet.worldMap[i].curLevel = 0
+    --     end
+
+    --     local reward = v.reward
+    --     local l = 0
+    --     msgRet.worldMap[i].chapterReward[0] = #reward
+    --     for _, rewardData in pairs(reward) do
+    --         l = l + 1
+    --         Grid.makeItem(msgRet.worldMap[i].chapterReward[l], rewardData[1], rewardData[2])
+    --     end
+
+    --     msgRet.worldMap[i].chapterDot = 0
+    --     if isChapterDot(human, i) then
+    --         msgRet.worldMap[i].chapterDot = 1
+    --     end
+
+    --     local cnt = 0
+    --     -- BATTLE_LEVEL_PLAYER_LIST[i] = BATTLE_LEVEL_PLAYER_LIST[i] or { }
+    --     tBattleLevelPlayerList[i] = tBattleLevelPlayerList[i] or { }
+    --     -- for s, t in pairs(BATTLE_LEVEL_PLAYER_LIST[i]) do
+    --     for s, t in pairs(tBattleLevelPlayerList[i]) do
+    --         cnt = cnt + 1
+    --         RoleLogic.makeRoleBase(t, msgRet.worldMap[i].roleList[cnt])
+    --         if cnt >= 3 then
+    --             break
+    --         end
+    --     end
+    --     msgRet.worldMap[i].roleList[0] = cnt
+    -- end
+
+    -- msgRet.worldMap[0] = len
+
+
+    msgRet.worldMap[0] = 0
+    msgRet.isStart = 1
+    msgRet.isEnd = 0
+
+    local i = 0
+    local msgOneceMaxLen = 20
+
+    for k, v in ipairs(worldMapConfig) do
+        i = i + 1
+        msgRet.worldMap[0] = i
+
+        msgRet.worldMap[i].mapID = k
         msgRet.worldMap[i].mapName = v.name or ""
         msgRet.worldMap[i].mapBuild = v.build or 0
         msgRet.worldMap[i].mapBg = v.bg or 0
         msgRet.worldMap[i].mapPos[0] = 2
         msgRet.worldMap[i].mapPos[1] = v.pos[1]
         msgRet.worldMap[i].mapPos[2] = v.pos[2]
-        msgRet.worldMap[i].status =(battleNodeConfig.mapID >= i) and 1 or 0
+        msgRet.worldMap[i].status =(battleNodeConfig.mapID >= k) and 1 or 0
         msgRet.worldMap[i].story = v.des or ""
         if battleNodeConfig.mapID == i then
             msgRet.worldMap[i].maxLevel = battleNodeConfig.maxLevel
@@ -2223,15 +2283,15 @@ function battleWorldMapQuery(human)
         end
 
         msgRet.worldMap[i].chapterDot = 0
-        if isChapterDot(human, i) then
+        if isChapterDot(human, k) then
             msgRet.worldMap[i].chapterDot = 1
         end
 
         local cnt = 0
         -- BATTLE_LEVEL_PLAYER_LIST[i] = BATTLE_LEVEL_PLAYER_LIST[i] or { }
-        tBattleLevelPlayerList[i] = tBattleLevelPlayerList[i] or { }
+        tBattleLevelPlayerList[k] = tBattleLevelPlayerList[k] or { }
         -- for s, t in pairs(BATTLE_LEVEL_PLAYER_LIST[i]) do
-        for s, t in pairs(tBattleLevelPlayerList[i]) do
+        for s, t in pairs(tBattleLevelPlayerList[k]) do
             cnt = cnt + 1
             RoleLogic.makeRoleBase(t, msgRet.worldMap[i].roleList[cnt])
             if cnt >= 3 then
@@ -2239,10 +2299,24 @@ function battleWorldMapQuery(human)
             end
         end
         msgRet.worldMap[i].roleList[0] = cnt
+
+        if i >= msgOneceMaxLen then
+            len = len - i
+            if len <= 0 then
+                msgRet.isEnd = 1
+                return Msg.send(msgRet, human.fd)
+            end
+
+            Msg.send(msgRet, human.fd)
+            i = 0
+            msgRet.isStart = 0
+        end
     end
 
-    msgRet.worldMap[0] = len
-    Msg.send(msgRet, human.fd)
+    if i > 0 then
+        msgRet.isEnd = 1
+        Msg.send(msgRet, human.fd)
+    end
 end
 
 function battleNodeQuery(human, mapID)

+ 3 - 1
script/module/battle/Proto.lua

@@ -109,7 +109,9 @@ CG_BATTLE_WORLD_MAP_QUERY = {
 }
 
 GC_BATTLE_WORLD_MAP_QUERY = {
-    {"worldMap",100,BattleWorldMap},           -- 世界地图
+    {"worldMap",20,BattleWorldMap},           -- 世界地图
+	{"isStart",	1,	    "byte"},	           -- 是否是第一段数据,0-否,1-是
+	{"isEnd",	1,	    "byte"},	           -- 是否是最后一段数据,0-否,1-是
 }
 
 -- 当前关卡玩家查询

+ 80 - 0
script/module/combat/CombatBuff.lua

@@ -394,6 +394,42 @@ function getBuffer(obj)
 	return obj.buffer
 end
 
+-- 计算偷取的属性
+local function calcStealAttr(buffer, conf)
+	local attrList = {}
+	if type(buffer.arg) == "table" then
+		for j = 1,#buffer.arg do
+			local attrData = buffer.arg[j]
+			local key = attrData[1]
+			local value = 0
+			if not conf.attrRate then
+				value = attrData[2]
+			else
+				value = conf.attrRate
+			end
+			-- RoleAttr.updateValue(key,value,bufferAttr,true)
+			attrList[key] = (attrList[key] or 0) + value
+		end
+	else
+		for j = 1,#conf.args do
+			local attrData = conf.args[j]
+			local key = attrData[1]
+			local value = 0
+			if not conf.attrRate then
+				value = attrData[2] 
+			else
+				value = conf.attrRate
+			end
+			-- RoleAttr.updateValue(key,buffer.arg or (value * buffer.cnt),bufferAttr,true)
+			attrList[key] = (attrList[key] or 0) + (buffer.arg or (value * buffer.cnt))
+		end
+	end
+
+	return attrList
+end
+
+
+
 function onBufferChange(obj)
 	local bufferAttr = obj.bufferAttr
 	RoleAttr.initCombatAttr(bufferAttr)
@@ -499,9 +535,13 @@ function onBufferChange(obj)
 				end	
 			end
 		end
+
 		bufferCmd[conf.cmd] = bufferCmd[conf.cmd] or {}
 		bufferCmd[conf.cmd][#bufferCmd[conf.cmd] + 1] = i
 	end
+
+
+
 	CombatObj.calcAttr(obj)
 	for pos in pairs(changeList) do
 		CombatObj.calcAttr(CombatImpl.objList[pos])
@@ -850,6 +890,26 @@ function reviceObj(attackPos, obj, bufferID, skillID)
 	return 0
 end
 
+-- 英雄被偷取属性,并转移到施法者身上
+local function stealAttrHandle(buffer)
+	local conf = GetBuffConfig(buffer.id)
+	if conf.cmd == "stealattr" then
+		local attacker = buffer.attackPos and CombatImpl.objList[buffer.attackPos]
+		if attacker then
+			local noInitAttr = attacker.noInitAttr
+			local attrList = calcStealAttr(buffer, conf)
+
+			for attrId, attrVal in pairs(attrList) do
+				RoleAttr.updateValue(attrId, -attrVal, noInitAttr, true)
+			end
+
+			CombatObj.calcAttr(attacker)
+		end
+	end
+end
+
+
+
 
 function addBuffer(attackPos,obj, id, skillID,arg,parentConf)
 	-- local conf = BufferExcel.buffer[id]
@@ -1013,6 +1073,8 @@ function addBuffer(attackPos,obj, id, skillID,arg,parentConf)
 
 	onBufferChange(obj)
 
+	stealAttrHandle(buffer)
+
 	if conf.isAddCmd == 1 and handler[conf.cmd] then
 		handler[conf.cmd](obj,buffer,conf)
 		HANDLER_ONCE[conf.cmd] = nil
@@ -1064,6 +1126,19 @@ local function beforeDelBuffer(obj, buffer)
           CombatObj.onHpCB(obj, d, obj.pos)
        end
     end
+
+	-- 施法者给英雄上了偷取属性的buff, 英雄的buff被删除时, 也需要将施法者偷取的属性重置
+	if conf.cmd == "stealattr" then
+		local attacker = buffer.attackPos and CombatImpl.objList[buffer.attackPos]
+		if attacker then
+			local noInitAttr = attacker.noInitAttr
+			local attrList = calcStealAttr(buffer, conf)
+			for attrId, attrVal in pairs(attrList) do
+				RoleAttr.updateValue(attrId, attrVal, noInitAttr, true)
+			end
+			CombatObj.calcAttr(attacker)
+		end
+	end
 end
 
 function delBuffer(obj, ind)
@@ -1527,6 +1602,11 @@ function onUseBeSkill(attacker,skillConfig,objs,cmdTargets, arg, arg2)--attacker
 						end
 					end
 
+					if bufferConf.cmd == "stealattr" then
+                        local value = CombatCalc.calcValue(attacker, target, bufferConf.args[1], bufferConf.args[2])
+                        bufferArg1 = { { bufferConf.args[3], value } }
+                    end
+
 					if bufferConf.cmd == "shaqi" or bufferConf.cmd == "shuihua" then
 						for k=1, addBuffTimes do
 							addBuffer(attackPos,target, bufferID,skillConfig.id,bufferArg1 or bufferArg)

+ 10 - 7
script/module/combat/CombatDefine.lua

@@ -210,21 +210,24 @@ COMBAT_TYPE34 = 34 --节日活动BOSS
 COMBAT_TYPE35 = 35 --异界之战进攻
 COMBAT_TYPE36 = 36 --异界之战防守
 COMBAT_TYPE37 = 37 -- 巅峰战场
+COMBAT_TYPE38 = 38 -- 主线闯关三队
 
 
 
 -- 如果新加阵容的 teamType 和 COMBAT_TYPE1的 teamType 一样, 则需要在下方增加
 -- 一个英雄不能同时上阵的阵容列表, 即一个英雄在key代表阵容上阵后,就不能同时在value列表中的战斗阵容里上阵
 COMBAT_EXCLUSION_LIST = {
-    [COMBAT_TYPE1] = {COMBAT_TYPE30},
-    [COMBAT_TYPE30] = {COMBAT_TYPE1, COMBAT_TYPE2, COMBAT_TYPE5, COMBAT_TYPE7, COMBAT_TYPE12, COMBAT_TYPE15},
-    [COMBAT_TYPE2] = {COMBAT_TYPE30},
+    [COMBAT_TYPE1] = {COMBAT_TYPE30, COMBAT_TYPE38},
+    [COMBAT_TYPE30] = {COMBAT_TYPE1, COMBAT_TYPE2, COMBAT_TYPE5, COMBAT_TYPE7, COMBAT_TYPE12, COMBAT_TYPE15, COMBAT_TYPE38},
+    [COMBAT_TYPE2] = {COMBAT_TYPE30, COMBAT_TYPE38},
 
-    [COMBAT_TYPE5] = {COMBAT_TYPE30},
-    [COMBAT_TYPE7] = {COMBAT_TYPE30},
-    [COMBAT_TYPE12] = {COMBAT_TYPE30},
+    [COMBAT_TYPE5] = {COMBAT_TYPE30, COMBAT_TYPE38},
+    [COMBAT_TYPE7] = {COMBAT_TYPE30, COMBAT_TYPE38},
+    [COMBAT_TYPE12] = {COMBAT_TYPE30, COMBAT_TYPE38},
 
-    [COMBAT_TYPE15] = {COMBAT_TYPE30},
+    [COMBAT_TYPE15] = {COMBAT_TYPE30, COMBAT_TYPE38},
+
+    [COMBAT_TYPE38] = {COMBAT_TYPE1, COMBAT_TYPE2, COMBAT_TYPE5, COMBAT_TYPE7, COMBAT_TYPE12, COMBAT_TYPE15, COMBAT_TYPE30},
 }
 
 

+ 23 - 8
script/module/combat/CombatObj.lua

@@ -65,6 +65,7 @@ function initAfterStart()
 		obj.bufferAttr		= bufferAttr
 		obj.bufferAttr2		= bufferAttr2
 		obj.relicAttr 		= relicAttr
+		obj.noInitAttr = {}	-- 战斗过程中临时修改的且不需要每次都重置的属性列表
 		obj.buffer = {[0] = 0}  -- obj身上的buff集合,buff[0]表示buff数量
 		obj.bufferCmd = {}		--控制类buffer
 		obj.skillList		= nil
@@ -192,6 +193,7 @@ function init(obj)
 		ProAttr = {},					-- 百分比属性
 		bSpecialDef = nil,				-- 防御为0特殊标识
 	}
+	obj.noInitAttr = {}
 end
 
 --辅助对象相关
@@ -315,6 +317,10 @@ function calcAttr(obj)
 		attr[key] = (attr[key] or 0) + val
 	end
 
+	for key ,val in pairs(obj.noInitAttr) do
+		attr[key] = (attr[key] or 0) + val
+	end
+
 	calcFinalAttr(attr)
 	checkLimit(attr)
 
@@ -446,22 +452,29 @@ function updateHp(obj, value,isRevive,delayCB, attackPos,type)
 	end
 
 
-	-- 判断伤害能否被抵消
-	local isOffset = false
+	-- 判断技能伤害能否被抵消
+	local isOffsetSkillHurt = false
 	if value < 0 and (type == SKILL_HP_TYPE or type == EXTRA_HP_TYPE) then -- 是扣血, 并且来自技能本身或技能特殊效果
 		targetBuffCMD = "jiahu"
 		if CombatBuff.isStatus(obj, {targetBuffCMD} ) then
 			extraHandle = extraHandle or {}
 			extraHandle[1] = 2
 			extraHandle[2] = targetBuffCMD
-			isOffset = true
+			isOffsetSkillHurt = true
 		end
 	end
 
-
+	-- 技能伤害能否免疫
+	local isImmunitySkillHurt = false
+	if value < 0 and (type == SKILL_HP_TYPE or type == EXTRA_HP_TYPE) then -- 是扣血, 并且来自技能本身或技能特殊效果
+		targetBuffCMD = "jiahu2"
+		if CombatBuff.isStatus(obj, {targetBuffCMD} ) then
+			isImmunitySkillHurt = true
+		end
+	end
 
 	-- 护盾值检测
-	if value < 0 and (not isAbsorb and not isOffset) then
+	if value < 0 and (not isAbsorb and not isOffsetSkillHurt and not isImmunitySkillHurt) then
 		local huDunValue = CombatBuff.getBuffHuDun(obj)
 		if huDunValue > 0 then
 			if huDunValue >= (-value) then
@@ -472,7 +485,6 @@ function updateHp(obj, value,isRevive,delayCB, attackPos,type)
 				CombatBuff.updateHuDun(obj, -huDunValue)
 			end
 		end
-
 	end
 
 	-- 加血上限判断
@@ -491,7 +503,7 @@ function updateHp(obj, value,isRevive,delayCB, attackPos,type)
 	end
 
 
-	if isAbsorb or isOffset then
+	if isAbsorb or isOffsetSkillHurt then
 		extraHandle[3] = d
 		d = 0
 
@@ -499,12 +511,15 @@ function updateHp(obj, value,isRevive,delayCB, attackPos,type)
 		-- return 0, value
 	end
 
+	if isImmunitySkillHurt then
+		d = 0
+	end
 
 	if sum < 0 then
 		sum = 0
 	end
 	local ret = beforeUpdateHp(obj, sum, value, d)
-	if ret and (not isAbsorb and not isOffset) then
+	if ret and (not isAbsorb and not isOffsetSkillHurt and not isImmunitySkillHurt) then
 		obj.hp = sum
 	end
 

+ 6 - 1
script/module/hero/HeroExclusiveWeapon.lua

@@ -14,8 +14,9 @@ local ObjHuman = require("core.ObjHuman")
 local Config = require("excel.weapon").weapon
 local HeroExcel = require("excel.hero").hero
 
+local GiftLogic
 
-local COND_STAR = 12   -- 获得超武需要的星级
+local COND_STAR = 11   -- 获得超武需要的星级
 local STAGELV = 20     -- 每20级获得一个特殊效果
 local LOGTAG = "HeroExclusiveWeapon" --日志标识
 local SSRGRADE = 4          -- SSR英雄的grade值
@@ -328,6 +329,10 @@ function UpgradeWeapon(human, heroID, heroIndex)
     HeroLogic.sendHeroBagDynamic(human, heroID, heroIndex)
     ObjHuman.sendAttr(human, RoleDefine.ZHANDOULI)
     HeroLogic.refreshDot(human, heroGrid.uuid)
+
+    -- 弹窗礼包
+    GiftLogic = GiftLogic or require("topup.GiftLogic")
+    GiftLogic.trigger(human, GiftLogic.GIFT_HEROWEAPON_UPGRADE_STAR, {currentVal = nextWeaponLv}, GiftLogic.GIFT_SEC_TYPE1)
 end
 
 

+ 76 - 21
script/module/theStars/TheStarsLogic.lua

@@ -5,7 +5,7 @@ local MonsterExcel = require("excel.monster")
 local ThroneExcel = require("excel.throne")
 local MailExcel = require("excel.mail")
 local RoleExcel = require("excel.role")
-local Lang = require("common.Lang")
+-- local Lang = require("common.Lang")
 local Util = require("common.Util")
 local Lang = require("common.Lang")
 local Msg = require("core.Msg")
@@ -26,16 +26,33 @@ local MailManager = require("mail.MailManager")
 local TheStarsDBLogic = require("theStars.TheStarsDBLogic")
 local RoleSystemLogic = require("roleSystem.RoleSystemLogic")
 local RoleSystemDefine = require("roleSystem.RoleSystemDefine")
-local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
-local ChengjiuDefine = require("chengjiu.ChengjiuDefine")
+-- local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
+-- local ChengjiuDefine = require("chengjiu.ChengjiuDefine")
 local JjcLogic = require("jjc.JjcLogic")
 local ItemExcel = require("excel.item").item
 local MailDefine = require("mail.MailIdDefine")
 local ChatPaoMaLogic = require("chat.ChatPaoMaLogic")
 local HeroGrowUp = require("absAct.HeroGrowUp")
+local HeroLogic = require("hero.HeroLogic")
+local HeroExcel = require("excel.hero")
 
 local FAIL_COMBAT_CD = 1200                   -- 失败后冷却CD 1200
 
+
+local function getTargetHuman(playerUuid)
+    local targetHuman = ObjHuman.onlineUuid[playerUuid]
+    if not targetHuman then
+        local db = RoleDBLogic.getDb(playerUuid)
+        if db then
+            targetHuman = {}
+            targetHuman.db = db
+        end
+    end
+
+    return targetHuman
+end
+
+
 function isOpen(human,sendErr)
     if not RoleSystemLogic.isOpen(human, RoleSystemDefine.ROLE_SYS_ID_1303,sendErr) then
         return
@@ -138,19 +155,40 @@ function theStarsThroneQuery(human, id, vestId)
 
     msgRet.lv = throne.lv
     msgRet.nowEvolveCnt = throne.evolve or 0
+    msgRet.monsterList[0] = 0
 
-    local monsterOutID = getMonsterOutID(throne.id, throne.lv)
-    local monsterOutConfig = MonsterExcel.monsterOut[monsterOutID]
-    local count = #monsterOutConfig.member
-    for i = 1,count do
-        local monsterID = monsterOutConfig.member[i][1]
-        local lv = monsterOutConfig.member[i][2]
-	    local mcf = MonsterExcel.monster[monsterID]
-        msgRet.monsterList[i].body = mcf.body
-        msgRet.monsterList[i].lv = throne.lv
-        msgRet.monsterList[i].camp = mcf.camp
+    if throne.uuid then
+        local targetHuman = getTargetHuman(throne.uuid)
+        if targetHuman then
+            local len = 0
+            local heroList = CombatPosLogic.getCombatHeros(targetHuman, CombatDefine.COMBAT_TYPE5)
+            for _, heroUuid in pairs(heroList or {}) do
+                local heroGrid = HeroLogic.getHeroGridByUuid(targetHuman, heroUuid)
+                if heroGrid then
+                    len = len + 1
+                    msgRet.monsterList[0] = len
+
+                    local heroCfg = HeroExcel.hero[heroGrid.id]
+                    msgRet.monsterList[len].body = heroGrid.body or heroCfg.body
+                    msgRet.monsterList[len].lv = heroGrid.lv or 0
+                    msgRet.monsterList[len].camp = heroCfg.camp
+                end
+            end
+        end
+    else
+        local monsterOutID = getMonsterOutID(throne.id, throne.lv)
+        local monsterOutConfig = MonsterExcel.monsterOut[monsterOutID]
+        local count = #monsterOutConfig.member
+        for i = 1,count do
+            local monsterID = monsterOutConfig.member[i][1]
+            local lv = monsterOutConfig.member[i][2]
+            local mcf = MonsterExcel.monster[monsterID]
+            msgRet.monsterList[i].body = mcf.body
+            msgRet.monsterList[i].lv = throne.lv
+            msgRet.monsterList[i].camp = mcf.camp
+        end
+        msgRet.monsterList[0] = count
     end
-    msgRet.monsterList[0] = count
 
     Msg.send(msgRet, human.fd)
 end
@@ -166,7 +204,7 @@ end
 
 local function getNewLvExp(id, lv, exp, evolveCnt)
 	local starsCf = ThroneExcel.theStars[lv]
-	exp = evolveCnt * starsCf.evolveExp + exp 
+	exp = evolveCnt * starsCf.evolveExp + exp
     while exp >= starsCf.exp do
         lv = lv + 1 
         exp = exp - starsCf.exp
@@ -185,7 +223,7 @@ function checkCombatPos(human, args)
     local evolveCnt = tonumber(args[2] or 0)
     local vestId = args[3]
 
-	if evolveCnt < 1 then return end -- 升级次数小于1,怀疑有人作弊
+	-- if evolveCnt < 1 then return end -- 升级次数小于1,怀疑有人作弊
 
     local cf = ThroneExcel.throne[id]
     if not cf then return end
@@ -197,7 +235,7 @@ function checkCombatPos(human, args)
 
     local leftTime = getFightCoolTime(human)
     if leftTime > 0 then
-       return Broadcast.sendErr(human, Util.format(Lang.THRONE_CHALLENGE_TIME_INIT, math.ceil(leftTime / 60))) 
+       return Broadcast.sendErr(human, Util.format(Lang.THRONE_CHALLENGE_TIME_INIT, math.ceil(leftTime / 60)))
     end
 
 	if human.db._id == throne.uuid then --不能挑战自己
@@ -230,6 +268,9 @@ function fight(human, args)
     cbParam.vestId = throne._id
     cbParam.id = throne.id    
     cbParam.evolveCnt = tonumber(args[2] or 0)
+
+    
+    args[#args+1] = throne.uuid
     
     CombatLogic.combatBegin(human, cf.mapID, args, CombatDefine.COMBAT_TYPE5, cbParam)
     
@@ -287,7 +328,7 @@ function onFightEnd(human, result, type, cbParam, combatInfo)
         combatInfo.endParam = ItemExcel[config.chenghaoID].icon.."|"..key1Value.."|"..key2Value
 
         -- 重新设置敌人名字
-        combatInfo.defender.name = Util.format(Lang.THE_STARS_DEFINCER, cbParam.newLv)
+        -- combatInfo.defender.name = Util.format(Lang.THE_STARS_DEFINCER, cbParam.newLv)
         CombatVideo.saveThroneVideo(throne.id, combatInfo,cbParam.evolveCnt)
     else
         human.db.throneTime = os.time() -- 失败刷新CD
@@ -351,10 +392,24 @@ function getCombatMonsterOutID(human, side, args)
     return getMonsterOutID(throne.id, newLv)
 end
 
-function getCombatObjList(human,side)
-    if side ~= CombatDefine.ATTACK_SIDE then return end
+function getCombatObjList(human,side, args)
+    -- if side ~= CombatDefine.ATTACK_SIDE then return end
+
+    local h
+    if side == CombatDefine.ATTACK_SIDE then
+        h = human
+    else
+        local playerUuuid = args and args[#args]
+        h = getTargetHuman(playerUuuid)
+    end
+
+    if not h then
+        return
+    end
+
+    -- return CombatLogic.getHumanObjList(human, CombatDefine.COMBAT_TYPE1)
 
-    return CombatLogic.getHumanObjList(human, CombatDefine.COMBAT_TYPE1)
+    return CombatLogic.getHumanObjList(h, CombatDefine.COMBAT_TYPE1)
 end
 
 

+ 1 - 0
script/module/topup/GiftLogic.lua

@@ -32,6 +32,7 @@ GIFT_HERO_UPGRADE_STAR_DAILY = 8    -- 英雄升星, 每日只可触发一次, 
 
 GIFT_HEROSEED_UPGRADE_STAR = 9      -- 英雄种子
 GIFT_HEROTIANYUAN_UPGRADE_STAR = 10 -- 英雄天元
+GIFT_HEROWEAPON_UPGRADE_STAR = 11  -- 英雄专属武器
 
 GIFT_TALISMAN_OPEN = 15           -- 开启秘宝玩法
 GIFT_WINNERRELIC_OPEN = 16        -- 开启圣遗物玩法

+ 14 - 0
script/module/voucher/VoucherInvest.lua

@@ -144,6 +144,20 @@ function isOpen(human, YYInfo, funcConfig)
     if human.version and table.find(VoucherShopDefine.VOUCHER_NO_OPEN_TAG_ARR, human.version) then
         return false
     end
+
+    if human.db.phpChanelID and (human.db.phpChanelID == 13 or human.db.phpChanelID == "13") then
+        return false
+    end
+
+    if human.db.lv < VoucherShopDefine.VOUCHER_OPEN_LV_COND then
+        return false
+    end
+
+    if not human.db.nFirstBuy or human.db.nFirstBuy ~= 1 then
+        --print("[VoucherShop is open] 33333")
+        return false
+    end
+
     return true
 end
 

+ 3 - 0
script/module/voucher/VoucherShopDefine.lua

@@ -35,3 +35,6 @@ VOUCHERSTATUS_GET = 1           -- 已获取
 
 -- 当标识是这些时,代金券活动不开启
 VOUCHER_NO_OPEN_TAG_ARR = {"minigame_ts_ios", "iostishen", "minigame_ts"}
+
+
+VOUCHER_OPEN_LV_COND = 40   -- 代金券商店,代金券投资开启需要的等级

+ 1 - 1
script/module/winnerRelic/Proto.lua

@@ -28,7 +28,7 @@ CG_SACRED_RELIC_QUERY = {
 -- 服务端返回遗物列表
 GC_SACRED_RELIC_QUERY = {
     {"nAllStar",			1,			"int"},				-- 总星数
-    {"SacredRelicConfigs", 25, SacredRelicNet},-- 星级配置
+    {"SacredRelicConfigs", 30, SacredRelicNet},-- 星级配置
 }
 
 -- 客户端请求激活/升星遗物

+ 1 - 1
script/module/winnerRelic/WinnerRelicLogic.lua

@@ -26,7 +26,7 @@ local LOGTYPE = "WinnerRelic"
 local relicUpgradeConfig = relicModule.RelicUpgrade  -- 获取升级配置表
 local relicDataConfig = relicModule.RelicData       -- 获取遗物数据表
 local COND_TOWER_LEVEL = 500  --开启本系统需要通关恶魔之塔的层数
-local WINNERRELIC_HEROSTAR = 13     -- 需要穿戴的星级
+local WINNERRELIC_HEROSTAR = 12     -- 需要穿戴的星级
 local WINNERRELIC_2_CHENGJIU_TASKID = 405 -- 圣遗物系统对应的成就任务Id
 --[[
     DB =

+ 18 - 0
script/module/zhuanpan/Handler.lua

@@ -67,4 +67,22 @@ end
 -- 美团订阅奖励领取
 function CG_ZHUANPAN_SUBSCRIBE_REWARD_GET(human, msg)
 	ZhuanpanLogic.subscribeRewardGet(human, msg.channelId)
+end
+
+
+-----------------------淘宝小程序桌面活动-----------------------
+
+-- 添加桌面上报
+function CG_ZHUANPAN_TB_ADD_DESKTOP(human)
+	ZhuanpanLogic.tbminiappAddDesktop(human)
+end
+
+-- 桌面活动查询
+function CG_ZHUANPAN_TB_QUERY(human, msg)
+	ZhuanpanLogic.tbminiappQuery(human, msg.status)
+end
+
+-- 活动奖励领取
+function CG_ZHUANPAN_TB_REWARD_GET(human, msg)
+	ZhuanpanLogic.tbminiappRewardGet(human, msg.status)
 end

+ 22 - 0
script/module/zhuanpan/Proto.lua

@@ -159,3 +159,25 @@ CG_ZHUANPAN_SUBSCRIBE_REWARD_GET = {
 }
 
 
+-----------------------淘宝小程序桌面活动-----------------------
+
+-- 添加桌面上报
+CG_ZHUANPAN_TB_ADD_DESKTOP = {}
+
+-- 桌面活动查询
+CG_ZHUANPAN_TB_QUERY = {
+	{"status",  1,  "byte"},  -- 1=桌面进入 2=二楼进入
+}
+
+GC_ZHUANPAN_TB_QUERY = {
+	{"isDesktopAdded",           1,  "byte"},  -- 是否已添加桌面 0否 1是
+	{"isDesktopRewardReceived",  1,  "byte"},  -- 是否已领取添加桌面奖励(仅1次)0否 1是
+	{"isEnterRewardReceived",    1,  "byte"},  -- 是否已领取桌面进入奖励(每日1次)0否 1是
+	{"isFloorRewardReceived",    1,  "byte"},  -- 是否已领取二楼进入奖励(每日1次)0否 1是
+}
+
+-- 活动奖励领取
+CG_ZHUANPAN_TB_REWARD_GET = {
+	{"status",  1,  "byte"},  -- 1=桌面进入奖励 2=二楼进入奖励 3=添加桌面奖励(仅1次)
+}
+

+ 166 - 0
script/module/zhuanpan/ZhuanpanLogic.lua

@@ -1510,4 +1510,170 @@ function subscribeRewardGet(human, channelId)
 		Log.write(Log.LOGID_DEBUG, "[subscribeRewardGet] 错误: 发送每日固定奖励查询协议失败: "..(dailyQueryErr or "unknown"))
 		-- 即使查询协议发送失败,奖励已经发放,所以不返回错误
 	end
+end
+
+
+-----------------------淘宝小程序桌面活动-----------------------
+
+-- 奖励配置(占位,按需修改)
+local TB_ENTER_REWARD        = {{112, 100}}   -- 桌面进入奖励(每日1次)
+local TB_SECOND_FLOOR_REWARD = {{127, 10}}    -- 二楼进入奖励(每日1次)
+local TB_DESKTOP_REWARD      = {{118, 5}}     -- 添加桌面奖励(仅1次)
+
+-- 渠道校验:仅 hanman.pf == "tbminiapp" 的玩家可参与
+local function isTbMiniApp(human)
+	return human.pf_info and human.pf_info.pf == "tbminiapp"
+end
+
+-- 淘宝小程序桌面活动查询
+-- status: 1=桌面进入 2=二楼进入
+function tbminiappQuery(human, status)
+	local msgRet = Msg.gc.GC_ZHUANPAN_TB_QUERY
+	if not msgRet then
+		Log.write(Log.LOGID_DEBUG, "[tbminiappQuery] 错误: msgRet为nil")
+		return
+	end
+
+	if not isTbMiniApp(human) then
+		return Broadcast.sendErr(human, "渠道不匹配")
+	end
+
+	ObjHuman.updateDaily(human)
+
+	human.db.zhuanpan = human.db.zhuanpan or {}
+	human.db.zhuanpan.tbminiapp = human.db.zhuanpan.tbminiapp or {}
+	local tb = human.db.zhuanpan.tbminiapp
+
+	-- 是否已添加桌面
+	msgRet.isDesktopAdded = tb.desktopAdded and 1 or 0
+
+	-- 是否已领取添加桌面奖励(一次性)
+	msgRet.isDesktopRewardReceived = (tb.desktopReward and tb.desktopReward.getTime) and 1 or 0
+
+	-- 是否已领取桌面进入奖励(每日1次)
+	local enterTime = tb.enterReward and tb.enterReward.getTime
+	msgRet.isEnterRewardReceived = (enterTime and Util.isSameDay(enterTime)) and 1 or 0
+
+	-- 是否已领取二楼进入奖励(每日1次)
+	local floorTime = tb.floorReward and tb.floorReward.getTime
+	msgRet.isFloorRewardReceived = (floorTime and Util.isSameDay(floorTime)) and 1 or 0
+
+	Log.write(Log.LOGID_DEBUG, "[tbminiappQuery] status=" .. tostring(status)
+		.. " isDesktopAdded=" .. tostring(msgRet.isDesktopAdded)
+		.. " isDesktopRewardReceived=" .. tostring(msgRet.isDesktopRewardReceived)
+		.. " isEnterRewardReceived=" .. tostring(msgRet.isEnterRewardReceived)
+		.. " isFloorRewardReceived=" .. tostring(msgRet.isFloorRewardReceived)
+		.. " account=" .. tostring(human.db.account))
+
+	if human.fd then
+		Msg.send(msgRet, human.fd)
+	else
+		Log.write(Log.LOGID_DEBUG, "[tbminiappQuery] 错误: human.fd为nil,无法发送协议")
+	end
+end
+
+-- 淘宝小程序添加桌面上报:记录添加状态
+function tbminiappAddDesktop(human)
+	if not isTbMiniApp(human) then
+		return Broadcast.sendErr(human, "渠道不匹配")
+	end
+
+	human.db.zhuanpan = human.db.zhuanpan or {}
+	human.db.zhuanpan.tbminiapp = human.db.zhuanpan.tbminiapp or {}
+	human.db.zhuanpan.tbminiapp.desktopAdded = true
+
+	Log.write(Log.LOGID_DEBUG, "[tbminiappAddDesktop] 添加桌面成功 account=" .. tostring(human.db.account))
+
+	local querySuccess, queryErr = pcall(function()
+		tbminiappQuery(human, 0)
+	end)
+	if not querySuccess then
+		Log.write(Log.LOGID_DEBUG, "[tbminiappAddDesktop] 错误: 发送查询协议失败: "..(queryErr or "unknown"))
+	end
+end
+
+-- 淘宝小程序活动奖励领取
+-- status: 1=桌面进入奖励(每日1次)2=二楼进入奖励(每日1次)3=添加桌面奖励(仅1次)
+function tbminiappRewardGet(human, status)
+	if not isTbMiniApp(human) then
+		return Broadcast.sendErr(human, "渠道不匹配")
+	end
+
+	ObjHuman.updateDaily(human)
+
+	human.db.zhuanpan = human.db.zhuanpan or {}
+	human.db.zhuanpan.tbminiapp = human.db.zhuanpan.tbminiapp or {}
+	local tb = human.db.zhuanpan.tbminiapp
+
+	local rewardConfig = nil
+
+	if status == 1 then
+		-- 桌面进入奖励(每日1次)
+		local enterTime = tb.enterReward and tb.enterReward.getTime
+		if enterTime and Util.isSameDay(enterTime) then
+			Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 今日已领取桌面进入奖励 account=" .. tostring(human.db.account))
+			return Broadcast.sendErr(human, "今日已领取桌面进入奖励")
+		end
+		rewardConfig = TB_ENTER_REWARD
+
+	elseif status == 2 then
+		-- 二楼进入奖励(每日1次)
+		local floorTime = tb.floorReward and tb.floorReward.getTime
+		if floorTime and Util.isSameDay(floorTime) then
+			Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 今日已领取二楼进入奖励 account=" .. tostring(human.db.account))
+			return Broadcast.sendErr(human, "今日已领取二楼进入奖励")
+		end
+		rewardConfig = TB_SECOND_FLOOR_REWARD
+
+	elseif status == 3 then
+		-- 添加桌面奖励(仅1次)
+		if not tb.desktopAdded then
+			Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 尚未添加桌面 account=" .. tostring(human.db.account))
+			return Broadcast.sendErr(human, "尚未添加桌面")
+		end
+		if tb.desktopReward and tb.desktopReward.getTime then
+			Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 添加桌面奖励已领取 account=" .. tostring(human.db.account))
+			return Broadcast.sendErr(human, "添加桌面奖励已领取")
+		end
+		rewardConfig = TB_DESKTOP_REWARD
+
+	else
+		return Broadcast.sendErr(human, "无效的status参数")
+	end
+
+	-- 发放奖励
+	BagLogic.cleanMomentItemList()
+	for _, v in ipairs(rewardConfig) do
+		BagLogic.updateMomentItem(BagLogic.ADDITEM_TYPE_1, v[1], v[2])
+	end
+	local success, err = pcall(function()
+		BagLogic.addMomentItemList(human, "zhuanpan_once_reward")
+	end)
+	if not success then
+		Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 错误: 添加到背包失败: "..(err or "unknown"))
+		return Broadcast.sendErr(human, "发放奖励失败")
+	end
+
+	-- 记录领取时间
+	local nowTime = os.time()
+	if status == 1 then
+		tb.enterReward = tb.enterReward or {}
+		tb.enterReward.getTime = nowTime
+	elseif status == 2 then
+		tb.floorReward = tb.floorReward or {}
+		tb.floorReward.getTime = nowTime
+	elseif status == 3 then
+		tb.desktopReward = tb.desktopReward or {}
+		tb.desktopReward.getTime = nowTime
+	end
+
+	Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 领取成功 status=" .. tostring(status) .. " account=" .. tostring(human.db.account))
+
+	-- 下发查询协议
+	local querySuccess, queryErr = pcall(function()
+		tbminiappQuery(human, 0)
+	end)
+	if not querySuccess then
+		Log.write(Log.LOGID_DEBUG, "[tbminiappRewardGet] 错误: 发送查询协议失败: "..(queryErr or "unknown"))
+	end
 end

+ 22 - 0
webServer/src/channels/handlers/HuaweiChannelHandler.ts

@@ -96,6 +96,17 @@ export class HuaweiChannelHandler implements ChannelHandler {
                 return await meituanHandler.handleLogin(ctx, meituanConfig);
             }
 
+            // platform=tbminiapp 时使用淘宝渠道配置
+            if (platform === 'tbminiapp') {
+                const taobaoConfig = ChannelConfigManager.getConfig(19);
+                if (!taobaoConfig) {
+                    logger.error("淘宝渠道配置不存在");
+                    return { code: -1, msg: "渠道配置错误", data: null };
+                }
+                logger.info("channelId=17, platform=tbminiapp, 使用淘宝渠道配置处理登录");
+                config = taobaoConfig;
+            }
+
             const { token } = data;
 
             // 验证必要参数
@@ -321,6 +332,17 @@ export class HuaweiChannelHandler implements ChannelHandler {
                 return await meituanHandler.handlePayment(ctx, meituanConfig);
             }
 
+            // platform=tbminiapp 时使用淘宝渠道配置
+            if (platform === 'tbminiapp') {
+                const taobaoConfig = ChannelConfigManager.getConfig(19);
+                if (!taobaoConfig) {
+                    logger.error("淘宝渠道配置不存在");
+                    return { code: 1, msg: "渠道配置错误" };
+                }
+                logger.info("channelId=17, platform=tbminiapp, 使用淘宝渠道配置处理支付回调");
+                config = taobaoConfig;
+            }
+
             // 1. 验证必要参数
             const requiredParams = ['app_id', 'user_id', 'server_id', 'role_id', 'cp_order_id', 
                                    'cs_order_no', 'cs_trade_no', 'pay_amount', 'swap_coin_num', 

+ 14 - 1
webServer/src/config/channelConfig.ts

@@ -47,7 +47,7 @@ import {
     HKT_ANDROID_CALLBACK_KEY,
     HKT_IOS_PRODUCT_CODE,
     HKT_IOS_CALLBACK_KEY,
-    HKT_DOMAIN
+    HKT_DOMAIN, TAOBAO_CALLBACK_SECRET, TAOBAO_APP_ID, TAOBAO_APP_SECRET
 } from "./thirdParams";
 
 // 渠道配置接口定义
@@ -321,4 +321,17 @@ export const channelConfigs: Record<number, ChannelConfig> = {
             productCode: HKT_ANDROID_PRODUCT_CODE, // 默认使用安卓的
         },
     },
+    19: {
+        // 淘宝渠道
+        channelId: 17,
+        name: "淘宝",
+        platform: "tbminiapp",
+        paymentConfig: {
+            callbackKey: TAOBAO_CALLBACK_SECRET,
+        },
+        loginConfig: {
+            appId: TAOBAO_APP_ID,
+            appSecret: TAOBAO_APP_SECRET ,
+        },
+    },
 };

+ 1 - 1
webServer/src/config/dbConfig.ts

@@ -1,7 +1,7 @@
 
 export const mysqlConfig = {
     user: "root", //账号
-    password: "wch123.com", //密码
+    password: "wch123.com", //密码 CmASfW98lOKbFieqEQox wch123.com
     database: "sdk", //数据库
     host: "127.0.0.1", //服务器地址
     port: 3306, //数据库端口

+ 5 - 0
webServer/src/config/thirdParams.ts

@@ -135,6 +135,11 @@ export const MEITUAN_APP_SECRET = "e56ebfd0ac5d47911aea3d6b55383b32c710a83415db4
 export const HUAWEI_APP_ID = "251208633431"; // 需要配置实际的传盛应用ID
 export const HUAWEI_APP_SECRET = "7B04DC515110A88336FD3DEDBF650F3F"; // 需要配置实际的应用密钥
 export const HUAWEI_CALLBACK_SECRET = "55B5E96B295F07BB858FE7D90018AEAB"; // 需要配置实际的回调密钥(用于支付回调签名验证)
+// 淘宝渠道
+export const TAOBAO_APP_ID = "251225994751"; // 需要配置实际的传盛应用ID
+export const TAOBAO_APP_SECRET = "7C664178FAAEE2711FFA2C1A13D5B608"; // 需要配置实际的应用密钥
+export const TAOBAO_CALLBACK_SECRET = "7A4B128D8F8035AED1372CB45EBF0E08"; // 需要配置实际的回调密钥(用于支付回调签名验证)
+
 
 // 港台渠道(Quick海外SDK)
 // 安卓配置

+ 3 - 0
webServer/src/controller/ApiController.ts

@@ -1092,6 +1092,9 @@ class ApiController {
                 "gf300",
                 "YDKL888",
                 "SDKL888",
+                "CHUXILB",
+                "CHUNJIELB",
+                "YUANXIAOLB"
             ];
             let param: string = "";
 

+ 1 - 1
webServer/src/server.ts

@@ -23,7 +23,7 @@ let serverManager: ServerManager;
 // 启动服务器
 async function startServer() {
   // 先初始化MongoDB
-  await initializeMongoDB();
+  // await initializeMongoDB();
   
   // 创建服务器管理器实例
   serverManager = new ServerManager(router);