diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index dce731d4..eea3483a 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -91,7 +91,7 @@ class ShopController extends BaseAuthedController { $errCode = 0; $errMsg = ''; if ($itemMeta['type'] == mt\Item::HERO_SKIN_TYPE) { - if (!$this->canBuy($itemMeta, $errCode, $errMsg)) { + if (!ShopService::canBuy($itemMeta, $errCode, $errMsg)) { myself()->_rspErr($errCode, $errMsg); return; } diff --git a/webapp/services/ShopService.php b/webapp/services/ShopService.php index 1057383c..c5b4518b 100644 --- a/webapp/services/ShopService.php +++ b/webapp/services/ShopService.php @@ -142,7 +142,7 @@ class ShopService { ); } - private static function canBuy($itemMeta, &$errCode, &$errMsg) + public static function canBuy($itemMeta, &$errCode, &$errMsg) { $errCode = 0; $errMsg = '';