Commit 5de23af5cc529fc0ac83c078910f995d66bb7e7f

Authored by zhangqijia
1 parent dcf40771

fix: 世界积分 名字修改成Rpc,抽世界轮盘返回基数和倍率

1. 改协议名字
2. 抽世界轮盘协议 返回基数和倍率
3. 消耗虹光玉和魔导石 通知给客户端字段worldLine
src/ProtocolCode.lua
@@ -62,8 +62,8 @@ actionCodes = { @@ -62,8 +62,8 @@ actionCodes = {
62 Role_setFriendTeamRpc = 143, -- 设置好友切磋队伍 62 Role_setFriendTeamRpc = 143, -- 设置好友切磋队伍
63 Role_setBgRpc = 144, -- 设置看板娘 63 Role_setBgRpc = 144, -- 设置看板娘
64 Role_itemConvertSpecialRpc = 145, -- 兑换月卡/战令探索指令等 特殊道具 64 Role_itemConvertSpecialRpc = 145, -- 兑换月卡/战令探索指令等 特殊道具
65 - Role_worldLineRoulette = 146, --世界线抽轮盘  
66 - Role_worldLineReward = 147, -- 世界线一键领取奖励 65 + Role_worldLineRouletteRpc = 146, --世界线抽轮盘
  66 + Role_worldLineRewardRpc = 147, -- 世界线一键领取奖励
67 67
68 Adv_startAdvRpc = 151, 68 Adv_startAdvRpc = 151,
69 Adv_startHangRpc = 152, 69 Adv_startHangRpc = 152,
src/actions/RoleAction.lua
@@ -1762,7 +1762,7 @@ function _M.itemConvertSpecialRpc(agent, data) @@ -1762,7 +1762,7 @@ function _M.itemConvertSpecialRpc(agent, data)
1762 return true 1762 return true
1763 end 1763 end
1764 1764
1765 -function _M.worldLineRoulette(agent, data) 1765 +function _M.worldLineRouletteRpc(agent, data)
1766 local role = agent.role 1766 local role = agent.role
1767 1767
1768 local worldChangePoints = role:getProperty("worldChangePoints") or {} 1768 local worldChangePoints = role:getProperty("worldChangePoints") or {}
@@ -1794,11 +1794,11 @@ function _M.worldLineRoulette(agent, data) @@ -1794,11 +1794,11 @@ function _M.worldLineRoulette(agent, data)
1794 worldChangePoints[ItemWorldLine.Points] = worldChangePoints[ItemWorldLine.Points] + points 1794 worldChangePoints[ItemWorldLine.Points] = worldChangePoints[ItemWorldLine.Points] + points
1795 role:updateProperty({field = "worldChangePoints", value = worldChangePoints}) 1795 role:updateProperty({field = "worldChangePoints", value = worldChangePoints})
1796 1796
1797 - SendPacket(actionCodes.Role_worldLineRoulette, MsgPack.pack(worldChangePoints)) 1797 + SendPacket(actionCodes.Role_worldLineRouletteRpc, MsgPack.pack({base_10 = gift_base_10, base_1 = gift_base_1, magnification_1 = gift_magnification_1, magnification_0 = gift_magnification_0}))
1798 return true 1798 return true
1799 end 1799 end
1800 1800
1801 -function _M.worldLineReward(agent, data) 1801 +function _M.worldLineRewardRpc(agent, data)
1802 local role = agent.role 1802 local role = agent.role
1803 local worldLineReward = role:getProperty("worldLineReward") or {} 1803 local worldLineReward = role:getProperty("worldLineReward") or {}
1804 local worldChangePoints = role:getProperty("worldChangePoints") or {} 1804 local worldChangePoints = role:getProperty("worldChangePoints") or {}
@@ -1819,7 +1819,7 @@ function _M.worldLineReward(agent, data) @@ -1819,7 +1819,7 @@ function _M.worldLineReward(agent, data)
1819 if next(reward) then 1819 if next(reward) then
1820 reward, change = role:award(reward, {log = {desc = "worldLine", int1 = role:getProperty("id")}}) 1820 reward, change = role:award(reward, {log = {desc = "worldLine", int1 = role:getProperty("id")}})
1821 end 1821 end
1822 - SendPacket(actionCodes.Role_worldLineReward, MsgPack.pack(role:packReward(reward, change))) 1822 + SendPacket(actionCodes.Role_worldLineRewardRpc, MsgPack.pack(role:packReward(reward, change)))
1823 return true 1823 return true
1824 end 1824 end
1825 1825
src/models/RolePlugin.lua
@@ -3307,7 +3307,7 @@ function RolePlugin.bind(Role) @@ -3307,7 +3307,7 @@ function RolePlugin.bind(Role)
3307 worldChangePoints[ItemWorldLine.CostDiamond] = worldChangePoints[ItemWorldLine.CostDiamond] - cost * globalCsv.worldline_count_currency 3307 worldChangePoints[ItemWorldLine.CostDiamond] = worldChangePoints[ItemWorldLine.CostDiamond] - cost * globalCsv.worldline_count_currency
3308 worldChangePoints[ItemWorldLine.Points] = (worldChangePoints[ItemWorldLine.Points] or 0) + cost 3308 worldChangePoints[ItemWorldLine.Points] = (worldChangePoints[ItemWorldLine.Points] or 0) + cost
3309 end 3309 end
3310 - self:setProperty("worldChangePoints", worldChangePoints) 3310 + self:updateProperty({field = "worldChangePoints", value = worldChangePoints})
3311 end 3311 end
3312 end 3312 end
3313 3313