|
|
@@ -142,6 +142,19 @@ local function sendjumpinfo(human)
|
|
|
Msg.send(tMsgData, human.fd)
|
|
|
end
|
|
|
|
|
|
+
|
|
|
+local createRoleAwardArr = { {1203,1}, {118,10}, {101,5000000}, {112,1000} }
|
|
|
+local function sendCreateRoleAWard(human)
|
|
|
+ local tMsgData = Msg.gc.GC_GUIDE_CTRATE_AWARD
|
|
|
+ tMsgData.awardArr[0] = #createRoleAwardArr
|
|
|
+
|
|
|
+ for i, itemInfo in ipairs(createRoleAwardArr) do
|
|
|
+ Grid.makeItem(tMsgData.awardArr[i], itemInfo[1], itemInfo[2])
|
|
|
+ end
|
|
|
+
|
|
|
+ Msg.send(tMsgData, human.fd)
|
|
|
+end
|
|
|
+
|
|
|
------------------------------ data --------------------------------------
|
|
|
|
|
|
-- 设置指引
|
|
|
@@ -743,18 +756,61 @@ function stepFinish(human, sid, noSend)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
- if sid == GUIDEID_SPECIALSID then
|
|
|
- sendjumpinfo(human)
|
|
|
+ if sid == GUIDEID_SPECIALSID and (not human.db.getCreateRoleAward or not human.db.bGetJumpPrize ) then
|
|
|
+ if not human.db.getCreateRoleAward then
|
|
|
+ sendCreateRoleAWard(human)
|
|
|
+ else
|
|
|
+ sendjumpinfo(human)
|
|
|
+ end
|
|
|
else
|
|
|
refreshGuide(human)
|
|
|
sendStep(human)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+local function isShowCreateAward(human)
|
|
|
+ local id = getGuideID(human)
|
|
|
+ local state = getGuideState(human)
|
|
|
+ local isIn103Step = false
|
|
|
+ if id and state == STATE_DOING then
|
|
|
+ local cf = GuideExcel.main_guide[id]
|
|
|
+ if cf and cf.guideList then
|
|
|
+ local currentStep = getGuideStep(human)
|
|
|
+ local currentSid = cf.guideList[currentStep + 1]
|
|
|
+ if id == 100 and (not human.db.getCreateRoleAward or not human.db.bGetJumpPrize) then
|
|
|
+ isIn103Step = true
|
|
|
+ end
|
|
|
+
|
|
|
+ -- if currentSid == GUIDEID_SPECIALSID then
|
|
|
+ -- isIn103Step = true
|
|
|
+ -- if not human.db.getCreateRoleAward then
|
|
|
+ -- sendCreateRoleAWard(human)
|
|
|
+ -- else
|
|
|
+ -- sendjumpinfo(human)
|
|
|
+ -- end
|
|
|
+ -- end
|
|
|
+ end
|
|
|
+ end
|
|
|
+ return isIn103Step
|
|
|
+end
|
|
|
+
|
|
|
-- 登录回调
|
|
|
function onLogin(human)
|
|
|
- skipGuide(human)
|
|
|
- refreshGuide(human, true)
|
|
|
+ local isIn103Step = isShowCreateAward(human)
|
|
|
+
|
|
|
+ -- 过了领取创角奖励和问卷调查这两个步骤后才执行跳过逻辑
|
|
|
+ if not isIn103Step then
|
|
|
+ skipGuide(human)
|
|
|
+ refreshGuide(human, true)
|
|
|
+ else
|
|
|
+ if not human.db.getCreateRoleAward then
|
|
|
+ return sendCreateRoleAWard(human)
|
|
|
+ else
|
|
|
+ if not human.db.bGetJumpPrize then
|
|
|
+ return sendjumpinfo(human)
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
if getGuideState(human) == STATE_DOING then
|
|
|
setLoginStep(human, getGuideID(human))
|
|
|
sendStep(human)
|
|
|
@@ -948,4 +1004,21 @@ function stepwenjuanchose(human, szChoseID)
|
|
|
refreshGuide(human)
|
|
|
sendStep(human)
|
|
|
end
|
|
|
+end
|
|
|
+
|
|
|
+
|
|
|
+-- 领取创角奖励
|
|
|
+function GetCreateRoleAward(human)
|
|
|
+ if not human.db.getCreateRoleAward then
|
|
|
+ local itemArr = {}
|
|
|
+ for i, itemInfo in ipairs(createRoleAwardArr) do
|
|
|
+ itemArr[i] = {itemInfo[1], itemInfo[2]}
|
|
|
+ end
|
|
|
+
|
|
|
+ BagLogic.addItemList(human, itemArr, "guide")
|
|
|
+
|
|
|
+ human.db.getCreateRoleAward = true
|
|
|
+ end
|
|
|
+
|
|
|
+ sendjumpinfo(human)
|
|
|
end
|