adjust exp
This commit is contained in:
parent
880662aeee
commit
03aced4de9
@ -105,12 +105,14 @@ class AddReward
|
|||||||
$this->addweizhuang($item['item_id'], $item['item_num'], $account_id);
|
$this->addweizhuang($item['item_id'], $item['item_num'], $account_id);
|
||||||
} else if ($i['type'] == 12) {
|
} else if ($i['type'] == 12) {
|
||||||
$item_list = $this->addEquip($item['item_id'], $account_id);
|
$item_list = $this->addEquip($item['item_id'], $account_id);
|
||||||
} else if ($i['type'] == 16) {
|
} else if ($i['type'] == 16 || $i['type'] == 19 ) {
|
||||||
$this->addSpoilsItem($item['item_id'], $item['item_num'], $account_id);
|
$this->addSpoilsItem($item['item_id'], $item['item_num'], $account_id);
|
||||||
} else if ($i['type'] == 17) {
|
} else if ($i['type'] == 17) {
|
||||||
$this->addAdfree($item['item_id'], $item['item_num'], $account_id);
|
$this->addAdfree($item['item_id'], $item['item_num'], $account_id);
|
||||||
} else if ($i['type'] == 18) {
|
} else if ($i['type'] == 18) {
|
||||||
$this->addMedal($item['item_id'], $item['item_num'], $account_id);
|
$this->addMedal($item['item_id'], $item['item_num'], $account_id);
|
||||||
|
} else if ($i['type'] == 20) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$priceid = 10003;
|
$priceid = 10003;
|
||||||
$price = $i['diamond'];
|
$price = $i['diamond'];
|
||||||
|
@ -718,11 +718,15 @@ class SoloController
|
|||||||
$item_list = array();
|
$item_list = array();
|
||||||
// fixed award
|
// fixed award
|
||||||
$fixedawards = explode($reqlevelcfg['fixedreward'], '|');
|
$fixedawards = explode($reqlevelcfg['fixedreward'], '|');
|
||||||
|
$addexp = $medalcost * 10; //1点体力=10点经验
|
||||||
foreach ($fixedawards as $fixitem) {
|
foreach ($fixedawards as $fixitem) {
|
||||||
$itemstrs = explode($fixitem, '|');
|
$itemstrs = explode($fixitem, '|');
|
||||||
if (count($itemstrs) < 2) {
|
if (count($itemstrs) < 2) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($itemstrs[0] == 10013) {
|
||||||
|
$addexp += $itemstrs[1];
|
||||||
|
}
|
||||||
$item_list[] = array(
|
$item_list[] = array(
|
||||||
"item_id" => $itemstrs[0],
|
"item_id" => $itemstrs[0],
|
||||||
"item_num" => $itemstrs[1],
|
"item_num" => $itemstrs[1],
|
||||||
@ -738,6 +742,9 @@ class SoloController
|
|||||||
if (count($itemstrs) < 2) {
|
if (count($itemstrs) < 2) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($itemstrs[0] == 10013) {
|
||||||
|
$addexp += $itemstrs[1];
|
||||||
|
}
|
||||||
$item_list[] = array(
|
$item_list[] = array(
|
||||||
"item_id" => $itemstrs[0],
|
"item_id" => $itemstrs[0],
|
||||||
"item_num" => $itemstrs[1],
|
"item_num" => $itemstrs[1],
|
||||||
@ -776,7 +783,7 @@ class SoloController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cost medals, add exp
|
// cost medals, add exp
|
||||||
$curexp = $solorow['exp'] + $medalcost;
|
$curexp = $solorow['exp'] + $addexp;
|
||||||
$curlv = $solorow['level'];
|
$curlv = $solorow['level'];
|
||||||
$curlvcfg = $this->getPlayerLevelInfo($curlv);
|
$curlvcfg = $this->getPlayerLevelInfo($curlv);
|
||||||
$uplv_item_list = array();
|
$uplv_item_list = array();
|
||||||
@ -833,6 +840,11 @@ class SoloController
|
|||||||
$addreward = new classes\AddReward();
|
$addreward = new classes\AddReward();
|
||||||
$all_item_list = array();
|
$all_item_list = array();
|
||||||
foreach ($item_list as $itemaward) {
|
foreach ($item_list as $itemaward) {
|
||||||
|
if ($itemaward['item_id'] == 10013) {
|
||||||
|
//经验值奖励已处理
|
||||||
|
$all_item_list[] = $itemaward;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$items = $addreward->addReward($itemaward['item_id'], $itemaward['item_num'], $account_id, 0, 0);
|
$items = $addreward->addReward($itemaward['item_id'], $itemaward['item_num'], $account_id, 0, 0);
|
||||||
foreach ($items as $i) {
|
foreach ($items as $i) {
|
||||||
array_push($all_item_list, array(
|
array_push($all_item_list, array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user