Commit a90b1f03bf75c11edd331059a1ea5887fce3baa5
Merge branch 'cn/develop' into cn/publish
Showing
3 changed files
with
60 additions
and
6 deletions
Show diff stats
src/ProtocolCode.lua
| @@ -202,7 +202,9 @@ actionCodes = { | @@ -202,7 +202,9 @@ actionCodes = { | ||
| 202 | Store_getGrowFundRewardRpc = 561, --成长助力奖励 | 202 | Store_getGrowFundRewardRpc = 561, --成长助力奖励 |
| 203 | Store_getBattlePassRewardRpc = 562, --赛季卡奖励 | 203 | Store_getBattlePassRewardRpc = 562, --赛季卡奖励 |
| 204 | Store_getExploreCommandRewardRpc = 563, --探索指令 | 204 | Store_getExploreCommandRewardRpc = 563, --探索指令 |
| 205 | - | 205 | + Store_biliAndroidRechargeRpc = 564, |
| 206 | + Store_biliCpsRechargeRpc = 565, | ||
| 207 | + Store_biliUoRechargeRpc = 566, | ||
| 206 | 208 | ||
| 207 | Email_listRpc = 600, | 209 | Email_listRpc = 600, |
| 208 | Email_drawAllAttachRpc = 601, | 210 | Email_drawAllAttachRpc = 601, |
src/actions/StoreAction.lua
| @@ -61,7 +61,7 @@ function _M.biliAndroidRechargeRpc(agent, data) | @@ -61,7 +61,7 @@ function _M.biliAndroidRechargeRpc(agent, data) | ||
| 61 | 61 | ||
| 62 | role.ignoreHeartbeat = true | 62 | role.ignoreHeartbeat = true |
| 63 | --创建订单号 | 63 | --创建订单号 |
| 64 | - local partnerOrderId = makeOrder(roleId, id) | 64 | + local partnerOrderId = role:getPurchaseOrder(id) |
| 65 | -- 签名 | 65 | -- 签名 |
| 66 | local secret_key = "8920e9dcf0cb4ebca87393ce48021ead" | 66 | local secret_key = "8920e9dcf0cb4ebca87393ce48021ead" |
| 67 | local need = { | 67 | local need = { |
| @@ -76,6 +76,58 @@ function _M.biliAndroidRechargeRpc(agent, data) | @@ -76,6 +76,58 @@ function _M.biliAndroidRechargeRpc(agent, data) | ||
| 76 | return true | 76 | return true |
| 77 | end | 77 | end |
| 78 | 78 | ||
| 79 | +-- 享游sdk充值 | ||
| 80 | +function _M.biliCpsRechargeRpc(agent, data) | ||
| 81 | + local role = agent.role | ||
| 82 | + local msg = MsgPack.unpack(data) | ||
| 83 | + local id = msg.id | ||
| 84 | + local dataSet = csvdb["shop_rechargeCsv"][id] | ||
| 85 | + if not dataSet then return end | ||
| 86 | + local roleId = role:getProperty("id") | ||
| 87 | + | ||
| 88 | + role.ignoreHeartbeat = true | ||
| 89 | + --创建订单号 | ||
| 90 | + local partnerOrderId = role:getPurchaseOrder(id) | ||
| 91 | + -- 签名 | ||
| 92 | + local secret_key = "d69365fe15144af990065443749f0f1b" | ||
| 93 | + local need = { | ||
| 94 | + out_trade_no = partnerOrderId, | ||
| 95 | + money = dataSet.rmb * 100, | ||
| 96 | + game_money = dataSet.diamond, | ||
| 97 | + notify_url = msg.notifyUrl | ||
| 98 | + } | ||
| 99 | + local sign = signPms(need, secret_key) | ||
| 100 | + | ||
| 101 | + SendPacket(actionCodes.Store_biliCpsRechargeRpc, MsgPack.pack({ order = partnerOrderId, sign = sign})) | ||
| 102 | + return true | ||
| 103 | +end | ||
| 104 | + | ||
| 105 | +-- 享游sdk充值 | ||
| 106 | +function _M.biliUoRechargeRpc(agent, data) | ||
| 107 | + local role = agent.role | ||
| 108 | + local msg = MsgPack.unpack(data) | ||
| 109 | + local id = msg.id | ||
| 110 | + local dataSet = csvdb["shop_rechargeCsv"][id] | ||
| 111 | + if not dataSet then return end | ||
| 112 | + local roleId = role:getProperty("id") | ||
| 113 | + | ||
| 114 | + role.ignoreHeartbeat = true | ||
| 115 | + --创建订单号 | ||
| 116 | + local partnerOrderId = role:getPurchaseOrder(id) | ||
| 117 | + -- 签名 | ||
| 118 | + local secret_key = "4243b5fb44b64175a20a53dcfb1346eb" | ||
| 119 | + local need = { | ||
| 120 | + out_trade_no = partnerOrderId, | ||
| 121 | + money = dataSet.rmb * 100, | ||
| 122 | + game_money = dataSet.diamond, | ||
| 123 | + notify_url = msg.notifyUrl | ||
| 124 | + } | ||
| 125 | + local sign = signPms(need, secret_key) | ||
| 126 | + | ||
| 127 | + SendPacket(actionCodes.Store_biliUoRechargeRpc, MsgPack.pack({ order = partnerOrderId, sign = sign})) | ||
| 128 | + return true | ||
| 129 | +end | ||
| 130 | + | ||
| 79 | -- google 充值 入口 | 131 | -- google 充值 入口 |
| 80 | function _M.googleRechargeRpc(agent, data) | 132 | function _M.googleRechargeRpc(agent, data) |
| 81 | local role = agent.role | 133 | local role = agent.role |
| @@ -130,7 +182,7 @@ function _M.myCardRechargeRpc(agent, data) | @@ -130,7 +182,7 @@ function _M.myCardRechargeRpc(agent, data) | ||
| 130 | return true | 182 | return true |
| 131 | end | 183 | end |
| 132 | 184 | ||
| 133 | --- mycard 充值 入口 | 185 | +-- bili ios 充值 入口 |
| 134 | function _M.iosRechargeRpc(agent, data) | 186 | function _M.iosRechargeRpc(agent, data) |
| 135 | local role = agent.role | 187 | local role = agent.role |
| 136 | local msg = MsgPack.unpack(data) | 188 | local msg = MsgPack.unpack(data) |
| @@ -143,12 +195,12 @@ function _M.iosRechargeRpc(agent, data) | @@ -143,12 +195,12 @@ function _M.iosRechargeRpc(agent, data) | ||
| 143 | --创建订单号 | 195 | --创建订单号 |
| 144 | local partnerOrderId = role:getPurchaseOrder(id) | 196 | local partnerOrderId = role:getPurchaseOrder(id) |
| 145 | -- 签名 | 197 | -- 签名 |
| 146 | - local secret_key = "9647d2efe1074c73b9ac19af4337a70e" | 198 | + local secret_key = "1916d62251dd4a8aa5e452121eefc9a1" |
| 147 | local need = { | 199 | local need = { |
| 148 | out_trade_no = partnerOrderId, | 200 | out_trade_no = partnerOrderId, |
| 149 | money = dataSet.rmb * 100, | 201 | money = dataSet.rmb * 100, |
| 150 | game_money = dataSet.diamond, | 202 | game_money = dataSet.diamond, |
| 151 | - product_id = dataSet.iap_product_id, | 203 | + -- product_id = dataSet.iap_product_id, |
| 152 | notify_url = msg.notifyUrl | 204 | notify_url = msg.notifyUrl |
| 153 | } | 205 | } |
| 154 | local sign = signPms(need, secret_key) | 206 | local sign = signPms(need, secret_key) |
src/adv/AdvPlayer.lua
| @@ -144,7 +144,7 @@ function BaseObject:getDisablePassiveCount() | @@ -144,7 +144,7 @@ function BaseObject:getDisablePassiveCount() | ||
| 144 | end | 144 | end |
| 145 | 145 | ||
| 146 | function BaseObject:getDisableAuraCount() | 146 | function BaseObject:getDisableAuraCount() |
| 147 | - local count | 147 | + local count = 0 |
| 148 | for _, buff in ipairs(self.buffs) do | 148 | for _, buff in ipairs(self.buffs) do |
| 149 | if not buff:isHide() and buff:getType() == Buff.DISABLE_AURA then | 149 | if not buff:isHide() and buff:getType() == Buff.DISABLE_AURA then |
| 150 | if buff:effect() == 0 then | 150 | if buff:effect() == 0 then |