Commit 12a26adef7d2ac42fd6e4c073de10001f77705ff
Merge branch 'tr/bugfix-qa' into tr/develop
* tr/bugfix-qa: 拾荒随机 错误 金额使用 乘以 100 的方式 mycard twd 反回 的是twd 战令-一次性领取超出周上限的战令经验应该只领取到达周上限的那一部分 战令奖励错位 战令活动购买等级扣除钻石bug 代理拾荒出勤人数计数错误, 代理拾荒没有统计进拾荒体力消耗 httpweb 美食币计算错误 开启x品质时钟箱任务计数错误bug 活动任务数据重置 活动结束回收邮件
Showing
9 changed files
with
30 additions
and
18 deletions
Show diff stats
src/actions/ActivityAction.lua
| @@ -1237,10 +1237,10 @@ function _M.battleCommandRpc(agent, data) | @@ -1237,10 +1237,10 @@ function _M.battleCommandRpc(agent, data) | ||
| 1237 | local awd = "" | 1237 | local awd = "" |
| 1238 | if pay then | 1238 | if pay then |
| 1239 | actData["payR"] = record | 1239 | actData["payR"] = record |
| 1240 | - awd = bpCfg["rewardNormal"] | 1240 | + awd = bpCfg["rewardHigh"] |
| 1241 | else | 1241 | else |
| 1242 | actData["freeR"] = record | 1242 | actData["freeR"] = record |
| 1243 | - awd = bpCfg["rewardHigh"] | 1243 | + awd = bpCfg["rewardNormal"] |
| 1244 | end | 1244 | end |
| 1245 | for k, v in pairs(awd:toNumMap()) do | 1245 | for k, v in pairs(awd:toNumMap()) do |
| 1246 | award[k] = (award[k] or 0) + v | 1246 | award[k] = (award[k] or 0) + v |
| @@ -1279,6 +1279,7 @@ function _M.buyBattleCommandLvlRpc(agent, data) | @@ -1279,6 +1279,7 @@ function _M.buyBattleCommandLvlRpc(agent, data) | ||
| 1279 | local cfg = bpCfg[i] | 1279 | local cfg = bpCfg[i] |
| 1280 | if cfg["type"] > curLvl and cfg["type"] <= nextLvl then | 1280 | if cfg["type"] > curLvl and cfg["type"] <= nextLvl then |
| 1281 | cost = cost + cfg["cost"] | 1281 | cost = cost + cfg["cost"] |
| 1282 | + elseif cfg["type"] > nextLvl then | ||
| 1282 | break | 1283 | break |
| 1283 | end | 1284 | end |
| 1284 | end | 1285 | end |
src/actions/AdvAction.lua
| @@ -291,6 +291,8 @@ function _M.startHangRpc(agent, data) | @@ -291,6 +291,8 @@ function _M.startHangRpc(agent, data) | ||
| 291 | 291 | ||
| 292 | if not role:checkAdvCount(adv_idle_energy) then return 7 end -- 是否有体力 | 292 | if not role:checkAdvCount(adv_idle_energy) then return 7 end -- 是否有体力 |
| 293 | 293 | ||
| 294 | + role:checkTaskEnter("AdvCostPower", {count = adv_idle_energy}) | ||
| 295 | + | ||
| 294 | if not checkFormat(role, format, role:getAdvData():isRunning()) then return 8 end --编队是否正确 | 296 | if not checkFormat(role, format, role:getAdvData():isRunning()) then return 8 end --编队是否正确 |
| 295 | 297 | ||
| 296 | local player = {} | 298 | local player = {} |
src/actions/HttpAction.lua
| @@ -151,7 +151,7 @@ function _M.query_role(query) | @@ -151,7 +151,7 @@ function _M.query_role(query) | ||
| 151 | if not query.uid then return "not found" end | 151 | if not query.uid then return "not found" end |
| 152 | local user = redisproxy:get(string.format("uid:%s", query.uid)) | 152 | local user = redisproxy:get(string.format("uid:%s", query.uid)) |
| 153 | if not user then return "not found" end | 153 | if not user then return "not found" end |
| 154 | - local roleId = redisproxy:get(string_format("user:%s", string.upper(user))) | 154 | + local roleId = redisproxy:get(string.format("user:%s", string.upper(user))) |
| 155 | if not roleId then return "not found" end | 155 | if not roleId then return "not found" end |
| 156 | return json.encode({roleId, user}) | 156 | return json.encode({roleId, user}) |
| 157 | end | 157 | end |
src/models/Activity.lua
| @@ -473,6 +473,7 @@ activityFunc[Activity.ActivityType.CalendaTask] = { | @@ -473,6 +473,7 @@ activityFunc[Activity.ActivityType.CalendaTask] = { | ||
| 473 | ["init"] = function(self, actType, isCrossDay, notify) | 473 | ["init"] = function(self, actType, isCrossDay, notify) |
| 474 | local calTask = self.owner:getProperty("calTask") | 474 | local calTask = self.owner:getProperty("calTask") |
| 475 | calTask = {} | 475 | calTask = {} |
| 476 | + self.owner:updateProperty({field="calTask", value=calTask}) | ||
| 476 | local role = self.owner | 477 | local role = self.owner |
| 477 | local buildL = role.dinerData:getProperty("buildL") | 478 | local buildL = role.dinerData:getProperty("buildL") |
| 478 | local curLevel = buildL:getv(1, 1) | 479 | local curLevel = buildL:getv(1, 1) |
| @@ -540,6 +541,7 @@ activityFunc[Activity.ActivityType.BattleCommandTask] = { | @@ -540,6 +541,7 @@ activityFunc[Activity.ActivityType.BattleCommandTask] = { | ||
| 540 | ["init"] = function(self, actType, isCrossDay, notify) | 541 | ["init"] = function(self, actType, isCrossDay, notify) |
| 541 | local bcTask = self.owner:getProperty("bcTask") | 542 | local bcTask = self.owner:getProperty("bcTask") |
| 542 | bcTask = {} | 543 | bcTask = {} |
| 544 | + self.owner:updateProperty({field="bcTask", value=bcTask}) | ||
| 543 | local role = self.owner | 545 | local role = self.owner |
| 544 | local buildL = role.dinerData:getProperty("buildL") | 546 | local buildL = role.dinerData:getProperty("buildL") |
| 545 | local curLevel = buildL:getv(1, 1) | 547 | local curLevel = buildL:getv(1, 1) |
| @@ -715,8 +717,8 @@ function Activity:closeActivity(actId, notify, notUpdateAct) | @@ -715,8 +717,8 @@ function Activity:closeActivity(actId, notify, notUpdateAct) | ||
| 715 | local actType = actData.showType | 717 | local actType = actData.showType |
| 716 | if activityFunc[actType] and activityFunc[actType]['close'] then | 718 | if activityFunc[actType] and activityFunc[actType]['close'] then |
| 717 | activityFunc[actType]["close"](self, actType, notify, actId) | 719 | activityFunc[actType]["close"](self, actType, notify, actId) |
| 718 | - self:recycleActItem(actId) | ||
| 719 | end | 720 | end |
| 721 | + self:recycleActItem(actId) | ||
| 720 | if Activity.schema["act".. actType] then | 722 | if Activity.schema["act".. actType] then |
| 721 | if not Activity.schema["act" .. actType][3] then | 723 | if not Activity.schema["act" .. actType][3] then |
| 722 | 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) |
| @@ -1003,7 +1005,7 @@ activityFunc[Activity.ActivityType.CommonSignIn] = { | @@ -1003,7 +1005,7 @@ activityFunc[Activity.ActivityType.CommonSignIn] = { | ||
| 1003 | ["crossDay"] = function(self, actType, notify, actId) | 1005 | ["crossDay"] = function(self, actType, notify, actId) |
| 1004 | local actCfg = csvdb["activity_ctrlCsv"][actId] | 1006 | local actCfg = csvdb["activity_ctrlCsv"][actId] |
| 1005 | if not actCfg then return end | 1007 | if not actCfg then return end |
| 1006 | - local conArr = actCfg.condition2:toArray("true", "=") | 1008 | + local conArr = actCfg.condition2:toArray(true, "=") |
| 1007 | -- 0 登录即可, 1 达到指定活跃度 | 1009 | -- 0 登录即可, 1 达到指定活跃度 |
| 1008 | if conArr[1] ~= 0 then | 1010 | if conArr[1] ~= 0 then |
| 1009 | return | 1011 | return |
| @@ -1042,12 +1044,16 @@ activityFunc[Activity.ActivityType.BattleCommand] = { | @@ -1042,12 +1044,16 @@ activityFunc[Activity.ActivityType.BattleCommand] = { | ||
| 1042 | if not actCfg then return end | 1044 | if not actCfg then return end |
| 1043 | if actCfg.condition1 == "" then return end | 1045 | if actCfg.condition1 == "" then return end |
| 1044 | local arr = actCfg.condition2:toArray(true, "=") | 1046 | local arr = actCfg.condition2:toArray(true, "=") |
| 1045 | - local itemId, limit = arr[1], arr[2] | ||
| 1046 | - if itemId == id and count > 0 then | ||
| 1047 | - if (actData["week"] or 0) >= limit then | ||
| 1048 | - return | 1047 | + local itemIdWeek, itemIdNormal, limit = arr[1], arr[2], arr[3] |
| 1048 | + if (itemIdWeek == id or itemIdNormal == id) and count > 0 then | ||
| 1049 | + if itemIdWeek == id then | ||
| 1050 | + if (actData["week"] or 0) >= limit then | ||
| 1051 | + return | ||
| 1052 | + end | ||
| 1053 | + local old = actData["week"] or 0 | ||
| 1054 | + actData["week"] = math.min(old + count, limit) | ||
| 1055 | + count = actData["week"] - old | ||
| 1049 | end | 1056 | end |
| 1050 | - actData["week"] = (actData["week"] or 0) + count | ||
| 1051 | local total = actData["sum"] + count | 1057 | local total = actData["sum"] + count |
| 1052 | local curLvl = actData["lvl"] or 0 | 1058 | local curLvl = actData["lvl"] or 0 |
| 1053 | if actCfg.condition == 1 then -- 代表sum需要转换为等级 | 1059 | if actCfg.condition == 1 then -- 代表sum需要转换为等级 |
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.rmb ~= 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,12 +1823,13 @@ function RolePlugin.bind(Role) | @@ -1823,12 +1823,13 @@ 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 |
| 1830 | request.transactionId = data.order_no | 1830 | request.transactionId = data.order_no |
| 1831 | request.extension_info = data.extension_info | 1831 | request.extension_info = data.extension_info |
| 1832 | + request.is_mycard = 1 | ||
| 1832 | ]] | 1833 | ]] |
| 1833 | function Role:handlePurchase(params) | 1834 | function Role:handlePurchase(params) |
| 1834 | local roleId = self:getProperty("id") | 1835 | local roleId = self:getProperty("id") |
| @@ -1844,7 +1845,7 @@ function RolePlugin.bind(Role) | @@ -1844,7 +1845,7 @@ function RolePlugin.bind(Role) | ||
| 1844 | end | 1845 | end |
| 1845 | local rechargeId = back | 1846 | local rechargeId = back |
| 1846 | local rechargeData = csvdb["shop_rechargeCsv"][rechargeId] | 1847 | local rechargeData = csvdb["shop_rechargeCsv"][rechargeId] |
| 1847 | - if 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 |
| 1848 | 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", |
| 1849 | params.transactionId, roleId, partnerOrderStr, rechargeData.rmb, params.amount | 1850 | params.transactionId, roleId, partnerOrderStr, rechargeData.rmb, params.amount |
| 1850 | )) | 1851 | )) |
src/models/RoleTask.lua
| @@ -285,7 +285,7 @@ local CalendaTaskListener = { | @@ -285,7 +285,7 @@ local CalendaTaskListener = { | ||
| 285 | [TaskType.OpenBox]= {{20, 3, f("count"), f("quality")}}, | 285 | [TaskType.OpenBox]= {{20, 3, f("count"), f("quality")}}, |
| 286 | [TaskType.RadioTaskStart] = {{21, 1}, {22, 3, f("heroCnt")}}, | 286 | [TaskType.RadioTaskStart] = {{21, 1}, {22, 3, f("heroCnt")}}, |
| 287 | [TaskType.BonusQuick] = {{23, 1, f("count")}}, | 287 | [TaskType.BonusQuick] = {{23, 1, f("count")}}, |
| 288 | - [TaskType.AdvHangHeroCnt] = {{24, 3, f("HeroCnt")}}, | 288 | + [TaskType.AdvHangHeroCnt] = {{24, 3, f("count")}}, |
| 289 | [TaskType.AdvKillBoss] = {{25, 1}}, | 289 | [TaskType.AdvKillBoss] = {{25, 1}}, |
| 290 | [TaskType.AdvMineKill] = {{26, 1}}, | 290 | [TaskType.AdvMineKill] = {{26, 1}}, |
| 291 | [TaskType.PvpBattle] = {{27, 1}}, | 291 | [TaskType.PvpBattle] = {{27, 1}}, |
src/services/httpweb.lua
| @@ -41,8 +41,10 @@ local port = ... | @@ -41,8 +41,10 @@ local port = ... | ||
| 41 | port = tonumber(port) | 41 | port = tonumber(port) |
| 42 | 42 | ||
| 43 | local key = "zhaolu1234dangge" | 43 | local key = "zhaolu1234dangge" |
| 44 | -local function response(id, ...) | ||
| 45 | - local ok, err = httpd.write_response(sockethelper.writefunc(id), ...) | 44 | +local function response(id, code, body) |
| 45 | + local ok, err = httpd.write_response(sockethelper.writefunc(id), code, body, { | ||
| 46 | + ["Connection"] = "Close", | ||
| 47 | + }) | ||
| 46 | if not ok then | 48 | if not ok then |
| 47 | -- if err == sockethelper.socket_error , that means socket closed. | 49 | -- if err == sockethelper.socket_error , that means socket closed. |
| 48 | skynet.error(string.format("fd = %d, %s", id, err)) | 50 | skynet.error(string.format("fd = %d, %s", id, err)) |