1
This commit is contained in:
parent
2e24daa285
commit
858296991e
@ -379,7 +379,7 @@ class Hero extends BaseModel {
|
||||
if ($count <= 0) {
|
||||
return 0;
|
||||
}
|
||||
$finalyAddGold = self::calcPveGainGold($gunDto, $count);
|
||||
$finalyAddGold = self::calcPveGainGold($heroDto, $count);
|
||||
if ($finalyAddGold > 0) {
|
||||
self::update($heroDto['hero_uniid'],
|
||||
array(
|
||||
@ -390,15 +390,15 @@ class Hero extends BaseModel {
|
||||
return $finalyAddGold;
|
||||
}
|
||||
|
||||
public static function calcPveGainGold($gunDto, $count)
|
||||
public static function calcPveGainGold($heroDto, $count)
|
||||
{
|
||||
if ($count <= 0) {
|
||||
return 0;
|
||||
}
|
||||
$newGold = min($gunDto['pve_ceg_uplimit'],
|
||||
$gunDto['today_pve_get_ceg'] +
|
||||
round($gunDto['pve_ceg_uplimit'] / $count));
|
||||
$finalyAddGold = max(0, $newGold - $gunDto['today_pve_get_ceg']);
|
||||
$newGold = min($heroDto['pve_ceg_uplimit'],
|
||||
$heroDto['today_pve_get_ceg'] +
|
||||
round($heroDto['pve_ceg_uplimit'] / $count));
|
||||
$finalyAddGold = max(0, $newGold - $heroDto['today_pve_get_ceg']);
|
||||
return $finalyAddGold;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user