1
This commit is contained in:
parent
40c07d2a1b
commit
0f7ceebe23
@ -246,7 +246,7 @@ class Hero extends BaseModel {
|
||||
'valid_time' => max(0,
|
||||
86400 * $heroAtteMeta['validTime']),
|
||||
'is_old' => $row['is_old'],
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0),
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$row['idx']),
|
||||
"total_times" => $heroAtteMeta['roundPerDay'],
|
||||
);
|
||||
|
||||
@ -330,7 +330,7 @@ class Hero extends BaseModel {
|
||||
'valid_time' => max(0,
|
||||
86400 * $heroAtteMeta['validTime']),
|
||||
'is_old' => $row['is_old'],
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0),
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$row['idx']),
|
||||
"total_times" => $heroAtteMeta['roundPerDay'],
|
||||
);
|
||||
|
||||
@ -364,7 +364,7 @@ class Hero extends BaseModel {
|
||||
'ability' => self::abilityInfo($row),
|
||||
'valid_time' => max(0,
|
||||
86400 * $heroAtteMeta['validTime']),
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0),
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$row['idx']),
|
||||
"total_times" => $heroAtteMeta['roundPerDay'],
|
||||
);
|
||||
}
|
||||
|
@ -170,19 +170,22 @@ class RoomBattleDataService extends BaseService {
|
||||
if (!$rewardMeta){
|
||||
return ;
|
||||
}
|
||||
$heroTimes = myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$heroDb['idx']);
|
||||
$goldModeTimes = myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0);
|
||||
$heroMeta = \mt\Item::get($heroDb['hero_id']);
|
||||
$heroAtteMeta = mt\EconomyAttribute::findByGrade($heroMeta['relationship'],$heroDb['quality']);
|
||||
$maxTimes = $heroAtteMeta['roundPerDay'];
|
||||
if ($this->mapMode == mt\MapMode::GOLD_MODE){
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0,1);
|
||||
}
|
||||
$heroTimesMax = $heroAtteMeta['roundPerDay'];
|
||||
|
||||
//金币模式检验
|
||||
if ($this->mapMode == mt\MapMode::GOLD_MODE &&
|
||||
// ($goldModeTimes >= $mapModeMeta['rewards_max_time'] )){
|
||||
(!Hero::verifyValid($heroDb) || $goldModeTimes >= $maxTimes )){
|
||||
(!Hero::verifyValid($heroDb) || $heroTimes >= $heroTimesMax || $goldModeTimes >= $mapModeMeta['rewards_max_time'])){
|
||||
error_log("金币模式:出战英雄没有打金时间或每日打金场次上限");
|
||||
}else{
|
||||
if ($this->mapMode == mt\MapMode::GOLD_MODE){
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$heroDb['idx'],1);
|
||||
myself()->_incDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,0,1);
|
||||
}
|
||||
if (!empty($rewardMeta['goldLoot'])){
|
||||
$items = LootService::dropOutItem($rewardMeta['goldLoot']);
|
||||
foreach ($items as $item){
|
||||
|
Loading…
x
Reference in New Issue
Block a user