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,19 +464,6 @@ function _M.loveTaskRpc(agent, data) | ||
464 | return true | 464 | return true |
465 | end | 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 | function _M.createHeroRpc(agent, data) | 467 | function _M.createHeroRpc(agent, data) |
481 | local role = agent.role | 468 | local role = agent.role |
482 | local msg = MsgPack.unpack(data) | 469 | local msg = MsgPack.unpack(data) |
src/adv/AdvBattle.lua
@@ -42,7 +42,7 @@ function Battle:initPlayer() | @@ -42,7 +42,7 @@ function Battle:initPlayer() | ||
42 | local hero = self.adv.owner.heros[heroId] | 42 | local hero = self.adv.owner.heros[heroId] |
43 | if hero then | 43 | if hero then |
44 | heroLevel = heroLevel + hero:getProperty("level") | 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 | if advSkillId > 1000 then | 46 | if advSkillId > 1000 then |
47 | table.insert(player.passives, {id = advSkillId, level = hero:getSkillLevel(4)}) | 47 | table.insert(player.passives, {id = advSkillId, level = hero:getSkillLevel(4)}) |
48 | end | 48 | end |
src/models/Hero.lua
@@ -14,7 +14,6 @@ Hero.schema = { | @@ -14,7 +14,6 @@ Hero.schema = { | ||
14 | battleV = {"number", 0}, -- 保存战斗力 | 14 | battleV = {"number", 0}, -- 保存战斗力 |
15 | loveExp = {"number", 0}, --好感度经验 | 15 | loveExp = {"number", 0}, --好感度经验 |
16 | loveL = {"number", 0}, --好感度等级 | 16 | loveL = {"number", 0}, --好感度等级 |
17 | - skin = {"number", 0}, --皮肤 0 、 1、 2、 3 | ||
18 | equip = {"string",""}, --装备 type=level | 17 | equip = {"string",""}, --装备 type=level |
19 | rune = {"string",""}, --零件 type=id | 18 | rune = {"string",""}, --零件 type=id |
20 | } | 19 | } |
@@ -57,7 +56,7 @@ function Hero:updateProperty(params) | @@ -57,7 +56,7 @@ function Hero:updateProperty(params) | ||
57 | local datas = {} | 56 | local datas = {} |
58 | table.insert(datas, {key = params.field, newValue = self:getProperty(params.field)}) | 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 | if check[params.field] then | 60 | if check[params.field] then |
62 | local orginValue = self:getProperty("battleV") | 61 | local orginValue = self:getProperty("battleV") |
63 | local curValue = self:saveBattleValue() | 62 | local curValue = self:saveBattleValue() |
@@ -81,7 +80,6 @@ function Hero:data() | @@ -81,7 +80,6 @@ function Hero:data() | ||
81 | battleV = self:getProperty("battleV"), | 80 | battleV = self:getProperty("battleV"), |
82 | loveExp = self:getProperty("loveExp"), | 81 | loveExp = self:getProperty("loveExp"), |
83 | loveL = self:getProperty("loveL"), | 82 | loveL = self:getProperty("loveL"), |
84 | - skin = self:getProperty("skin"), | ||
85 | equip = self:getProperty("equip"), | 83 | equip = self:getProperty("equip"), |
86 | rune = self:getProperty("rune"), | 84 | rune = self:getProperty("rune"), |
87 | } | 85 | } |
src/models/HeroPlugin.lua
@@ -76,17 +76,10 @@ function HeroPlugin.bind(Hero) | @@ -76,17 +76,10 @@ function HeroPlugin.bind(Hero) | ||
76 | end | 76 | end |
77 | end | 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 | local wData = csvdb["unit_wakeCsv"][wakeL] | 80 | local wData = csvdb["unit_wakeCsv"][wakeL] |
88 | for attr, value in pairs(attrs) do | 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 | end | 83 | end |
91 | 84 | ||
92 | return attrs | 85 | return attrs |
@@ -206,7 +199,7 @@ function HeroPlugin.bind(Hero) | @@ -206,7 +199,7 @@ function HeroPlugin.bind(Hero) | ||
206 | return self:getProperty("skillL"):getv(idx, 1) | 199 | return self:getProperty("skillL"):getv(idx, 1) |
207 | end | 200 | end |
208 | 201 | ||
209 | - function Hero:getSkillData(idx, skin) | 202 | + function Hero:getSkillData(idx) |
210 | local unitData = csvdb["unitCsv"][self:getProperty("type")] | 203 | local unitData = csvdb["unitCsv"][self:getProperty("type")] |
211 | if idx == 1 then | 204 | if idx == 1 then |
212 | return csvdb["skill_specialCsv"][unitData.special] | 205 | return csvdb["skill_specialCsv"][unitData.special] |
@@ -219,16 +212,6 @@ function HeroPlugin.bind(Hero) | @@ -219,16 +212,6 @@ function HeroPlugin.bind(Hero) | ||
219 | end | 212 | end |
220 | return {} | 213 | return {} |
221 | end | 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 | end | 215 | end |
233 | 216 | ||
234 | 217 |