|
|
@@ -310,21 +310,25 @@ function HonorJourneyTaskQuery(human, isOnLogin)
|
|
|
local nPreTaskID = HonorJourney_Gettaskpre(nID)
|
|
|
local nState = HonorJourney_GetTaskStatus(human, nID)
|
|
|
nSendLen = nSendLen + 1
|
|
|
+ --print("[HonorJourneyTaskQuery] nID = "..nID.." nState = "..nState.."\n")
|
|
|
if CommonDefine.COMMON_PRIZE_STATE_GET ~= nState then
|
|
|
local bSow = value.isVisiable == HONORJOURNEY_SHOWTASK and true or false
|
|
|
|
|
|
-- 获取前置任务状态
|
|
|
if nPreTaskID then
|
|
|
local nPreTaskState = HonorJourney_GetTaskStatus(human, nPreTaskID)
|
|
|
- if CommonDefine.COMMON_PRIZE_STATE_NOGET ~= nPreTaskState then
|
|
|
+ if CommonDefine.COMMON_PRIZE_STATE_GET == nPreTaskState then
|
|
|
bSow = true
|
|
|
+ else
|
|
|
+ bSow = false
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+ --print("[HonorJourneyTaskQuery] nID = "..nID.." bSow = "..(bSow == true and 1 or 0))
|
|
|
-- 能领取了都要显示出来
|
|
|
- if CommonDefine.COMMON_PRIZE_STATE_CANGET == nState then
|
|
|
- bSow = true
|
|
|
- end
|
|
|
+ -- if CommonDefine.COMMON_PRIZE_STATE_CANGET == nState then
|
|
|
+ -- bSow = true
|
|
|
+ -- end
|
|
|
|
|
|
-- 显示才下发
|
|
|
if true == bSow then
|
|
|
@@ -359,13 +363,13 @@ function HonorJourneyTaskQuery(human, isOnLogin)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
- if cnt > 0 then
|
|
|
- msgRet.list[0] = cnt
|
|
|
- msgRet.nFirst = nFirst
|
|
|
- msgRet.nEnd = 1
|
|
|
- print("[HonorJourneyTaskQuery] 最后一次发送数据 cnt = "..cnt.." nFirst = "..nFirst.." nSendLen = "..nSendLen)
|
|
|
- Msg.send(msgRet, human.fd)
|
|
|
- end
|
|
|
+ print("[HonorJourneyTaskQuery] 循环遍历结束 cnt = "..cnt.." nFirst = "..nFirst.." nSendLen = "..nSendLen)
|
|
|
+
|
|
|
+ msgRet.list[0] = cnt
|
|
|
+ msgRet.nFirst = nFirst
|
|
|
+ msgRet.nEnd = 1
|
|
|
+ print("[HonorJourneyTaskQuery] 最后一次发送数据 cnt = "..cnt.." nFirst = "..nFirst.." nSendLen = "..nSendLen)
|
|
|
+ Msg.send(msgRet, human.fd)
|
|
|
end
|
|
|
|
|
|
function onHonorJourneyTaskHuoYue(human,sum)
|
|
|
@@ -688,6 +692,96 @@ local function HonorJourneyTask_GetEquiporFuWen(nEventType, uuid, nQuality, nNum
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+-- 秘宝或者遗物激活
|
|
|
+local function HonorJourneyTask_ItemActivate(nEventType, uuid, nItemID, nItemNum)
|
|
|
+ local human = ObjHuman.onlineUuid[uuid]
|
|
|
+ if not human then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ print("[HonorJourneyTask_ItemActivate] nEventType = "..nEventType.." nItemID = "..nItemID.." nItemNum = "..nItemNum)
|
|
|
+
|
|
|
+ local tTaksID = {}
|
|
|
+ for nID, v in pairs(HonorJourneyExcel.HonorJourney) do
|
|
|
+ if v.triggerType == nEventType then
|
|
|
+ local nState = HonorJourney_GetTaskStatus(human, nID)
|
|
|
+ if nItemID == v.taskArgument and nState == CommonDefine.COMMON_PRIZE_STATE_NOGET then
|
|
|
+ table.insert(tTaksID, nID)
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if tTaksID and nil ~= _G.next(tTaksID) then
|
|
|
+ for _, nID in pairs(tTaksID) do
|
|
|
+ -- print("[HonorJourneyTask_ItemActivate] 进行判断的任务ID = "..nID)
|
|
|
+ HonorJourneyTask_AddTaskFinishNum(human, nID, nItemNum)
|
|
|
+ HonorJourney_CheckTaskStatus(human, nID)
|
|
|
+ end
|
|
|
+
|
|
|
+ RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_803)
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
+-- 等级改变
|
|
|
+local function HonorJourneyTask_LvChange(nEventType, uuid, nValue1, nValue2)
|
|
|
+ local human = ObjHuman.onlineUuid[uuid]
|
|
|
+ if not human then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ print("[HonorJourneyTask_LvChange] nEventType = "..nEventType.." nValue1 = "..nValue1.." nValue2 = "..nValue2)
|
|
|
+
|
|
|
+ local tTaksID = {}
|
|
|
+ for nID, v in pairs(HonorJourneyExcel.HonorJourney) do
|
|
|
+ if v.triggerType == nEventType then
|
|
|
+ local nState = HonorJourney_GetTaskStatus(human, nID)
|
|
|
+ if nValue2 >= v.taskProcess and nState == CommonDefine.COMMON_PRIZE_STATE_NOGET then
|
|
|
+ table.insert(tTaksID, nID)
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if tTaksID and nil ~= _G.next(tTaksID) then
|
|
|
+ for _, nID in pairs(tTaksID) do
|
|
|
+ -- print("[HonorJourneyTask_ItemActivate] 进行判断的任务ID = "..nID)
|
|
|
+ HonorJourneyTask_SetTaskFinishNum(human, nID, nValue2)
|
|
|
+ HonorJourney_CheckTaskStatus(human, nID)
|
|
|
+ end
|
|
|
+
|
|
|
+ RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_803)
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
+-- 境界提升
|
|
|
+local function HonorJourneyTask_JingjieLvChange(nEventType, uuid, nValue1, nValue2)
|
|
|
+ local human = ObjHuman.onlineUuid[uuid]
|
|
|
+ if not human then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ print("[HonorJourneyTask_JingjieLvChange] nEventType = "..nEventType.." nValue1 = "..nValue1.." nValue2 = "..nValue2)
|
|
|
+
|
|
|
+ local tTaksID = {}
|
|
|
+ for nID, v in pairs(HonorJourneyExcel.HonorJourney) do
|
|
|
+ if v.triggerType == nEventType then
|
|
|
+ local nState = HonorJourney_GetTaskStatus(human, nID)
|
|
|
+ if nValue2 >= v.taskArgument and nState == CommonDefine.COMMON_PRIZE_STATE_NOGET then
|
|
|
+ table.insert(tTaksID, nID)
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if tTaksID and nil ~= _G.next(tTaksID) then
|
|
|
+ for _, nID in pairs(tTaksID) do
|
|
|
+ print("[HonorJourneyTask_JingjieLvChange] 进行判断的任务ID = "..nID)
|
|
|
+ HonorJourneyTask_SetTaskFinishNum(human, nID, 1)
|
|
|
+ HonorJourney_CheckTaskStatus(human, nID)
|
|
|
+ end
|
|
|
+
|
|
|
+ RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_803)
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
function Init()
|
|
|
tEventHandler = {
|
|
|
[TriggerDefine.CHAT_TIMES] = HonorJourneyTask_EvnentCommon,
|
|
|
@@ -711,6 +805,16 @@ function Init()
|
|
|
[TriggerDefine.EVENT_TYPE_SWEEP] = HonorJourneyTask_EvnentCommon,
|
|
|
[TriggerDefine.FUWEN_GETQUALITY] = HonorJourneyTask_GetEquiporFuWen,
|
|
|
[TriggerDefine.EQUIP_GETQUALITY] = HonorJourneyTask_GetEquiporFuWen,
|
|
|
+ [TriggerDefine.FUWEN_RESET] = HonorJourneyTask_EvnentCommon,
|
|
|
+ [TriggerDefine.EQUIP_REFINEMENT] = HonorJourneyTask_EvnentCommon,
|
|
|
+ [TriggerDefine.HUMAN_LV_UP] = HonorJourneyTask_LvChange,
|
|
|
+ [TriggerDefine.REALM_UPGRADE] = HonorJourneyTask_JingjieLvChange,
|
|
|
+ [TriggerDefine.YJTREASURE_PASS_LEVEL] = HonorJourneyTask_ItemActivate,
|
|
|
+ [TriggerDefine.MIBAO_ACTIVATE] = HonorJourneyTask_ItemActivate,
|
|
|
+ [TriggerDefine.YIWU_ACTIVATE] = HonorJourneyTask_ItemActivate,
|
|
|
+ [TriggerDefine.ZHONGZU_LEVEL] = HonorJourneyTask_ItemActivate,
|
|
|
+ [TriggerDefine.MIBAO_ALLSTAR] = HonorJourneyTask_EvnentCommon,
|
|
|
+ [TriggerDefine.YIWU_ALLSTAR] = HonorJourneyTask_EvnentCommon,
|
|
|
}
|
|
|
end
|
|
|
|
|
|
@@ -748,6 +852,26 @@ local function HonorJourney_OnLoginSubEvent(human)
|
|
|
HonorJourney_SubEvent(uuid, TriggerDefine.FUWEN_GETQUALITY)
|
|
|
HonorJourney_SubEvent(uuid, TriggerDefine.EQUIP_GETQUALITY)
|
|
|
HonorJourney_SubEvent(uuid, TriggerDefine.EVENT_TYPE_SWEEP)
|
|
|
+ -- 符文重铸次数
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.FUWEN_RESET)
|
|
|
+ -- 装备洗练
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.EQUIP_REFINEMENT)
|
|
|
+ -- 境界提升
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.REALM_UPGRADE)
|
|
|
+ -- 遗迹探险层数
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.YJTREASURE_PASS_LEVEL)
|
|
|
+ -- 秘宝激活
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.MIBAO_ACTIVATE)
|
|
|
+ -- 遗物激活
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.YIWU_ACTIVATE)
|
|
|
+ -- 种族试炼
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.ZHONGZU_LEVEL)
|
|
|
+ -- 等级提升
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.HUMAN_LV_UP)
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.MIBAO_ALLSTAR)
|
|
|
+ HonorJourney_SubEvent(uuid, TriggerDefine.YIWU_ALLSTAR)
|
|
|
+
|
|
|
+
|
|
|
end
|
|
|
|
|
|
-- 回调,增加次数
|