|
@@ -5,6 +5,7 @@
|
|
#include "XSYS.h"
|
|
#include "XSYS.h"
|
|
#include "CMyProfile.h"
|
|
#include "CMyProfile.h"
|
|
#include "memctrl.h"
|
|
#include "memctrl.h"
|
|
|
|
+#include "CStoryCore.h"
|
|
|
|
|
|
CDataBase *CDataBase::ms_pInstance = nullptr;
|
|
CDataBase *CDataBase::ms_pInstance = nullptr;
|
|
|
|
|
|
@@ -131,7 +132,81 @@ ushort *CDataBase::GetSortedRatingListForTier(int a1, int a2, int a3, int &list,
|
|
//-------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------
|
|
//0011B6E8
|
|
//0011B6E8
|
|
void CDataBase::GetCompetitionName(wchar_t *pbuf, int len, ELeague e, int ar3) {
|
|
void CDataBase::GetCompetitionName(wchar_t *pbuf, int len, ELeague e, int ar3) {
|
|
- //xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
|
|
+ LOGI("CDataBase::GetCompetitionName 0011B6E8 %d", ar3);
|
|
|
|
+ const wchar_t *pTmp = nullptr;
|
|
|
|
+ wchar_t *pFormat = nullptr;
|
|
|
|
+ if (((uint)ar3 - 1) < 3) {
|
|
|
|
+ // 0011B6F4
|
|
|
|
+ int dr6 = 340;
|
|
|
|
+ LOGI("CDataBase::GetCompetitionName %d", e);
|
|
|
|
+ switch (e) {
|
|
|
|
+ case ELeague_0:
|
|
|
|
+ break;
|
|
|
|
+ case ELeague_2:
|
|
|
|
+ dr6 = 341;
|
|
|
|
+ if (lang_47AEA8 == 4)
|
|
|
|
+ dr6 = 6463;
|
|
|
|
+ pFormat = LOCstring(ar3 + 69);
|
|
|
|
+ pTmp = LOCstring(dr6);
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ break;
|
|
|
|
+ case ELeague_3:
|
|
|
|
+ dr6 = 342;
|
|
|
|
+ if (lang_47AEA8 == 4)
|
|
|
|
+ dr6 = 6465;
|
|
|
|
+ pFormat = LOCstring(ar3 + 69);
|
|
|
|
+ pTmp = LOCstring(dr6);
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ break;
|
|
|
|
+ case ELeague_4:
|
|
|
|
+ dr6 = 343;
|
|
|
|
+ if (lang_47AEA8 == 4)
|
|
|
|
+ dr6 = 6464;
|
|
|
|
+ pFormat = LOCstring(ar3 + 69);
|
|
|
|
+ pTmp = LOCstring(dr6);
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ break;
|
|
|
|
+ case ELeague_5:
|
|
|
|
+ dr6 = 344;
|
|
|
|
+ if (lang_47AEA8 == 4)
|
|
|
|
+ dr6 = 6466;
|
|
|
|
+ pFormat = LOCstring(ar3 + 69);
|
|
|
|
+ pTmp = LOCstring(dr6);
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ pFormat = LOCstring(ar3 + 69);
|
|
|
|
+ pTmp = L"\0"; //&word_2BC3AA;
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ // loc_11B798
|
|
|
|
+ } else {
|
|
|
|
+ // loc_11B720
|
|
|
|
+ if (!ar3) {
|
|
|
|
+ // 0011B722
|
|
|
|
+ if (e == (ELeague)17) {
|
|
|
|
+ // 0011B726
|
|
|
|
+ LOGI("CDataBase::GetCompetitionName 0011B726");
|
|
|
|
+ pTmp = GetTeamName(MP_cMyProfile.GetNationalTeam(), ETeamNameType_0);
|
|
|
|
+ pFormat = LOCstring(6459);
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ } else {
|
|
|
|
+ // loc_11B7B2
|
|
|
|
+ LOGI("CDataBase::GetCompetitionName loc_11B7B2");
|
|
|
|
+ ushort usTeamID = CStoryCore::GetStageClubTeam(CStoryCore::m_tStageManager.tStoryStage_0.t_0.field_4);
|
|
|
|
+ pTmp = GetTeamName(usTeamID, ETeamNameType_0);
|
|
|
|
+ pFormat = (wchar_t *)L"%s";
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, pTmp);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ // loc_11B74A
|
|
|
|
+ LOGI("CDataBase::GetCompetitionName loc_11B74A");
|
|
|
|
+ pFormat = LOCstring(ar3 + 69);
|
|
|
|
+ xsnprintf(pbuf, len, pFormat, ar3);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//-------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------
|
|
//0011B7EC
|
|
//0011B7EC
|