Parcourir la source

修改精灵,秘宝,圣遗物系统开启条件

gitxsm il y a 3 mois
Parent
commit
470176af03

+ 9 - 4
script/module/elf/ElfLogic.lua

@@ -28,7 +28,7 @@ local RoleDefine = require("role.RoleDefine")
 local ObjHuman = require("core.ObjHuman")
 local RoleSystemLogic = require("roleSystem.RoleSystemLogic")
 local RoleSystemDefine = require("roleSystem.RoleSystemDefine")
--- local HuanJingTowerLogic = require("huanjingTower.HuanjingTowerLogic")
+local HuanJingTowerLogic = require("huanjingTower.HuanjingTowerLogic")
 local TalismanLogic = require("talisman.TalismanLogic")
 local TriggerLogic = require("trigger.TriggerLogic")
 local TriggerDefine = require("trigger.TriggerDefine")
@@ -38,7 +38,7 @@ local GiftLogic
 
 local ELF_UPGRADELV_LOG_TAG = "elfUpGradeLv"
 local ELF_UPGRADESTAR_LOG_TAG = "elfUpGradeStar"
--- local ELF_COND_TOWER_LEVEL =  600
+local ELF_COND_TOWER_LEVEL =  600
 local ELF_2_CHENGJIU_TASKID = 406 -- 精灵系统对应的成就任务Id
 
 
@@ -204,7 +204,7 @@ end
 
 
 
---是否开启本系统
+--是否开启本系统, 内部使用, 需要领取任务奖励后才解锁
 local function isOpen(human)
     -- local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
     -- if towerLevel >= ELF_COND_TOWER_LEVEL then
@@ -316,7 +316,12 @@ end
 
 -- 外部调用, 本系统是否开启
 function ModuleisOpen(human)
-    return isOpen(human)
+    -- return isOpen(human)
+    local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
+    if towerLevel >= ELF_COND_TOWER_LEVEL then
+        return true
+    end
+    return false
 end
 
 -- 外部调用, 是否有红点

+ 16 - 2
script/module/talisman/TalismanLogic.lua

@@ -22,12 +22,15 @@ local RoleSystemLogic = require("roleSystem.RoleSystemLogic")
 local RoleSystemDefine = require("roleSystem.RoleSystemDefine")
 local TriggerDefine = require("trigger.TriggerDefine")
 local TriggerLogic = require("trigger.TriggerLogic")
+local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
 
 local GiftLogic
 
 local LOGTYPE = "talisman"
 local COND_TOWER_LEVEL = 100 --开启本系统需要通关恶魔之塔的层数
 
+local TALISMAN_2_CHENGJIU_TASKID = 404 -- 秘宝系统对应的成就任务Id
+
 --秘宝对挂机钻石/情报等其他方面增益标识
 OTHER_EFFECT_TBL = {
     ["GJ_QB"] = "GJ_QB",                            --挂机情报类型
@@ -61,10 +64,11 @@ OTHER_EFFECT_TBL = {
 
 --是否开启本系统
 local function isOpen(human)
-    local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
-    if towerLevel >= COND_TOWER_LEVEL then
+    local state = ChengjiuLogic.GetTaskState(human, TALISMAN_2_CHENGJIU_TASKID)
+    if state == 2 then
         return true
     end
+
     return false
 end
 
@@ -223,6 +227,16 @@ function isDot(human, dotConfig)
     end
 end
 
+
+-- 外部调用, 本系统是否开启
+function ModuleisOpen(human)
+    local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
+    if towerLevel >= COND_TOWER_LEVEL then
+        return true
+    end
+    return false
+end
+
 --秘宝对其他方面的加成, 如:挂机钻石
 function getTalismanAdd(human, effectType)
     local addValue = 0

+ 23 - 2
script/module/winnerRelic/WinnerRelicLogic.lua

@@ -17,6 +17,7 @@ local Util = require("common.Util")
 local TriggerDefine = require("trigger.TriggerDefine")
 local TriggerLogic = require("trigger.TriggerLogic")
 local TalismanLogic = require("talisman.TalismanLogic")
+local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
 
 
 local GiftLogic
@@ -26,6 +27,7 @@ local relicUpgradeConfig = relicModule.RelicUpgrade  -- 获取升级配置表
 local relicDataConfig = relicModule.RelicData       -- 获取遗物数据表
 local COND_TOWER_LEVEL = 500  --开启本系统需要通关恶魔之塔的层数
 local WINNERRELIC_HEROSTAR = 13     -- 需要穿戴的星级
+local WINNERRELIC_2_CHENGJIU_TASKID = 405 -- 圣遗物系统对应的成就任务Id
 --[[
     DB =
     {{    	 
@@ -51,10 +53,17 @@ end
 
 --判断是否开启圣者遗物
 local function isOpen(human)
-    local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
-    if towerLevel >= COND_TOWER_LEVEL then
+    -- local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
+    -- if towerLevel >= COND_TOWER_LEVEL then
+    --     return true
+    -- end
+    -- return false
+
+    local state = ChengjiuLogic.GetTaskState(human, WINNERRELIC_2_CHENGJIU_TASKID)
+    if state == 2 then
         return true
     end
+
     return false
 end
 -- 获取对应类型的遗物
@@ -608,6 +617,18 @@ function isDot(human, dotConfig)
     end
 end
 
+
+-- 外部调用, 本系统是否开启
+function ModuleisOpen(human)
+    local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
+    if towerLevel >= COND_TOWER_LEVEL then
+        return true
+    end
+    return false
+end
+
+
+
 function WinnerRelic_GetSkillID(nRelicID, nStar)
     local tConfig = relicDataConfig[nRelicID]
     if nil == tConfig then