diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index da84b81a..560ae3e1 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -367,15 +367,14 @@ class UserController extends BaseAuthedController { )); $hero_token_id = Nft::addNft(\mt\Item::get($heroDb['hero_id'])); Hero::update($heroDb['idx'],array( - 'token_id'=>$hero_token_id + 'token_id'=>$hero_token_id, + 'account_id' => null )); $gun_token_id = Nft::addNft(\mt\Item::get($gunDb['gun_id'])); Gun::update($gunDb['idx'],array( - 'token_id'=>$gun_token_id - )); - Gun::update($gunDb['idx'],array( - 'token_id'=>$gun_token_id + 'token_id'=>$gun_token_id, + 'account_id' => null )); $propertyChgService = new services\PropertyChgService(); $propertyChgService->addUserChg(); diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index 47bd7427..bab801ac 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -127,13 +127,10 @@ class Gun extends BaseModel { ) ); } - if ($row) { - $cb($row); - } - }else{ - if ($row) { - $cb($row); - } + + } + if ($row) { + $cb($row); } } } diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index df1eda52..4da9ae25 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -120,13 +120,10 @@ class Hero extends BaseModel { ); User::upsertHeadList($itemMeta); } - if ($row) { - $cb($row); - } - } else { - if ($row) { - $cb($row); - } + + } + if ($row) { + $cb($row); } } } @@ -283,7 +280,7 @@ class Hero extends BaseModel { } SqlHelper::insert( - myself()->_getSelfMysql(), + $conn, 't_hero', $fieldsKv ); diff --git a/webapp/models/UserSeasonRing.php b/webapp/models/UserSeasonRing.php index 3444f6a9..f5bf6faf 100644 --- a/webapp/models/UserSeasonRing.php +++ b/webapp/models/UserSeasonRing.php @@ -63,11 +63,8 @@ class UserSeasonRing extends BaseModel if ($row) { $cb($row); } - }else{ - if ($row) { - $cb($row); - } } + } }