1
This commit is contained in:
parent
7f8550dba5
commit
67e12dc2d6
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace services;
|
namespace services;
|
||||||
|
|
||||||
|
require_once('mt/Item.php');
|
||||||
require_once('mt/FormulaPvp.php');
|
require_once('mt/FormulaPvp.php');
|
||||||
|
|
||||||
use mt;
|
use mt;
|
||||||
@ -245,7 +246,16 @@ class FormulaService extends BaseService {
|
|||||||
public static function calcHeroPvpTiliConsume($heroDb)
|
public static function calcHeroPvpTiliConsume($heroDb)
|
||||||
{
|
{
|
||||||
//ROUND((最大角色体力值-当前剩余体力值)*(PVP角色体力总价值+PVE角色体力总价值)/最大角色体力值,0)
|
//ROUND((最大角色体力值-当前剩余体力值)*(PVP角色体力总价值+PVE角色体力总价值)/最大角色体力值,0)
|
||||||
return 0;
|
$heroMeta = mt\Item::get($heroDb['hero_id']);
|
||||||
|
if (!$heroMeta) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
$cost = round(
|
||||||
|
($heroMeta['init_tili'] - $heroDb['hero_tili']) *
|
||||||
|
(1) /
|
||||||
|
$heroMeta['init_tili']
|
||||||
|
);
|
||||||
|
return $cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function calcWeaponPvpDurabilityConsume($weaponDb)
|
public static function calcWeaponPvpDurabilityConsume($weaponDb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user