Commit df7d10f7d5165fb3a0a4c83cf9d2dc88bc97165e

Authored by 测试
2 parents 43a6d57e 3fa17db7

Merge branch 'tr/develop' of 120.26.43.151:wasteland/server into tr/develop

src/actions/AdvAction.lua
@@ -133,6 +133,8 @@ function _M.startAdvRpc( agent, data ) @@ -133,6 +133,8 @@ function _M.startAdvRpc( agent, data )
133 133
134 local advPass = role:getProperty("advPass") 134 local advPass = role:getProperty("advPass")
135 135
  136 + if not checkFormat(role) then return 7 end
  137 +
136 if AdvCommon.isEndless(chapterId) then -- 无尽模式判断 138 if AdvCommon.isEndless(chapterId) then -- 无尽模式判断
137 139
138 if chapterId ~= role.advElChapter then return end -- 不是当前进行的章节 140 if chapterId ~= role.advElChapter then return end -- 不是当前进行的章节
@@ -149,37 +151,23 @@ function _M.startAdvRpc( agent, data ) @@ -149,37 +151,23 @@ function _M.startAdvRpc( agent, data )
149 if not relayData then return 14 end -- 不是中继层 151 if not relayData then return 14 end -- 不是中继层
150 if advElM < relayData.unlockfloor then return 15 end --未解锁 152 if advElM < relayData.unlockfloor then return 15 end --未解锁
151 end 153 end
  154 +
  155 + role.dailyData:updateProperty({field = "advElC", delta = 1})
152 else -- 普通模式判断 156 else -- 普通模式判断
153 - if not role:checkAdvCount(chapterData.limitlevel) then return 2 end -- 是否有体力  
154 if layer >= chapterData.limitlevel then return 4 end 157 if layer >= chapterData.limitlevel then return 4 end
155 - -- 关卡开放判断  
156 - if not role:advChapterIsOpen(chapterId) then return 5 end  
157 158
  159 + local relayData = role:getAdvData():isHaveRelay(layer, chapterId)
  160 + if not relayData then return 6 end -- 不是中继层
158 if layer ~= 1 then 161 if layer ~= 1 then
159 - local relayData = role:getAdvData():isHaveRelay(layer, chapterId)  
160 - if not relayData then return 6 end -- 不是中继层  
161 if (advPass[chapterId] or 0) < relayData.floor then return 21 end 162 if (advPass[chapterId] or 0) < relayData.floor then return 21 end
162 end 163 end
163 - end  
164 -  
165 - if not checkFormat(role) then return 7 end  
166 -  
167 - --local advTeam = role:getProperty("advTeam")  
168 - --table.clear(advTeam) 164 + if not role:checkAdvCount(relayData.supply) then return 2 end -- 是否有体力
  165 + -- 关卡开放判断
  166 + if not role:advChapterIsOpen(chapterId) then return 5 end
169 167
170 - --advTeam.heros = {}  
171 - --for slot, heroId in pairs(format.heros) do  
172 - -- advTeam.heros[slot] = heroId  
173 - --end  
174 - --advTeam.leader = format.leader  
175 - --advTeam.leader2 = format.leader2  
176 - --role:updateProperty({field = "advTeam", value = advTeam})  
177 - if AdvCommon.isEndless(chapterId) then  
178 - role.dailyData:updateProperty({field = "advElC", delta = 1})  
179 - else  
180 - role:changeAdvCount(chapterData.limitlevel) 168 + role:changeAdvCount(relayData.supply)
181 end 169 end
182 - 170 +
183 local support = {} -- 支援效果 171 local support = {} -- 支援效果
184 if AdvCommon.isEndless(chapterId) then 172 if AdvCommon.isEndless(chapterId) then
185 -- 选择的支援效果 173 -- 选择的支援效果
@@ -199,6 +187,7 @@ function _M.startAdvRpc( agent, data ) @@ -199,6 +187,7 @@ function _M.startAdvRpc( agent, data )
199 end 187 end
200 end 188 end
201 end 189 end
  190 +
202 role:getAdvData():initByChapter({ 191 role:getAdvData():initByChapter({
203 chapterId = chapterId, 192 chapterId = chapterId,
204 level = layer, 193 level = layer,
@@ -207,6 +196,7 @@ function _M.startAdvRpc( agent, data ) @@ -207,6 +196,7 @@ function _M.startAdvRpc( agent, data )
207 support = support, 196 support = support,
208 actid = actid 197 actid = actid
209 }) 198 })
  199 +
210 role:checkTaskEnter("AdvStart", {id = chapterId}) 200 role:checkTaskEnter("AdvStart", {id = chapterId})
211 role:checkTaskEnter("AdvStartSelf", {id = chapterId}) 201 role:checkTaskEnter("AdvStartSelf", {id = chapterId})
212 role:getAdvData():popBackEvents() -- 清一下事件 202 role:getAdvData():popBackEvents() -- 清一下事件
src/actions/DinerAction.lua
@@ -305,7 +305,7 @@ function _M.expediteSellRpc( agent, data ) @@ -305,7 +305,7 @@ function _M.expediteSellRpc( agent, data )
305 local gift = reward:toNumMap() 305 local gift = reward:toNumMap()
306 306
307 -- 特权卡获取加速获得额外道具 307 -- 特权卡获取加速获得额外道具
308 - local coef = role.storeData:getProduceItemSpeedCoef() 308 + local coef = 1 --role.storeData:getProduceItemSpeedCoef()
309 for k, v in pairs(gift) do 309 for k, v in pairs(gift) do
310 if coef > 1 then 310 if coef > 1 then
311 v = math.floor(v * coef) 311 v = math.floor(v * coef)
src/actions/EmailAction.lua
@@ -40,10 +40,17 @@ function _M.listRpc(agent, data) @@ -40,10 +40,17 @@ function _M.listRpc(agent, data)
40 local count = 1 40 local count = 1
41 for _, data in ipairs(result) do 41 for _, data in ipairs(result) do
42 local email = tarr2tab(data) 42 local email = tarr2tab(data)
43 - if tonum(email.createtime) > role:getProperty("ctime")  
44 - and ( not email.mid or tonum(email.mid) == mid ) 43 + -- 0 需要判斷創角時間小於郵件創建時間 1 只需要在時間段內登陸即可領取
  44 + local delayType = tonum(email.delayType)
  45 + local flag = false
  46 + if delayType == 1 then
  47 + flag = skynet.timex() > tonum(email.createtime)
  48 + else
  49 + flag = tonum(email.createtime) > role:getProperty("ctime")
  50 + end
  51 + if flag and ( not email.mid or tonum(email.mid) == mid )
45 and ( not email.endtime or tonum(email.endtime) > now )then 52 and ( not email.endtime or tonum(email.endtime) > now )then
46 - local time = math.max(tonum(email.timestamp, 0) or email.createtime) 53 + local time = math.max(tonum(email.timestamp, 0) , tonum(email.createtime))
47 redisproxy:insertEmail({ 54 redisproxy:insertEmail({
48 roleId = roleId, 55 roleId = roleId,
49 emailId = 0, 56 emailId = 0,
src/actions/HeroAction.lua
@@ -663,7 +663,8 @@ function _M.getResetRewardRpc(agent, data) @@ -663,7 +663,8 @@ function _M.getResetRewardRpc(agent, data)
663 663
664 while stage > 0 do 664 while stage > 0 do
665 local curData = csvdb["unit_talent_"..heroCfgId.."Csv"][stage] 665 local curData = csvdb["unit_talent_"..heroCfgId.."Csv"][stage]
666 - for lvl = 1, curTalentLvl - 1 do 666 + local offset = stage == talent:getv(0,1) and curTalentLvl - 1 or #curData
  667 + for lvl = 1, offset do
667 local talentData = curData[lvl] 668 local talentData = curData[lvl]
668 for itemId, count in pairs(talentData.money:toNumMap()) do 669 for itemId, count in pairs(talentData.money:toNumMap()) do
669 reward[itemId] = (reward[itemId] or 0) + count 670 reward[itemId] = (reward[itemId] or 0) + count
@@ -926,6 +927,7 @@ function _M.drawHeroRpc(agent, data) @@ -926,6 +927,7 @@ function _M.drawHeroRpc(agent, data)
926 local itemId = math.randWeight(resultPool, 1) 927 local itemId = math.randWeight(resultPool, 1)
927 if guideHero then 928 if guideHero then
928 itemId = guideHero 929 itemId = guideHero
  930 + guideHero = nil
929 end 931 end
930 932
931 local itemData = csvdb["itemCsv"][itemId] 933 local itemData = csvdb["itemCsv"][itemId]
src/actions/RoleAction.lua
@@ -586,9 +586,9 @@ function _M.openTimeBoxRpc(agent, data) @@ -586,9 +586,9 @@ function _M.openTimeBoxRpc(agent, data)
586 else 586 else
587 local oldId, process, time = boxL[slot].id, boxL[slot].process, boxL[slot].time 587 local oldId, process, time = boxL[slot].id, boxL[slot].process, boxL[slot].time
588 local unitTime = globalCsv.box_key_time[oldId] * 60 588 local unitTime = globalCsv.box_key_time[oldId] * 60
589 - local doneCnt = math.floor((process + skynet.timex() - time) / unitTime) 589 + local doneCnt = time == 0 and 0 or math.floor((process + skynet.timex() - time) / unitTime)
590 if doneCnt > 0 then 590 if doneCnt > 0 then
591 - reward = role:award({[oldId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot}}) 591 + reward = role:award({[oldId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}})
592 end 592 end
593 end 593 end
594 local limit = globalCsv.box_key_max[itemId] or 5 594 local limit = globalCsv.box_key_max[itemId] or 5
@@ -610,7 +610,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -610,7 +610,7 @@ function _M.openTimeBoxRpc(agent, data)
610 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") 610 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=")
611 local costKey = math.ceil((stopTime - nowTime) / (cost_pre[1] * 60)) * cost_pre[2] 611 local costKey = math.ceil((stopTime - nowTime) / (cost_pre[1] * 60)) * cost_pre[2]
612 if not role:checkItemEnough({[ItemId.Diamond] = costKey}) then return 5 end 612 if not role:checkItemEnough({[ItemId.Diamond] = costKey}) then return 5 end
613 - role:costItems({[ItemId.Diamond] = costKey}, {log = {desc = "openTimeBox", int1 = slot}}) 613 + role:costItems({[ItemId.Diamond] = costKey}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}})
614 else 614 else
615 stopTime = math.min(nowTime,time + globalCsv.box_productLine_time * 3600) 615 stopTime = math.min(nowTime,time + globalCsv.box_productLine_time * 3600)
616 end 616 end
@@ -618,7 +618,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -618,7 +618,7 @@ function _M.openTimeBoxRpc(agent, data)
618 618
619 local doneCnt = math.floor((process + stopTime - time) / unitTime) 619 local doneCnt = math.floor((process + stopTime - time) / unitTime)
620 if doneCnt > 0 then 620 if doneCnt > 0 then
621 - reward = role:award({[itemId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot}}) 621 + reward = role:award({[itemId] = doneCnt}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}})
622 end 622 end
623 if role:getItemCount(itemId) >= globalCsv.box_key_max[itemId] then 623 if role:getItemCount(itemId) >= globalCsv.box_key_max[itemId] then
624 nowTime = 0 624 nowTime = 0
@@ -687,7 +687,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -687,7 +687,7 @@ function _M.openTimeBoxRpc(agent, data)
687 reward[id] = (reward[id] or 0) + num 687 reward[id] = (reward[id] or 0) + num
688 end 688 end
689 end 689 end
690 - reward, change = role:award(reward, {log = {desc = "openTimeBox", int1 = costId}}) 690 + reward, change = role:award(reward, {log = {desc = "openTimeBox", int1 = costId, int2 = oper}})
691 else 691 else
692 return 692 return
693 end 693 end
src/models/Activity.lua
@@ -792,7 +792,7 @@ function Activity:recycleActItem(actId) @@ -792,7 +792,7 @@ function Activity:recycleActItem(actId)
792 local itemCount = role:getItemCount(fromId) 792 local itemCount = role:getItemCount(fromId)
793 if itemCount > 0 then 793 if itemCount > 0 then
794 costs[fromId] = (costs[fromId] or 0) + itemCount 794 costs[fromId] = (costs[fromId] or 0) + itemCount
795 - gift[toId] = toNum * itemCount 795 + gift[toId] = (gift[toId] or 0) + toNum * itemCount
796 end 796 end
797 end 797 end
798 if next(costs) then 798 if next(costs) then
src/models/RoleChangeStruct.lua
@@ -48,11 +48,29 @@ local bugFixSuduku = createVersionFunc(VersionType.DoOnly, function(role, params @@ -48,11 +48,29 @@ local bugFixSuduku = createVersionFunc(VersionType.DoOnly, function(role, params
48 end 48 end
49 end) 49 end)
50 50
  51 +local bugFixRune = createVersionFunc(VersionType.DoOnly, function(role, params)
  52 + local had = false
  53 + for id, rune in pairs(role.runeBag) do
  54 + if math.floor(rune:getProperty("id") / 1000) == 16 then
  55 + local attrs = rune:getProperty("attrs")
  56 + local atk = attrs:getv(2, 0)
  57 + if atk ~= 0 then
  58 + attrs = attrs:delk(2):setv(1, atk)
  59 + had = true
  60 + rune:setProperty("attrs",attrs)
  61 + end
  62 + end
  63 + end
  64 + if had then
  65 + -- 补偿
  66 + end
  67 +end)
51 ---------------------版本方法 end ---------------------- 68 ---------------------版本方法 end ----------------------
52 69
53 -- version 罗列start 70 -- version 罗列start
54 local versionList = {} -- version 列表 71 local versionList = {} -- version 列表
55 versionList[1] = {bugFixSuduku, {}} 72 versionList[1] = {bugFixSuduku, {}}
  73 +versionList[2] = {bugFixRune, {}}
56 -- versionList[2] = {clearActivity, {5, 7}} 74 -- versionList[2] = {clearActivity, {5, 7}}
57 -- versionList[3] = {changeStructF, "test1"} 75 -- versionList[3] = {changeStructF, "test1"}
58 -- versionList[4] = {changeStructF, "test2"} 76 -- versionList[4] = {changeStructF, "test2"}
src/models/RolePlugin.lua
@@ -1507,6 +1507,7 @@ function RolePlugin.bind(Role) @@ -1507,6 +1507,7 @@ function RolePlugin.bind(Role)
1507 return function (now, role) 1507 return function (now, role)
1508 if name == "email" and role.sendMailFlag then 1508 if name == "email" and role.sendMailFlag then
1509 last_breath = now + sec 1509 last_breath = now + sec
  1510 + role.sendMailFlag = false
1510 return true 1511 return true
1511 end 1512 end
1512 if now >= last_breath then 1513 if now >= last_breath then
@@ -1542,8 +1543,15 @@ function RolePlugin.bind(Role) @@ -1542,8 +1543,15 @@ function RolePlugin.bind(Role)
1542 end) 1543 end)
1543 for _, data in ipairs(redret) do 1544 for _, data in ipairs(redret) do
1544 local email = tarr2tab(data) 1545 local email = tarr2tab(data)
1545 - if tonum(email.createtime) > self:getProperty("ctime")  
1546 - and ( not email.mid or tonum(email.mid) == mid ) 1546 + -- 0 需要判斷創角時間小於郵件創建時間 1 只需要在時間段內登陸即可領取
  1547 + local delayType = tonum(email.delayType)
  1548 + local flag = false
  1549 + if delayType == 1 then
  1550 + flag = skynet.timex() > tonum(email.createtime)
  1551 + else
  1552 + flag = tonum(email.createtime) > self:getProperty("ctime")
  1553 + end
  1554 + if flag and ( not email.mid or tonum(email.mid) == mid )
1547 and ( not email.endtime or tonum(email.endtime) > now )then 1555 and ( not email.endtime or tonum(email.endtime) > now )then
1548 return true 1556 return true
1549 end 1557 end
src/services/globald.lua
@@ -69,7 +69,8 @@ local function mailQuene() @@ -69,7 +69,8 @@ local function mailQuene()
69 "attachments", email.attachments, 69 "attachments", email.attachments,
70 "endtime", email.endTime, 70 "endtime", email.endTime,
71 "mid", email.mid, 71 "mid", email.mid,
72 - "timestamp", now 72 + "timestamp", now,
  73 + "delayType", email.delayType
73 ) 74 )
74 else 75 else
75 redisproxy:hmset(string_format("globalEmail:%s", gid), 76 redisproxy:hmset(string_format("globalEmail:%s", gid),
@@ -80,7 +81,8 @@ local function mailQuene() @@ -80,7 +81,8 @@ local function mailQuene()
80 "content", email.content, 81 "content", email.content,
81 "attachments", email.attachments, 82 "attachments", email.attachments,
82 "endtime", email.endTime, 83 "endtime", email.endTime,
83 - "timestamp", now 84 + "timestamp", now,
  85 + "delayType", email.delayType
84 ) 86 )
85 end 87 end
86 end 88 end