diff --git a/webapp/models/FragmentPool.php b/webapp/models/FragmentPool.php index 68292c93..be0368a4 100644 --- a/webapp/models/FragmentPool.php +++ b/webapp/models/FragmentPool.php @@ -31,6 +31,26 @@ class FragmentPool extends BaseModel { 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) { $allocTime = self::getAllocTime();