1
This commit is contained in:
parent
a01ae8e683
commit
512f571adf
@ -597,7 +597,7 @@ class TameBattleDataService extends BaseService {
|
|||||||
{
|
{
|
||||||
//pvp奖励 gold
|
//pvp奖励 gold
|
||||||
if ($userDb){
|
if ($userDb){
|
||||||
// $this->calStarNum($temp['reward'],getXVal($info,'pvp_personal_rank', 0));
|
$this->calStarNum2($temp['reward'],getXVal($info,'pvp_personal_rank', 0));
|
||||||
$heroDb = Hero::findByAccountId(getXVal($info,'account_id', 0),getXVal($info,'hero_uniid', 0));
|
$heroDb = Hero::findByAccountId(getXVal($info,'account_id', 0),getXVal($info,'hero_uniid', 0));
|
||||||
if (!$heroDb){
|
if (!$heroDb){
|
||||||
break;
|
break;
|
||||||
@ -670,6 +670,25 @@ class TameBattleDataService extends BaseService {
|
|||||||
myself()->_addItems($items, $awardService,$propertyChgService);
|
myself()->_addItems($items, $awardService,$propertyChgService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public function calStarNum2(&$reward,$pvp_rank){
|
||||||
|
|
||||||
|
$paramMeta = mt\Parameter::getByName('star_get_num');
|
||||||
|
if ($paramMeta){
|
||||||
|
$star_get_num = getXVal($paramMeta,'param_value', 0);
|
||||||
|
$num_arr = explode('|',$star_get_num);
|
||||||
|
if ($pvp_rank>count($num_arr) || $pvp_rank<1){
|
||||||
|
$finalNum = 0;
|
||||||
|
}else{
|
||||||
|
$finalNum = $this->calFinalStarNum($num_arr[$pvp_rank-1]);
|
||||||
|
}
|
||||||
|
array_push($reward['items'],array(
|
||||||
|
'item_id'=> V_ITEM_STAR,
|
||||||
|
'item_num'=>$finalNum,
|
||||||
|
));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function calFinalStarNum($num){
|
private function calFinalStarNum($num){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user