diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index 6bd637c2..444df564 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -248,18 +248,8 @@ class Gun extends BaseModel { $lockType = $row['lock_type']; $unlockTime = $row['unlock_time']; } + $heroIds =array(); - { - $heroIds =array(); - $list = HeroPreset::getByGunUid($row['idx']); - if ($list){ - foreach ($list as $value){ - $heroDb = Hero::find($value['hero_uid']); - array_push($heroIds,$heroDb['hero_id']); - } - } - } - error_log('callstack:' . json_encode(debug_backtrace(), JSON_PRETTY_PRINT)); $dto = array( 'idx' => $row['idx'], diff --git a/webapp/models/HeroPreset.php b/webapp/models/HeroPreset.php index a148c9c2..33159320 100644 --- a/webapp/models/HeroPreset.php +++ b/webapp/models/HeroPreset.php @@ -7,20 +7,6 @@ use phpcommon; use phpcommon\SqlHelper; class HeroPreset extends BaseModel { - public static function getByGunUid($weapon_uid){ - $rows = SqlHelper::ormSelect( - myself()->_getSelfMysql(), - 't_hero_preset', - array( - 'account_id' => myself()->_getAccountId(), - 'weapon_uid1' => $weapon_uid, - ) - ); - if (!$rows){ - return null; - } - return $rows; - } public static function getHeroPreset($heroUid){ $row = SqlHelper::ormSelectOne(