Commit 7b813e21a6f2bd063b88178f44b4e9de3fac2d79

Authored by 熊润斐
2 parents a167daa2 02638b3d

Merge branch 'cn/develop' into cn/publish/preview

@@ -155,6 +155,23 @@ TimeReset = { @@ -155,6 +155,23 @@ TimeReset = {
155 DrawType3 = 19, -- 魔法 抽卡加成 155 DrawType3 = 19, -- 魔法 抽卡加成
156 } 156 }
157 157
  158 +-- TimeReset 索引数组
  159 +TimeResetArray = {
  160 + "CrossDay", --通用跨天
  161 + "CrossWeek", --通用跨周
  162 + "DinerRank", -- 餐厅排行榜
  163 + "PvpRank", -- pvp排行榜
  164 + "PvpHight", --高级竞技场
  165 + "PvpCross", -- 跨服竞技场
  166 + "PvpShop", -- 竞技场商城
  167 + "DailyBattle2", -- 特殊-每日副本(贴纸)
  168 + "DailyBattle1", -- 特殊-每日副本(装备)
  169 + "DailyBattle3", -- 特殊-每日副本(时钟箱)
  170 + "DrawType1", -- 变异 抽卡加成
  171 + "DrawType2", -- 通常 抽卡加成
  172 + "DrawType3", -- 魔法 抽卡加成
  173 +}
  174 +
158 GuideStep = { 175 GuideStep = {
159 AdvGuide = 41, 176 AdvGuide = 41,
160 AdvRelay = 42, 177 AdvRelay = 42,
@@ -327,6 +344,7 @@ MailId = { @@ -327,6 +344,7 @@ MailId = {
327 CBBackAward = 243, 344 CBBackAward = 243,
328 CBBackAward2 = 244, 345 CBBackAward2 = 244,
329 ActivityPoolRet = 280, 346 ActivityPoolRet = 280,
  347 + MyCardBuy = 300,
330 } 348 }
331 349
332 TriggerEventType = { 350 TriggerEventType = {
@@ -1587,7 +1587,7 @@ local function doChooseEffect(self, effectStr, room, block, tag, chooseData) @@ -1587,7 +1587,7 @@ local function doChooseEffect(self, effectStr, room, block, tag, chooseData)
1587 for _, v in ipairs(diceCsv) do 1587 for _, v in ipairs(diceCsv) do
1588 local status, okCount = checkChooseCondFunc(self, v.cond, room, block, tag .. " dice", chooseData) 1588 local status, okCount = checkChooseCondFunc(self, v.cond, room, block, tag .. " dice", chooseData)
1589 pool[#pool + 1] = v.weight + okCount * v.weightUp 1589 pool[#pool + 1] = v.weight + okCount * v.weightUp
1590 - sum = sum + pool[#pool + 1] 1590 + sum = sum + pool[#pool]
1591 if sum >= weight and not needEffect then 1591 if sum >= weight and not needEffect then
1592 -- 达成效果 1592 -- 达成效果
1593 needEffect = v.effect 1593 needEffect = v.effect
@@ -1613,7 +1613,8 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) @@ -1613,7 +1613,8 @@ local function chooseCommon(self, room, block, chooseData, choose, tag)
1613 if not chooseData or not chooseData["button".. choose .."cond"] then return end 1613 if not chooseData or not chooseData["button".. choose .."cond"] then return end
1614 if not checkChooseCondFunc(self, chooseData["button".. choose .."cond"], room, block, tag, chooseData) then return end 1614 if not checkChooseCondFunc(self, chooseData["button".. choose .."cond"], room, block, tag, chooseData) then return end
1615 local clearBlock = chooseData.keep ~= 1 1615 local clearBlock = chooseData.keep ~= 1
1616 - clearBlock = clearBlock and doChooseEffect(self, chooseData["button".. choose .."effect"], room, block, tag, chooseData) 1616 + local clearBlock_ = doChooseEffect(self, chooseData["button".. choose .."effect"], room, block, tag, chooseData)
  1617 + clearBlock = clearBlock and clearBlock_
1617 self:scoreChange(AdvScoreType.Event, chooseData.advScore) --增加加分 1618 self:scoreChange(AdvScoreType.Event, chooseData.advScore) --增加加分
1618 return true, clearBlock 1619 return true, clearBlock
1619 end 1620 end
1 -Subproject commit 5c618b16315e74aaa111b3e84dbc4da3f7b3d699 1 +Subproject commit b86293f02222b1fbd499e57de9ead6cbd6e0d736
src/models/Activity.lua
@@ -717,8 +717,8 @@ function Activity:closeActivity(actId, notify, notUpdateAct) @@ -717,8 +717,8 @@ function Activity:closeActivity(actId, notify, notUpdateAct)
717 local actType = actData.showType 717 local actType = actData.showType
718 if activityFunc[actType] and activityFunc[actType]['close'] then 718 if activityFunc[actType] and activityFunc[actType]['close'] then
719 activityFunc[actType]["close"](self, actType, notify, actId) 719 activityFunc[actType]["close"](self, actType, notify, actId)
720 - self:recycleActItem(actId)  
721 end 720 end
  721 + self:recycleActItem(actId)
722 if Activity.schema["act".. actType] then 722 if Activity.schema["act".. actType] then
723 if not Activity.schema["act" .. actType][3] then 723 if not Activity.schema["act" .. actType][3] then
724 self:updateActData(actType, Activity.schema["act" .. actType][2], not notify or notUpdateAct) 724 self:updateActData(actType, Activity.schema["act" .. actType][2], not notify or notUpdateAct)
@@ -1001,6 +1001,8 @@ activityFunc[Activity.ActivityType.CommonSignIn] = { @@ -1001,6 +1001,8 @@ activityFunc[Activity.ActivityType.CommonSignIn] = {
1001 if not isCrossDay then 1001 if not isCrossDay then
1002 activityFunc[Activity.ActivityType.CommonSignIn]["crossDay"](self, actType, notify, actId) 1002 activityFunc[Activity.ActivityType.CommonSignIn]["crossDay"](self, actType, notify, actId)
1003 end 1003 end
  1004 + local taskStatus = self.owner:getProperty("dTask")
  1005 + activityFunc[Activity.ActivityType.CommonSignIn]["check"](self, actType, notify, 0, (taskStatus["a"] or 0))
1004 end, 1006 end,
1005 ["crossDay"] = function(self, actType, notify, actId) 1007 ["crossDay"] = function(self, actType, notify, actId)
1006 local actCfg = csvdb["activity_ctrlCsv"][actId] 1008 local actCfg = csvdb["activity_ctrlCsv"][actId]
src/models/Diner.lua
@@ -201,7 +201,7 @@ function Diner:calSellReward(sell, delta, dishData) @@ -201,7 +201,7 @@ function Diner:calSellReward(sell, delta, dishData)
201 upValue[ItemId.Gold] = (upValue[ItemId.Gold] or 0) + buildData.gold_up 201 upValue[ItemId.Gold] = (upValue[ItemId.Gold] or 0) + buildData.gold_up
202 end 202 end
203 if buildData.item_up > 0 then 203 if buildData.item_up > 0 then
204 - upValue[ItemId.DinerCoin] = (upValue[ItemId.DinerCoin] or 0) + buildData.gold_up 204 + upValue[ItemId.DinerCoin] = (upValue[ItemId.DinerCoin] or 0) + buildData.item_up
205 end 205 end
206 if buildData and buildData.famous_up > 0 then 206 if buildData and buildData.famous_up > 0 then
207 upValue[-1] = (upValue[-1] or 0) + buildData.famous_up 207 upValue[-1] = (upValue[-1] or 0) + buildData.famous_up
src/models/RolePlugin.lua
@@ -1698,7 +1698,7 @@ function RolePlugin.bind(Role) @@ -1698,7 +1698,7 @@ function RolePlugin.bind(Role)
1698 for k , v in pairs(csvdb["shop_rechargeCsv"]) do 1698 for k , v in pairs(csvdb["shop_rechargeCsv"]) do
1699 if not v[pidField] then return "no product" end 1699 if not v[pidField] then return "no product" end
1700 if v[pidField] == params.product_id then 1700 if v[pidField] == params.product_id then
1701 - if v.twd ~= tonumber(params.money) then 1701 + if v.twd * 100 ~= tonumber(params.money) then
1702 return "error money" 1702 return "error money"
1703 end 1703 end
1704 -- 发现需要的id 1704 -- 发现需要的id
@@ -1823,7 +1823,7 @@ function RolePlugin.bind(Role) @@ -1823,7 +1823,7 @@ function RolePlugin.bind(Role)
1823 -- 充值 -- 1823 -- 充值 --
1824 --[[ 1824 --[[
1825 request.order = data.out_trade_no 1825 request.order = data.out_trade_no
1826 - request.amount = data.money / 100 1826 + request.amount = data.money
1827 request.game_money = data.game_money 1827 request.game_money = data.game_money
1828 request.product_id = data.product_id 1828 request.product_id = data.product_id
1829 request.pay_time = data.pay_time 1829 request.pay_time = data.pay_time
@@ -1845,7 +1845,7 @@ function RolePlugin.bind(Role) @@ -1845,7 +1845,7 @@ function RolePlugin.bind(Role)
1845 end 1845 end
1846 local rechargeId = back 1846 local rechargeId = back
1847 local rechargeData = csvdb["shop_rechargeCsv"][rechargeId] 1847 local rechargeData = csvdb["shop_rechargeCsv"][rechargeId]
1848 - if (params.is_mycard and rechargeData.twd ~= tonumber(params.amount)) or (not params.is_mycard and rechargeData.rmb ~= tonumber(params.amount)) then 1848 + if (params.is_mycard and rechargeData.twd * 100 ~= tonumber(params.amount)) or (not params.is_mycard and rechargeData.rmb * 100 ~= tonumber(params.amount)) then
1849 skynet.error(string.format("[recharge] fake order: %s, roleId: %d, order: %s, rmb %s, get %s", 1849 skynet.error(string.format("[recharge] fake order: %s, roleId: %d, order: %s, rmb %s, get %s",
1850 params.transactionId, roleId, partnerOrderStr, rechargeData.rmb, params.amount 1850 params.transactionId, roleId, partnerOrderStr, rechargeData.rmb, params.amount
1851 )) 1851 ))
@@ -1861,8 +1861,7 @@ function RolePlugin.bind(Role) @@ -1861,8 +1861,7 @@ function RolePlugin.bind(Role)
1861 1861
1862 if not status then 1862 if not status then
1863 if params.extension_info == "mycard_web" then 1863 if params.extension_info == "mycard_web" then
1864 - -- todo 发邮件  
1865 - skynet.error("mycard_web " .. params.order) 1864 + self:sendMail(MailId.MyCardBuy, nil, nil, {rechargeId})
1866 end 1865 end
1867 SendPacket(actionCodes.Store_ayncPurchaseRpc, MsgPack.pack({ order = partnerOrderStr, 1866 SendPacket(actionCodes.Store_ayncPurchaseRpc, MsgPack.pack({ order = partnerOrderStr,
1868 result = "success", reward = reward})) 1867 result = "success", reward = reward}))
src/models/RoleTimeReset.lua
@@ -84,10 +84,14 @@ function Role:updateTimeReset(now, notify) @@ -84,10 +84,14 @@ function Role:updateTimeReset(now, notify)
84 local resetMode = {} 84 local resetMode = {}
85 85
86 local response = {} 86 local response = {}
87 - for funcName, resetId in pairs(TimeReset) do  
88 - if needResetId[resetId] and ResetFunc[funcName] then  
89 - ResetFunc[funcName](self, notify, response, now)  
90 - resetMode[funcName] = true 87 + for idx = 1, #TimeResetArray do
  88 + local funcName = TimeResetArray[idx]
  89 + local resetId = TimeReset[funcName]
  90 + if resetId then
  91 + if needResetId[resetId] and ResetFunc[funcName] then
  92 + ResetFunc[funcName](self, notify, response, now)
  93 + resetMode[funcName] = true
  94 + end
91 end 95 end
92 end 96 end
93 97