Commit 5d80aca64dbfd00215a4e9fbafcc59466602d586

Authored by zhouahaihai
1 parent 312b9db5

挂机优化

Showing 2 changed files with 17 additions and 5 deletions   Show diff stats
@@ -34,30 +34,39 @@ ItemType = { @@ -34,30 +34,39 @@ ItemType = {
34 HeroFCommon = 3, -- 万能角色碎片(集齐N个,合成同稀有度随机角色) 34 HeroFCommon = 3, -- 万能角色碎片(集齐N个,合成同稀有度随机角色)
35 Hero = 4, -- 角色 35 Hero = 4, -- 角色
36 Head = 5, -- 头像 36 Head = 5, -- 头像
37 - SkinFragment = 6, -- 皮肤碎片  
38 - SkinFCommon = 7, -- 万能皮肤碎片(集齐N个,合成同稀有度随机皮肤) 37 + Material = 6, -- 材料
  38 + Box = 7, -- 宝箱(立刻打开)
39 Skin = 8, -- 皮肤 39 Skin = 8, -- 皮肤
40 EquipBase = 9, -- 基础装备 40 EquipBase = 9, -- 基础装备
41 Rune = 10, -- 符文 41 Rune = 10, -- 符文
42 Cuisine = 11, -- 料理(用于增加好感度、贩卖获得金币) 42 Cuisine = 11, -- 料理(用于增加好感度、贩卖获得金币)
43 LunchBox = 12, -- 便当盒(料理合成,冒险系统消耗道具) 43 LunchBox = 12, -- 便当盒(料理合成,冒险系统消耗道具)
44 TimeBox = 13, -- 时间箱(开启需要时间,随机产出道具) 44 TimeBox = 13, -- 时间箱(开启需要时间,随机产出道具)
  45 + AdvItem = 14 -- 冒险道具
45 } 46 }
46 47
47 -- 物品起始id 48 -- 物品起始id
48 ItemStartId = { 49 ItemStartId = {
49 Hero = 300, -- 英雄 50 Hero = 300, -- 英雄
50 } 51 }
  52 +
51 --常用的物品id的枚举 53 --常用的物品id的枚举
52 ItemId = { 54 ItemId = {
53 Gold = 1, -- 金币 55 Gold = 1, -- 金币
54 Exp = 2, -- 经验 56 Exp = 2, -- 经验
55 Diamond = 3, -- 钻石 57 Diamond = 3, -- 钻石
56 - BreakCost = 4, -- 突破材料 58 + PlayerExp = 4, -- 突破材料
  59 + BreakCost = 10, -- 突破材料
  60 + EquipUp = 11, -- 装备升级材料
  61 + SupSkillUp = 12, --支援技升级材料
  62 + LoveUp = 14, --好感度提升道具
  63 + LoveBreak = 21, --好感度突破道具
  64 + BoxKey = 20, -- 开箱钥匙
  65 + PvpKey = 22, -- 开箱钥匙
  66 + LunchFragment = 23,
57 HeroFC = {700, 701, 702, 703}, -- 通用角色碎片 67 HeroFC = {700, 701, 702, 703}, -- 通用角色碎片
58 AdvKey = 80, -- 冒险钥匙 68 AdvKey = 80, -- 冒险钥匙
59 } 69 }
60 -  
61 --客户端不需要知道这个 70 --客户端不需要知道这个
62 AdvSpecialStage = { 71 AdvSpecialStage = {
63 [1]= "In", 72 [1]= "In",
src/actions/HangAction.lua
@@ -70,7 +70,10 @@ function _M.startRpc( agent, data ) @@ -70,7 +70,10 @@ function _M.startRpc( agent, data )
70 if not carbonData then return end 70 if not carbonData then return end
71 71
72 local hangPass = role:getProperty("hangPass") 72 local hangPass = role:getProperty("hangPass")
73 - if carbonData.prepose ~= "" and carbonData.prepose ~= 0 and not hangPass[carbonData.prepose] then return end 73 +
  74 + for _, preCarbonId in ipairs(carbonData.prepose:toArray(true, "=")) do
  75 + if not hangPass[preCarbonId] then return end
  76 + end
74 77
75 if checkReward(role) then 78 if checkReward(role) then
76 role:updateProperty({field = "hangBag", value = role:getProperty("hangBag")}) 79 role:updateProperty({field = "hangBag", value = role:getProperty("hangBag")})