1
This commit is contained in:
parent
a9be788eb1
commit
0aebc9d1f1
@ -13,6 +13,7 @@ require_once('mt/EconomyAttribute.php');
|
||||
|
||||
require_once('services/AwardService.php');
|
||||
require_once('services/PropertyChgService.php');
|
||||
require_once('phpcommon/tglog.php');
|
||||
|
||||
use mt;
|
||||
use services;
|
||||
@ -22,6 +23,7 @@ use models\BattleSettlement;
|
||||
use models\Hero;
|
||||
use models\HashRate;
|
||||
use models\Season;
|
||||
use phpcommon\TGLog;
|
||||
|
||||
class RoomBattleDataService extends BaseService {
|
||||
const ROOM_MODE_PVP = 0;
|
||||
@ -185,8 +187,8 @@ class RoomBattleDataService extends BaseService {
|
||||
$items = LootService::dropOutItem($rewardMeta['goldLoot']);
|
||||
foreach ($items as $item){
|
||||
if ($item['item_id'] = V_ITEM_GOLD){
|
||||
$gold = $item['item_num'];
|
||||
$baseGold = $item['item_num'];
|
||||
$gold += $item['item_num'];
|
||||
$baseGold += $item['item_num'];
|
||||
}else{
|
||||
array_push($reward,$item);
|
||||
}
|
||||
@ -205,7 +207,8 @@ class RoomBattleDataService extends BaseService {
|
||||
}
|
||||
$baseValue = $gold;
|
||||
if ($this->mapMode == mt\MapMode::GOLD_MODE){
|
||||
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,(int)$heroDb['idx'],1);
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0,1);
|
||||
//财富值加成
|
||||
$wealthK = mt\Parameter::getVal('economy_hero_wealth_K',0);
|
||||
$wealthE = mt\Parameter::getVal('economy_hero_wealth_E',0);
|
||||
@ -251,22 +254,20 @@ class RoomBattleDataService extends BaseService {
|
||||
'finalGold' => floor($gold)
|
||||
)));
|
||||
}
|
||||
if ($gold > 0){
|
||||
array_push($reward,array(
|
||||
"item_id" => V_ITEM_GOLD,
|
||||
"item_num" => floor($gold),
|
||||
"details" => array(
|
||||
'baseValue' => $baseValue,
|
||||
// 'wealthValue' => $wealthValue,
|
||||
'hashRateValue' => isset($hashRateValue) ? $hashRateValue : 0,
|
||||
)
|
||||
));
|
||||
myself()->_incDailyV(TN_DAILY_GATHER_GOLD,0,floor($gold));
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,(int)$heroDb['idx'],1);
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0,1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ($gold > 0){
|
||||
array_push($reward,array(
|
||||
"item_id" => V_ITEM_GOLD,
|
||||
"item_num" => floor($gold),
|
||||
"details" => array(
|
||||
'baseValue' => $baseValue,
|
||||
// 'wealthValue' => $wealthValue,
|
||||
'hashRateValue' => isset($hashRateValue) ? $hashRateValue : 0,
|
||||
)
|
||||
));
|
||||
myself()->_incDailyV(TN_DAILY_GATHER_GOLD,0,floor($gold));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -283,6 +284,15 @@ class RoomBattleDataService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
TGLog::writeToLog("game_2006_api","battleReport",array(
|
||||
'account_id' => $userDb['account_id'],
|
||||
'map_mode' => $this->mapMode,
|
||||
'baseGold' => $baseGold,
|
||||
'gold' => isset($baseValue) ? $baseValue : $gold,
|
||||
'rewards' => $reward,
|
||||
'heroBattleTimes' => $heroDb['idx'] .'|' .$heroTimes,
|
||||
'goldModeTimes' => $goldModeTimes,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user