Merge branch 'james_bc' of git.kingsome.cn:server/game2006api into james_bc

This commit is contained in:
hujiabin 2023-03-10 15:08:35 +08:00
commit 05c97da0c8

View File

@ -92,6 +92,10 @@ class HeroSkin extends BaseModel {
public static function addSkin($itemMeta) public static function addSkin($itemMeta)
{ {
$heroId = 0;
if ($itemMeta['isdefaultskin'] == 1){
$heroId = $itemMeta['playerid'];
}
SqlHelper::upsert( SqlHelper::upsert(
myself()->_getSelfMysql(), myself()->_getSelfMysql(),
't_hero_skin', 't_hero_skin',
@ -107,7 +111,7 @@ class HeroSkin extends BaseModel {
'get_from' => 0, 'get_from' => 0,
'consume_num' => 0, 'consume_num' => 0,
'try_expire_at' => 0, 'try_expire_at' => 0,
'hero_id' => 0, 'hero_id' => $heroId,
'createtime' => myself()->_getNowTime(), 'createtime' => myself()->_getNowTime(),
'modifytime' => myself()->_getNowTime() 'modifytime' => myself()->_getNowTime()
) )