This commit is contained in:
hujiabin 2023-07-11 12:04:06 +08:00
parent 3adc47b656
commit 8a1173bfcb
2 changed files with 9 additions and 9 deletions

View File

@ -343,14 +343,14 @@ class Hero extends BaseModel {
public static function internalAddHero($conn, $heroMeta, $accountId, $tokenId,$state) public static function internalAddHero($conn, $heroMeta, $accountId, $tokenId,$state)
{ {
$skinItemMeta = \mt\Item::getMetaListByType(\mt\Item::HERO_SKIN_TYPE); // $skinItemMeta = \mt\Item::getMetaListByType(\mt\Item::HERO_SKIN_TYPE);
if ($skinItemMeta){ // if ($skinItemMeta){
foreach ($skinItemMeta as $value){ // foreach ($skinItemMeta as $value){
if ($value['playerid'] == $heroMeta['id'] && $value['isdefaultskin'] ==1){ // if ($value['playerid'] == $heroMeta['id'] && $value['isdefaultskin'] ==1){
HeroSkin::addSkin($value); // HeroSkin::addSkin($value);
} // }
} // }
} // }
$realHeroMeta = mt\Hero::get($heroMeta['id']); $realHeroMeta = mt\Hero::get($heroMeta['id']);
$randAttr = self::getRandAttr($heroMeta['id']) ; $randAttr = self::getRandAttr($heroMeta['id']) ;
$fieldsKv = array( $fieldsKv = array(

View File

@ -96,7 +96,7 @@ class HeroSkin extends BaseModel {
$row = self::find($meta['id']); $row = self::find($meta['id']);
$is_have = 0; $is_have = 0;
$use_state = 0; $use_state = 0;
if ($row){ if ($row || $meta['isdefaultskin'] == 1){
$is_have = 1; $is_have = 1;
} }
if ($row && $row['hero_id']){ if ($row && $row['hero_id']){