This commit is contained in:
aozhiwei 2022-09-19 18:57:51 +08:00
parent 74da8ff34d
commit 3a8b989fb4

View File

@ -31,6 +31,26 @@ class FragmentPool extends BaseModel {
return 0; return 0;
} }
public static function getHeroNum()
{
$items = self::internalGet(0);
$num = 0;
foreach ($items as $item) {
$num += $item['fragment_num'];
}
return $num;
}
public static function getGunNum()
{
$items = self::internalGet(1);
$num = 0;
foreach ($items as $item) {
$num += $item['fragment_num'];
}
return $num;
}
private static function internalGet($type) private static function internalGet($type)
{ {
$allocTime = self::getAllocTime(); $allocTime = self::getAllocTime();