Просмотр исходного кода

修改精灵系统开启体条件..

gitxsm 6 месяцев назад
Родитель
Сommit
38f79e826d
2 измененных файлов с 24 добавлено и 4 удалено
  1. 12 0
      script/module/chengjiu/ChengjiuLogic.lua
  2. 12 4
      script/module/elf/ElfLogic.lua

+ 12 - 0
script/module/chengjiu/ChengjiuLogic.lua

@@ -294,6 +294,10 @@ function getReward(human,taskID)
     ObjHuman.sendAttr(human, RoleDefine.ZHANDOULI)
     GuideLogic.setDoSpecialGuide(human, GuideLogic.SKIPTYPE_JUMP_JIEFENG_BAOJU)
     RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_2001)
+
+    if taskID == 406 then
+        RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_2031)
+    end
 end
 
 -- 回调
@@ -489,4 +493,12 @@ end
 --GM, 重置所有数据
 function GM_ClearAllData(human)
     human.db.chengjiu = {}
+end
+
+
+function GetTaskState(human, taskId)
+    if not human.db.chengjiu or not human.db.chengjiu.task then
+        return CJ_TASK_STATE_0
+    end
+    return human.db.chengjiu.task[taskId] or CJ_TASK_STATE_0
 end

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

@@ -28,14 +28,16 @@ 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")
+local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
 
 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
 
 
 local function initElfData(human)
@@ -202,10 +204,16 @@ end
 
 --是否开启本系统
 local function isOpen(human)
-    local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
-    if towerLevel >= ELF_COND_TOWER_LEVEL then
+    -- local towerLevel = HuanJingTowerLogic.getTowerLevel(human)
+    -- if towerLevel >= ELF_COND_TOWER_LEVEL then
+    --     return true
+    -- end
+    -- return false
+    local state = ChengjiuLogic.GetTaskState(human, ELF_2_CHENGJIU_TASKID)
+    if state == 2 then
         return true
     end
+
     return false
 end
 -- 重算战力