1
This commit is contained in:
parent
b74526c112
commit
08cf62cfed
@ -99,11 +99,11 @@ class RankingController extends BaseAuthedController {
|
||||
if ($row){
|
||||
$hero_skin = 0;
|
||||
|
||||
$heroDb = Hero::find($row['hero_id']);
|
||||
$heroDb = Hero::findByAccountId($row['account_id'],$row['hero_id']);
|
||||
|
||||
if ($heroDb){
|
||||
$heroItemId = $heroDb['hero_id'];
|
||||
$skinDb = HeroSkin::findBx($heroItemId);
|
||||
$skinDb = HeroSkin::findByAccountId($row['account_id'],$heroItemId);
|
||||
$hero_skin = $skinDb['skin_id'];
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,18 @@ class HeroSkin extends BaseModel {
|
||||
);
|
||||
return $row;
|
||||
}
|
||||
public static function findByAccountId($accountId, $heroId)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
't_hero_skin',
|
||||
array(
|
||||
'account_id' => $accountId,
|
||||
'hero_id' => $heroId
|
||||
)
|
||||
);
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function takeonSkin($skinId,$heroId){
|
||||
$row = self::findBx($heroId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user