adjust exp

This commit is contained in:
yangduo 2025-03-20 14:14:27 +08:00
parent 880662aeee
commit 03aced4de9
2 changed files with 17 additions and 3 deletions

View File

@ -105,12 +105,14 @@ class AddReward
$this->addweizhuang($item['item_id'], $item['item_num'], $account_id);
} else if ($i['type'] == 12) {
$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);
} else if ($i['type'] == 17) {
$this->addAdfree($item['item_id'], $item['item_num'], $account_id);
} else if ($i['type'] == 18) {
$this->addMedal($item['item_id'], $item['item_num'], $account_id);
} else if ($i['type'] == 20) {
} else {
$priceid = 10003;
$price = $i['diamond'];

View File

@ -588,7 +588,7 @@ class SoloController
$awardstrs = explode($fundscfg[$fundsid][$fundsname], '|');
$item_list = array();
foreach($awardstrs as $awarditem) {
foreach ($awardstrs as $awarditem) {
$strs = explode($awarditem, ':');
if (count($strs) < 2) {
continue;
@ -718,11 +718,15 @@ class SoloController
$item_list = array();
// fixed award
$fixedawards = explode($reqlevelcfg['fixedreward'], '|');
$addexp = $medalcost * 10; //1点体力=10点经验
foreach ($fixedawards as $fixitem) {
$itemstrs = explode($fixitem, '|');
if (count($itemstrs) < 2) {
continue;
}
if ($itemstrs[0] == 10013) {
$addexp += $itemstrs[1];
}
$item_list[] = array(
"item_id" => $itemstrs[0],
"item_num" => $itemstrs[1],
@ -738,6 +742,9 @@ class SoloController
if (count($itemstrs) < 2) {
continue;
}
if ($itemstrs[0] == 10013) {
$addexp += $itemstrs[1];
}
$item_list[] = array(
"item_id" => $itemstrs[0],
"item_num" => $itemstrs[1],
@ -776,7 +783,7 @@ class SoloController
}
// cost medals, add exp
$curexp = $solorow['exp'] + $medalcost;
$curexp = $solorow['exp'] + $addexp;
$curlv = $solorow['level'];
$curlvcfg = $this->getPlayerLevelInfo($curlv);
$uplv_item_list = array();
@ -833,6 +840,11 @@ class SoloController
$addreward = new classes\AddReward();
$all_item_list = array();
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);
foreach ($items as $i) {
array_push($all_item_list, array(