Commit 889380fda8d8910c7965f37eb84b1035e77b8f5f
Merge branch 'cn/develop' into cn/publish/preview
Showing
3 changed files
with
18 additions
and
20 deletions
Show diff stats
src/actions/HeroAction.lua
| ... | ... | @@ -153,7 +153,8 @@ function _M.wakeRpc(agent, data) |
| 153 | 153 | end |
| 154 | 154 | |
| 155 | 155 | if curLevel >= 4 then --自动觉醒技能 |
| 156 | - hero:increGeniusTree() | |
| 156 | + local new = hero:increGeniusTree() | |
| 157 | + hero:updateProperty({field = "genius", value = new}) | |
| 157 | 158 | end |
| 158 | 159 | hero:mylog({desc = "wake", int1 = hero:getProperty("wakeL")}) |
| 159 | 160 | |
| ... | ... | @@ -556,8 +557,10 @@ function _M.referRunesRpc(agent, data) |
| 556 | 557 | end |
| 557 | 558 | end |
| 558 | 559 | |
| 560 | + local roleId = role:getProperty("id") | |
| 559 | 561 | for cheroId, cIds in pairs(used) do |
| 560 | - local chero = role.heros[cheroId] | |
| 562 | + local heroId = cheroId % (roleId * MAX_HERO_NUM) | |
| 563 | + local chero = role.heros[heroId] | |
| 561 | 564 | local hrunes = chero:getProperty("rune") |
| 562 | 565 | for slot, rId in pairs(hrunes:toNumMap()) do |
| 563 | 566 | if cIds[rId] then |
| ... | ... | @@ -1303,7 +1306,7 @@ function _M.saveGeniusTreeRpc(agent, data) |
| 1303 | 1306 | |
| 1304 | 1307 | if not hero then print("hero is nil") return 0 end |
| 1305 | 1308 | |
| 1306 | - if wakeL > hero:getProperty("wakeL") then return 1 end | |
| 1309 | + if wakeL and wakeL > hero:getProperty("wakeL") then return 1 end | |
| 1307 | 1310 | |
| 1308 | 1311 | local genius = hero:saveGeniusTree(wakeL, awake) |
| 1309 | 1312 | if #genius == 0 then | ... | ... |
src/actions/RoleAction.lua
| ... | ... | @@ -1063,7 +1063,7 @@ function _M.achiveRpc(agent, data) |
| 1063 | 1063 | if preMaxCount < pData.request and overCount >= pData.request then |
| 1064 | 1064 | role:sendMail(101, skynet.timex(), pData.reward, {pData.level}) |
| 1065 | 1065 | flag = true |
| 1066 | - role:mylog("role_action", {desc="fux", int1=pdata.level}) | |
| 1066 | + role:mylog("role_action", {desc="fux", int1=pData.level}) | |
| 1067 | 1067 | end |
| 1068 | 1068 | end |
| 1069 | 1069 | if flag then |
| ... | ... | @@ -1391,24 +1391,19 @@ function _M.goldBuyRpc(agent, data) |
| 1391 | 1391 | if costD ~= 0 and not role:checkItemEnough({[ItemId.Jade] = costD}) then |
| 1392 | 1392 | return 2 |
| 1393 | 1393 | end |
| 1394 | + | |
| 1395 | + --特权卡倍数 | |
| 1394 | 1396 | local goldC = 0 |
| 1395 | - local hangPass = role:getProperty("hangPass") | |
| 1396 | - for i = 1, 3 do | |
| 1397 | - if hangPass[i] then | |
| 1398 | - local carbonData = csvdb["idle_battleCsv"][hangPass[i]] | |
| 1399 | - goldC = math.max(goldC, carbonData.money * globalCsv.idle_quickMoney_effect) | |
| 1400 | - end | |
| 1401 | - end | |
| 1402 | - local carbonId = role:getProperty("hangInfo").carbonId | |
| 1403 | - if carbonId then | |
| 1404 | - local carbonData = csvdb["idle_battleCsv"][carbonId] | |
| 1405 | - goldC = math.max(goldC, carbonData.money * globalCsv.idle_quickMoney_effect) | |
| 1406 | - end | |
| 1407 | - if goldC == 0 then | |
| 1397 | + local multiple = role.storeData:getGearExchangeCoef() | |
| 1398 | + | |
| 1399 | + local hangInfo = role:getProperty("hangInfo") | |
| 1400 | + local expCarbon_Data = hangInfo.expData or globalCsv.oriCarbonData | |
| 1401 | + goldC = expCarbon_Data.money * globalCsv.idle_quickMoney_effect * multiple | |
| 1402 | + | |
| 1403 | + if goldC == 0 then | |
| 1408 | 1404 | return 3 |
| 1409 | 1405 | end |
| 1410 | - local coef = role.storeData:getGearExchangeCoef() | |
| 1411 | - goldC = goldC * coef | |
| 1406 | + | |
| 1412 | 1407 | role.dailyData:updateProperty({field = "goldBuyT", value = curT + 1}) |
| 1413 | 1408 | role:costItems({[ItemId.Jade] = costD}, {log = {desc = "goldBuy"}}) |
| 1414 | 1409 | local reward, change = role:award({[ItemId.Gold] = math.floor(goldC)}, {log = {desc = "goldBuy"}}) | ... | ... |
src/models/Store.lua
| ... | ... | @@ -301,7 +301,7 @@ function Store:onBuyCard(type, duration, id, actid) |
| 301 | 301 | actData["unlock"] = 1 |
| 302 | 302 | if actCfg.condition ~= 0 then |
| 303 | 303 | actData["lvl"] = (actData["lvl"] or 0) + actCfg.condition |
| 304 | - role:mylog("act_action", {desc="buyBcLvl", int1=actCfg.condition, int2=actData["lvl"]}) | |
| 304 | + self.owner:mylog("act_action", {desc="buyBcLvl", int1=actCfg.condition, int2=actData["lvl"]}) | |
| 305 | 305 | end |
| 306 | 306 | self.owner:mylog("act_action", {desc="buyBc", int1=id, int2=actData["lvl"] or 0}) |
| 307 | 307 | self.owner.activity:updateActData("BattleCommand", actData) | ... | ... |