Commit f2fa488d13bd5b6ce61e8df81ba8144e5dfcc1ee
1 parent
1976004f
删除skin相关
Showing
4 changed files
with
4 additions
and
36 deletions
Show diff stats
src/actions/HeroAction.lua
... | ... | @@ -464,19 +464,6 @@ function _M.loveTaskRpc(agent, data) |
464 | 464 | return true |
465 | 465 | end |
466 | 466 | |
467 | -function _M.changeSkinRpc(agent, data) | |
468 | - local role = agent.role | |
469 | - local msg = MsgPack.unpack(data) | |
470 | - local hero = role.heros[msg.id] | |
471 | - if not hero then return end | |
472 | - local skin = msg.skin | |
473 | - local skinData = csvdb["unit_skinCsv"][hero:getSkinId(skin)] | |
474 | - if not skinData or (skinData.itemId ~= 0 and not role:checkItemEnough({[skinData.itemId] = 1})) then return end | |
475 | - hero:updateProperty({field = "skin", value = skin}) | |
476 | - SendPacket(actionCodes.Hero_changeSkinRpc, "") | |
477 | - return true | |
478 | -end | |
479 | - | |
480 | 467 | function _M.createHeroRpc(agent, data) |
481 | 468 | local role = agent.role |
482 | 469 | local msg = MsgPack.unpack(data) | ... | ... |
src/adv/AdvBattle.lua
... | ... | @@ -42,7 +42,7 @@ function Battle:initPlayer() |
42 | 42 | local hero = self.adv.owner.heros[heroId] |
43 | 43 | if hero then |
44 | 44 | heroLevel = heroLevel + hero:getProperty("level") |
45 | - local advSkillId = csvdb["unitCsv"][self.adv.owner.heros[heroId]:getSkinId()]["adv"] | |
45 | + local advSkillId = csvdb["unitCsv"][self.adv.owner.heros[heroId]:getProperty("type")]["adv"] | |
46 | 46 | if advSkillId > 1000 then |
47 | 47 | table.insert(player.passives, {id = advSkillId, level = hero:getSkillLevel(4)}) |
48 | 48 | end | ... | ... |
src/models/Hero.lua
... | ... | @@ -14,7 +14,6 @@ Hero.schema = { |
14 | 14 | battleV = {"number", 0}, -- 保存战斗力 |
15 | 15 | loveExp = {"number", 0}, --好感度经验 |
16 | 16 | loveL = {"number", 0}, --好感度等级 |
17 | - skin = {"number", 0}, --皮肤 0 、 1、 2、 3 | |
18 | 17 | equip = {"string",""}, --装备 type=level |
19 | 18 | rune = {"string",""}, --零件 type=id |
20 | 19 | } |
... | ... | @@ -57,7 +56,7 @@ function Hero:updateProperty(params) |
57 | 56 | local datas = {} |
58 | 57 | table.insert(datas, {key = params.field, newValue = self:getProperty(params.field)}) |
59 | 58 | |
60 | - local check = {level = true, breakL = true, wakeL = true, talent = true, loveL = true, skin = true, equip = true, rune = true} | |
59 | + local check = {level = true, breakL = true, wakeL = true, talent = true, loveL = true, equip = true, rune = true} | |
61 | 60 | if check[params.field] then |
62 | 61 | local orginValue = self:getProperty("battleV") |
63 | 62 | local curValue = self:saveBattleValue() |
... | ... | @@ -81,7 +80,6 @@ function Hero:data() |
81 | 80 | battleV = self:getProperty("battleV"), |
82 | 81 | loveExp = self:getProperty("loveExp"), |
83 | 82 | loveL = self:getProperty("loveL"), |
84 | - skin = self:getProperty("skin"), | |
85 | 83 | equip = self:getProperty("equip"), |
86 | 84 | rune = self:getProperty("rune"), |
87 | 85 | } | ... | ... |
src/models/HeroPlugin.lua
... | ... | @@ -76,17 +76,10 @@ function HeroPlugin.bind(Hero) |
76 | 76 | end |
77 | 77 | end |
78 | 78 | |
79 | - --皮肤 | |
80 | - local skinUp = {} | |
81 | - local reward = (csvdb["unit_skinCsv"][self:getSkinId()] or {})["reward"] or "" | |
82 | - for attrId, value in pairs(reward:toNumMap()) do | |
83 | - skinUp[AttsEnumEx[attrId]] = (skinUp[AttsEnumEx[attrId]] or 0) + value | |
84 | - end | |
85 | - | |
86 | 79 | --觉醒 |
87 | 80 | local wData = csvdb["unit_wakeCsv"][wakeL] |
88 | 81 | for attr, value in pairs(attrs) do |
89 | - attrs[attr] = attrs[attr] * (100 + (wData[attr .. "Level"] or 0) + (talentAttrS[attr] or 0) + (loveUp[attr] or 0) + (skinUp[attr] or 0)) / 100 | |
82 | + attrs[attr] = attrs[attr] * (100 + (wData[attr .. "Level"] or 0) + (talentAttrS[attr] or 0) + (loveUp[attr] or 0)) / 100 | |
90 | 83 | end |
91 | 84 | |
92 | 85 | return attrs |
... | ... | @@ -206,7 +199,7 @@ function HeroPlugin.bind(Hero) |
206 | 199 | return self:getProperty("skillL"):getv(idx, 1) |
207 | 200 | end |
208 | 201 | |
209 | - function Hero:getSkillData(idx, skin) | |
202 | + function Hero:getSkillData(idx) | |
210 | 203 | local unitData = csvdb["unitCsv"][self:getProperty("type")] |
211 | 204 | if idx == 1 then |
212 | 205 | return csvdb["skill_specialCsv"][unitData.special] |
... | ... | @@ -219,16 +212,6 @@ function HeroPlugin.bind(Hero) |
219 | 212 | end |
220 | 213 | return {} |
221 | 214 | end |
222 | - | |
223 | - function Hero:getSkinId(skin) | |
224 | - skin = skin or self:getProperty("skin") | |
225 | - if skin == 0 then | |
226 | - return self:getProperty("type") | |
227 | - else | |
228 | - return 30000 + self:getProperty("type") * 10 + skin | |
229 | - end | |
230 | - end | |
231 | - | |
232 | 215 | end |
233 | 216 | |
234 | 217 | ... | ... |