1
This commit is contained in:
parent
490cc59960
commit
58feefe78e
@ -1,22 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import _common
|
||||
|
||||
class Recharge(object):
|
||||
|
||||
def __init__(self):
|
||||
self.apis = [
|
||||
{
|
||||
'name': 'goodsList',
|
||||
'desc': '充值-商品列表',
|
||||
'group': 'Recharge',
|
||||
'url': 'webapp/index.php?c=Recharge&a=goodsList',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['!goods', [_common.RechargeGoods()], '商品列表']
|
||||
]
|
||||
}
|
||||
]
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once('mt/Recharge.php');
|
||||
|
||||
class RechargeController extends BaseAuthedController {
|
||||
|
||||
public function goodsList()
|
||||
{
|
||||
$goods = array();
|
||||
mt\Recharge::traverseMeta(function ($meta) use(&$goods) {
|
||||
array_push($goods, array(
|
||||
'goods_id' => $meta['id'],
|
||||
'goods_meta' => $meta,
|
||||
));
|
||||
});
|
||||
myself()->_rspData(array(
|
||||
'goods' => $goods
|
||||
));
|
||||
}
|
||||
|
||||
}
|
@ -260,8 +260,9 @@ class RoomBattleDataService extends BaseService {
|
||||
//宝箱掉落
|
||||
$chestLootProbArr = explode(";",$rewardMeta['chestLootProb']);
|
||||
$rate = isset($chestLootProbArr[$teamRank-1]) ? $chestLootProbArr[$teamRank-1] : 0;
|
||||
//error_log(json_encode($member));
|
||||
if ($rate > 0 && !empty($member['box_num'])){
|
||||
for ($i = 0; i < $member['box_num']; ++$i) {
|
||||
for ($i = 0; $i < $member['box_num']; ++$i) {
|
||||
$rand = $rate * 100;
|
||||
$rnd = rand(1,100);
|
||||
if ($rnd <= $rand){
|
||||
|
@ -720,6 +720,7 @@ class TameBattleDataService extends BaseService {
|
||||
'pve_boss_killed'=> getXVal($info,'pve_boss_killed', 0),
|
||||
'hero_lv'=> getXVal($info,'hero_lv', 1),
|
||||
'dead_times'=> getXVal($info,'dead_times', 0),
|
||||
'box_num'=> getXVal($info,'box_num', 0),
|
||||
'battle_score'=> 0,
|
||||
'reward' => $rewards,
|
||||
'winningPro' => $winningPro,
|
||||
|
Loading…
x
Reference in New Issue
Block a user