diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp index 1108a98..0d4f1b2 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Controller.cpp @@ -483,7 +483,7 @@ void CheckRegioinSd(common::HardwareStateManager& manager, ::std::vectoraccountStatus && (pAccountInfo->accountStatus[0] == 'R' || + pAccountInfo->accountStatus[0] == 'T')) + { + NN_LOG("nim::Shop::Unregister\n"); + result = nn::nim::Shop::Unregister(); + NIM_SHOP_RESULT_CHECK(result); + } + } + else + { + if (pAccountInfo->accountStatus && (pAccountInfo->accountStatus[0] == 'R')) + { + NN_LOG("nim::Shop::Unregister\n"); + result = nn::nim::Shop::Unregister(); + NIM_SHOP_RESULT_CHECK(result); + } + else + { + NN_LOG("Not registered.\n"); + } + } +} + // メイン関数 void ShopOperationSingleThreadFunc(ShopThreadParam param) { @@ -403,24 +436,13 @@ void ShopOperationSingleThreadFunc(ShopThreadParam param) case SHOP_OPERATION_UNREGISTER: { - result = ShopOperationInitialize(); - NIM_SHOP_RESULT_CHECK(result); - ECAccountInfo* pAccountInfo; - result = ShopOperationConnect(&pAccountInfo); - NIM_SHOP_RESULT_CHECK(result); - if (pAccountInfo->accountStatus && (pAccountInfo->accountStatus[0] == 'R')) - { - /* --------------------------------------------------------------- - Unregister - ---------------------------------------------------------------- */ - NN_LOG("nim::Shop::Unregister\n"); - result = nn::nim::Shop::Unregister(); - NIM_SHOP_RESULT_CHECK(result); - } - else - { - NN_LOG("Not registered.\n"); - } + ShopOperationUnregisterCore(false); + } + break; + + case SHOP_OPERATION_FORCE_UNREGISTER: + { + ShopOperationUnregisterCore(true); } break; diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.h b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.h index 8dac86e..1767cf6 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.h +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.h @@ -30,6 +30,7 @@ typedef enum SHOP_OPERATION SHOP_OPERATION_CONNECT, // Shop::ConnectしてCloseするだけ SHOP_OPERATION_GET_IVS, // Shop::ImportIvsFromInfrastructureを実行 SHOP_OPERATION_UNREGISTER, // Shop::Unregisterを実行 + SHOP_OPERATION_FORCE_UNREGISTER, // アカウント移行後でもUnregisterを実行 SHOP_OPERATION_CONNECT_WITHOUT_CLOSE, // Shop::ConnectしてCloseしない SHOP_OPERATION_DOWNLOAD_TITLE, // Titleをダウンロードする SHOP_OPERATION_NUM_MAX