diff --git a/Source/Archive/GPak.cpp b/Source/Archive/GPak.cpp index f078a4497..b779cb1af 100644 --- a/Source/Archive/GPak.cpp +++ b/Source/Archive/GPak.cpp @@ -8,6 +8,7 @@ #include "Utility/Hash/XxHash3.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -178,13 +179,8 @@ bool CGPak::Open(CPakFile* file) { this->m_file = file; const std::uint8_t* bytes = file->Read(0, sizeof(PakHeaderFile)); - EncryptedName<14, 0x050505679903579BULL>& eventHorizon = []() -> EncryptedName<14, 0x050505679903579BULL>& { - constexpr auto sourceText = CRYPT_NAME("Event Horizon", 0x050505679903579BULL); - const auto& source = sourceText.data; - // GLOBAL: gl_25504 - thread_local EncryptedName name(source); - return name; - }(); + // GLOBAL: gl_25504 + EncryptedName<14, 0x050505679903579BULL>& eventHorizon = OBFUSCATE_STRING("Event Horizon", 0x050505679903579BULL); if (std::memcmp(bytes, eventHorizon.Text(), 14) == 0) { const PakFileHeader* header = reinterpret_cast(bytes); @@ -192,13 +188,8 @@ bool CGPak::Open(CPakFile* file) { this->m_entryCount = header->entryCount; this->m_tableOffset = header->tableOffset + sizeof(PakFileHeader); } else { - EncryptedName<16, 0x83EFBFBB37EDBDBDULL>& masterOfMagic = []() -> EncryptedName<16, 0x83EFBFBB37EDBDBDULL>& { - constexpr auto sourceText = CRYPT_NAME("Master of Magic", 0x83EFBFBB37EDBDBDULL); - const auto& source = sourceText.data; - // GLOBAL: gl_25505 - thread_local EncryptedName name(source); - return name; - }(); + // GLOBAL: gl_25505 + EncryptedName<16, 0x83EFBFBB37EDBDBDULL>& masterOfMagic = OBFUSCATE_STRING("Master of Magic", 0x83EFBFBB37EDBDBDULL); if (std::memcmp(bytes, masterOfMagic.Text(), 16) != 0) { return false; diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index fbf1cbac6..7eddb874f 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -100,6 +100,7 @@ #include "Resource/MSGSTRINGID.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" extern "C" long long _Xtime_get_ticks(); diff --git a/Source/Client/Mode/LoginModeNotices.cpp b/Source/Client/Mode/LoginModeNotices.cpp index d6c38a2dc..036108865 100644 --- a/Source/Client/Mode/LoginModeNotices.cpp +++ b/Source/Client/Mode/LoginModeNotices.cpp @@ -10,6 +10,7 @@ #include "Utility/Cipher/XorBytes.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include "Resource/MSGSTRINGID.h" #include @@ -50,33 +51,18 @@ void CLoginMode::ReceiveBillingInfo(const unsigned char* data) { if (remainingTime == 0xFFFFFFFE && packet->remainingFreeTime == 0xFFFFFFFE) { const char* message = LookupMessage(MSI_BILLING_FREE_USER); - const char* format = [] { - constexpr std::array sourceArray = CRYPT_NAME("%s\x0A", 0x4B755DB19953E311ULL); - const std::uint8_t (&source)[4] = sourceArray._Elems; - // GLOBAL: gl_25061 - thread_local EncryptedName name(source); - return name.Text(); - }(); + // GLOBAL: gl_25061 + const char* format = OBFUSCATE_ARRAY_TEXT("%s\x0A", 0x4B755DB19953E311ULL, std::uint8_t); sprintf(text, format, message); } else if (remainingTime == 0xFFFFFFFD && packet->remainingFreeTime == 0xFFFFFFFD) { const char* message = LookupMessage(MSI_BILLING_PCB); - const char* format = [] { - constexpr std::array sourceArray = CRYPT_NAME("%s\x0A", 0xF715514F5961B75BULL); - const std::uint8_t (&source)[4] = sourceArray._Elems; - // GLOBAL: gl_25062 - thread_local EncryptedName name(source); - return name.Text(); - }(); + // GLOBAL: gl_25062 + const char* format = OBFUSCATE_ARRAY_TEXT("%s\x0A", 0xF715514F5961B75BULL, std::uint8_t); sprintf(text, format, message); } else if (remainingTime == 0xFFFFFFFF && packet->remainingFreeTime == 0xFFFFFFFF) { const char* message = LookupMessage(MSI_BILLING_INTERNET_CAFE); - const char* format = [] { - constexpr std::array sourceArray = CRYPT_NAME("%s\x0A", 0x4191BB5531FD3999ULL); - const std::uint8_t (&source)[4] = sourceArray._Elems; - // GLOBAL: gl_25063 - thread_local EncryptedName name(source); - return name.Text(); - }(); + // GLOBAL: gl_25063 + const char* format = OBFUSCATE_ARRAY_TEXT("%s\x0A", 0x4191BB5531FD3999ULL, std::uint8_t); sprintf(text, format, message); } else if (remainingTime != 0) { const std::uint32_t freeTime = packet->remainingFreeTime; @@ -85,13 +71,8 @@ void CLoginMode::ReceiveBillingInfo(const unsigned char* data) { sprintf(text, message, remainingTime / (60 * 24), remainingTime / minutesPerHour % hoursPerDay, remainingTime % minutesPerHour, freeTime / minutesPerHour, freeTime % minutesPerHour); } else { const char* message = LookupMessage(MSI_BILLING_100); - const char* format = [] { - constexpr std::array sourceArray = CRYPT_NAME("%s\x0A", 0xB19D1FA9116F39D3ULL); - const std::uint8_t (&source)[4] = sourceArray._Elems; - // GLOBAL: gl_25064 - thread_local EncryptedName name(source); - return name.Text(); - }(); + // GLOBAL: gl_25064 + const char* format = OBFUSCATE_ARRAY_TEXT("%s\x0A", 0xB19D1FA9116F39D3ULL, std::uint8_t); sprintf(text, format, message); const std::uint32_t time = packet->remainingTime; const char* dayFormat = LookupMessage(MSI_BILLING_DAY_HOUR_MINUTES); @@ -100,25 +81,15 @@ void CLoginMode::ReceiveBillingInfo(const unsigned char* data) { } else { if (packet->remainingFreeTime > 0) { const char* message = LookupMessage(MSI_BILLING_800); - const char* format = [] { - constexpr std::array sourceArray = CRYPT_NAME("%s\x0A", 0x9569C9C7E70909AFULL); - const std::uint8_t (&source)[4] = sourceArray._Elems; - // GLOBAL: gl_25065 - thread_local EncryptedName name(source); - return name.Text(); - }(); + // GLOBAL: gl_25065 + const char* format = OBFUSCATE_ARRAY_TEXT("%s\x0A", 0x9569C9C7E70909AFULL, std::uint8_t); sprintf(text, format, message); const std::uint32_t freeTime = packet->remainingFreeTime; const char* hourFormat = LookupMessage(MSI_BILLING_HOUR_MINUTES); sprintf(text + strlen(text), hourFormat, freeTime / minutesPerHour, freeTime % minutesPerHour); } else { - const char* format = [] { - constexpr std::array sourceArray = CRYPT_NAME("\x0A", 0xD7A749EB27D5BF6DULL); - const std::uint8_t (&source)[2] = sourceArray._Elems; - // GLOBAL: gl_25066 - thread_local EncryptedName name(source); - return name.Text(); - }(); + // GLOBAL: gl_25066 + const char* format = OBFUSCATE_ARRAY_TEXT("\x0A", 0xD7A749EB27D5BF6DULL, std::uint8_t); sprintf(text, format); } } diff --git a/Source/Client/Stove/StoveMgr.cpp b/Source/Client/Stove/StoveMgr.cpp index b2128a7b5..147ff233e 100644 --- a/Source/Client/Stove/StoveMgr.cpp +++ b/Source/Client/Stove/StoveMgr.cpp @@ -689,11 +689,6 @@ void TermsAgreementCallback::operator()(Stove::PCSDK::CallbackResult callbackRes g_modeMgr.GetGameMode()->SendMsg(MM_REQUEST_CASH_SHOP, 0, 0, 0, 0); } else { std::string path = EncodeText(CP_ACP, std::wstring(url)); - ShellExecuteA(nullptr, [] { - constexpr auto sourceText = CRYPT_NAME("OPEN", 0x2FF3C5036D070127ULL); - const auto& source = sourceText.data; - thread_local EncryptedName verb(source); - return verb.Text(); - }(), path.c_str(), path.c_str(), nullptr, SW_SHOWNORMAL); + ShellExecuteA(nullptr, OBFUSCATE_TEXT_NAMED("OPEN", 0x2FF3C5036D070127ULL, verb), path.c_str(), path.c_str(), nullptr, SW_SHOWNORMAL); } } diff --git a/Source/Contents/Achievement/AchievementMgr.cpp b/Source/Contents/Achievement/AchievementMgr.cpp index c2b1e7272..251a475b0 100644 --- a/Source/Contents/Achievement/AchievementMgr.cpp +++ b/Source/Contents/Achievement/AchievementMgr.cpp @@ -5,6 +5,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" template __declspec(noinline) int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; diff --git a/Source/Contents/Effects/Particles/CharacterParticleBundle.cpp b/Source/Contents/Effects/Particles/CharacterParticleBundle.cpp index bd0be7e80..c53861aa0 100644 --- a/Source/Contents/Effects/Particles/CharacterParticleBundle.cpp +++ b/Source/Contents/Effects/Particles/CharacterParticleBundle.cpp @@ -1,6 +1,7 @@ #include "Contents/Effects/Particles/CharacterParticleBundle.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include "Client/Mode/CGameMode.h" #include "Client/Mode/ModeMgr.h" @@ -141,12 +142,7 @@ const std::vector& CChopChopClawMarks::GetRing(int radius) { // OFFSET: 0x005A3C70 // FUNCTION: fn_03135 void CChopChopClawMarks::OnInit() { - const int id = CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytesArray = CRYPT_NAME("chop_chop", 0x59278F63D79F3DA1ULL); - const std::uint8_t (&bytes)[10] = bytesArray._Elems; - thread_local EncryptedName name(bytes); - return name.Text(); - }()); + const int id = CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("chop_chop", 0x59278F63D79F3DA1ULL, std::uint8_t)); if (EZ2STREffectInfo* info = CEZ2STREffectMgr::GetInstance()->FindById(id)) { this->offsetX = info->offsetX; this->offsetY = info->offsetY; diff --git a/Source/Contents/Effects/Particles/SpriteEffect.cpp b/Source/Contents/Effects/Particles/SpriteEffect.cpp index 059f477bb..e15e96e03 100644 --- a/Source/Contents/Effects/Particles/SpriteEffect.cpp +++ b/Source/Contents/Effects/Particles/SpriteEffect.cpp @@ -2,6 +2,7 @@ #include "Contents/Effects/Particles/SpriteEffect.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include "Client/Mode/CGameMode.h" #include "Client/Mode/ModeMgr.h" diff --git a/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp b/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp index 6aabbdb4d..044ac7858 100644 --- a/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp +++ b/Source/Contents/Emblems/EmblemDataDownloadAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -30,7 +31,7 @@ namespace { } // GLOBAL: gl_25609 -const char* g_emblemDataDownloadPoolName = DecryptName<0x17359BF953C367B3ULL>(CRYPT_BYTES(16, "Emblem_Download", 0x17359BF953C367B3ULL)); +const char* g_emblemDataDownloadPoolName = OBFUSCATE_ARRAY_TEXT("Emblem_Download", 0x17359BF953C367B3ULL, std::uint8_t); // OFFSET: 0x005E9C00 // FUNCTION: fn_03963 diff --git a/Source/Contents/Map/MapNameTable.cpp b/Source/Contents/Map/MapNameTable.cpp index 70670c074..b2f92cf6e 100644 --- a/Source/Contents/Map/MapNameTable.cpp +++ b/Source/Contents/Map/MapNameTable.cpp @@ -7,6 +7,7 @@ #include "Utility/Cipher/XorBytes.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include diff --git a/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp b/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp index c57d8afab..9139a6376 100644 --- a/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp +++ b/Source/Contents/Party/ChangePartyMasterAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -24,7 +25,7 @@ namespace { } // GLOBAL: gl_25602 -const char* g_changePartyMasterPoolName = DecryptName<0x93E7A3A1F587CDC5ULL>(CRYPT_BYTES(19, "Change_PartyMaster", 0x93E7A3A1F587CDC5ULL)); +const char* g_changePartyMasterPoolName = OBFUSCATE_ARRAY_TEXT("Change_PartyMaster", 0x93E7A3A1F587CDC5ULL, std::uint8_t); // OFFSET: 0x005CD7B0 // FUNCTION: fn_03677 diff --git a/Source/Contents/Party/LoadMyPartyAsyncWork.cpp b/Source/Contents/Party/LoadMyPartyAsyncWork.cpp index c59d53f3e..5272106ed 100644 --- a/Source/Contents/Party/LoadMyPartyAsyncWork.cpp +++ b/Source/Contents/Party/LoadMyPartyAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -24,7 +25,7 @@ namespace { } // GLOBAL: gl_25599 -const char* g_loadMyPartyPoolName = DecryptName<0x93E7A3A1F587CDC5ULL>(CRYPT_BYTES(13, "MyParty_Load", 0x93E7A3A1F587CDC5ULL)); +const char* g_loadMyPartyPoolName = OBFUSCATE_ARRAY_TEXT("MyParty_Load", 0x93E7A3A1F587CDC5ULL, std::uint8_t); // OFFSET: 0x005CF1B0 // FUNCTION: fn_03685 diff --git a/Source/Contents/Party/LoadPartyInfoAsyncWork.cpp b/Source/Contents/Party/LoadPartyInfoAsyncWork.cpp index 5437fa852..e6e0d2aa1 100644 --- a/Source/Contents/Party/LoadPartyInfoAsyncWork.cpp +++ b/Source/Contents/Party/LoadPartyInfoAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -24,7 +25,7 @@ namespace { } // GLOBAL: gl_25603 -const char* g_loadPartyInfoPoolName = DecryptName<0x93E7A3A1F587CDC5ULL>(CRYPT_BYTES(15, "PartyInfo_Load", 0x93E7A3A1F587CDC5ULL)); +const char* g_loadPartyInfoPoolName = OBFUSCATE_ARRAY_TEXT("PartyInfo_Load", 0x93E7A3A1F587CDC5ULL, std::uint8_t); // OFFSET: 0x005D0470 // FUNCTION: fn_03692 diff --git a/Source/Contents/Party/StopRecruitingAsyncWork.cpp b/Source/Contents/Party/StopRecruitingAsyncWork.cpp index 454e9569a..ff2b83e0e 100644 --- a/Source/Contents/Party/StopRecruitingAsyncWork.cpp +++ b/Source/Contents/Party/StopRecruitingAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -24,7 +25,7 @@ namespace { } // GLOBAL: gl_25606 -const char* g_stopRecruitingPoolName = DecryptName<0xD97D5DBDBB2F2709ULL>(CRYPT_BYTES(16, "Stop_Recruiting", 0xD97D5DBDBB2F2709ULL)); +const char* g_stopRecruitingPoolName = OBFUSCATE_ARRAY_TEXT("Stop_Recruiting", 0xD97D5DBDBB2F2709ULL, std::uint8_t); // OFFSET: 0x005D5D70 // FUNCTION: fn_03711 diff --git a/Source/Contents/Skills/SkillActionAlitea.cpp b/Source/Contents/Skills/SkillActionAlitea.cpp index b7676c0ac..416509ae2 100644 --- a/Source/Contents/Skills/SkillActionAlitea.cpp +++ b/Source/Contents/Skills/SkillActionAlitea.cpp @@ -386,11 +386,7 @@ public: void CSkillAction_DamageWereRaptorForm::PlayFormAttackEffect(CGameActor* actor) { if (actor) { EffectLists* effects = g_effectMgr; - effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("dr_hit_wereraptor", 0x1D6D75EDE7CD311FULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); + effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("dr_hit_wereraptor", 0x1D6D75EDE7CD311FULL, char)), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } } @@ -398,11 +394,7 @@ void CSkillAction_DamageWereRaptorForm::PlayFormAttackEffect(CGameActor* actor) // FUNCTION: fn_03156 void CSkillAction_DamageWereWolfForm::PlayFormAttackEffect(CGameActor* actor) { if (actor) { - g_effectMgr->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("dr_hit_werewolf", 0x3375B1C7DBB5FD55ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + g_effectMgr->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("dr_hit_werewolf", 0x3375B1C7DBB5FD55ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } } @@ -420,11 +412,7 @@ void CSkillAction_Icing::SpawnIcing(CGameActor* target) { // FUNCTION: fn_03158 void CSkillAction_ThunderingBasic::PlayThunderEffect(CGameActor* source) { if (source) { - g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("thundering_attack_g", 0x3FAF85D995034FD7ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("thundering_attack_g", 0x3FAF85D995034FD7ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } } @@ -433,12 +421,7 @@ void CSkillAction_ThunderingBasic::PlayThunderEffect(CGameActor* source) { void CSkillAction_ThunderingExpand::PlayThunderEffect(CGameActor* source) { if (source) { EffectLists* effects = g_effectMgr; - effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytesArray = CRYPT_NAME("thundering_attack_y", 0x490FFB43A12F0DB9ULL); - const std::uint8_t (&bytes)[20] = bytesArray._Elems; - thread_local EncryptedName name(bytes); - return name.Text(); - }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); + effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("thundering_attack_y", 0x490FFB43A12F0DB9ULL, std::uint8_t)), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } } @@ -608,11 +591,7 @@ void CSkillAction_Icing::OnSkillCast(int level, CGameActor* source) { // FUNCTION: fn_03180 void CSkillAction_Thundering::OnSkillCast(int level, CGameActor* source) { if (source) { - if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("thundering_cast", 0x93E7A3A1F587CDC5ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { + if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("thundering_cast", 0x93E7A3A1F587CDC5ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { effect->SetLifeTime(level); } } @@ -722,12 +701,7 @@ void CSkillAction_AT_PULSE_OF_MADNESS::OnSkillCast(int level, CGameActor* source void CSkillAction_AT_PULSE_OF_MADNESS::OnSkillEffect(int level, CGameActor* source, CGameActor* target) { this->CanUse(source); - g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytesArray = CRYPT_NAME("pulse_of_madness", 0x2FF3C5036D070127ULL); - const std::uint8_t (&bytes)[17] = bytesArray._Elems; - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("pulse_of_madness", 0x2FF3C5036D070127ULL, std::uint8_t)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } // OFFSET: 0x005A6C00 @@ -841,11 +815,7 @@ void CSkillAction_AT_QUILL_SPEAR::OnSkillEffect(int level, CGameActor* source, C return; } - const int effectId = CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("quill_spear_3x7", 0x93E7A3A1F587CDC5ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()); + const int effectId = CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("quill_spear_3x7", 0x93E7A3A1F587CDC5ULL, char)); if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, effectId, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0)) { const float angle = ScreenAngle( &source->render.position.x, &target->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values @@ -864,11 +834,7 @@ void CSkillAction_AT_QUILL_SPEAR_S::OnSkillEffect(int level, CGameActor* source, return; } - const int effectId = CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("quill_spear_5x7", 0x3FAF85D995034FD7ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()); + const int effectId = CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("quill_spear_5x7", 0x3FAF85D995034FD7ULL, char)); if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, effectId, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0)) { const float angle = ScreenAngle( &source->render.position.x, &target->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values @@ -955,17 +921,9 @@ void CSkillAction_AT_GRAVITY_HOLE::OnSkillDamage(int level, CGameActor* source, void CSkillAction_AT_GRAVITY_HOLE::OnSkillEffect(int level, CGameActor* source, CGameActor* target) { if (source) { EffectLists* effects = g_effectMgr; - effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("gravity_hole", 0x91651D81F559F971ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); + effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("gravity_hole", 0x91651D81F559F971ULL, char)), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("gravity_hole_bottom", 0x73D1674B61DF7B0BULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); + effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("gravity_hole_bottom", 0x73D1674B61DF7B0BULL, char)), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } } @@ -1006,32 +964,16 @@ void CSkillObjectAction_AT_GLACIER_MONOLITH::OnSkillObjectCreate(int argument, C } EffectLists* effects = g_effectMgr; - effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("glacier_monolith_start", 0xD3755DD95F47A909ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("glacier_monolith_start", 0xD3755DD95F47A909ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("glacier_monolith_start_bottom", 0x31D7C1EDA345E36DULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("glacier_monolith_start_bottom", 0x31D7C1EDA345E36DULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); effects = g_effectMgr; - if (CEffect* effect = effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("glacier_monolith_loop", 0xC7912587FFF31B71ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { + if (CEffect* effect = effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("glacier_monolith_loop", 0xC7912587FFF31B71ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { effect->SetDelay(990); } effects = g_effectMgr; - if (CEffect* effect = effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("glacier_monolith_loop_bottom", 0x69D345DB950F336DULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { + if (CEffect* effect = effects->Spawn(object->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("glacier_monolith_loop_bottom", 0x69D345DB950F336DULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { effect->SetDelay(990); } } @@ -1071,11 +1013,7 @@ void CSkillAction_AT_GLACIER_NOVA::OnGroundSkillEffect(vector3d position, int ar // FUNCTION: fn_03226 void CSkillAction_AT_GLACIER_SHARD::OnGroundSkillCast(int level, CGameActor* source, int argument3, int argument4, int argument5) { if (source) { - if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("glacier_shard_target", 0x151F77EBEBBB2147ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { + if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("glacier_shard_target", 0x151F77EBEBBB2147ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { effect->SetLifeTime(level); } } @@ -1133,17 +1071,9 @@ int CSkillAction_AT_ROARING_CHARGE_S::GetSkillAttackMotion() { void CSkillAction_AT_ROARING_CHARGE_S::OnSkillEffect(int level, CGameActor* source, CGameActor* target) { if (source) { EffectLists* effects = g_effectMgr; - effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("roaring_charge_s", 0x8B3FEB5B8BD5C3C3ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("roaring_charge_s", 0x8B3FEB5B8BD5C3C3ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("roaring_charge_s_bottom", 0x0BEB63A5C905B3A7ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("roaring_charge_s_bottom", 0x0BEB63A5C905B3A7ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } } @@ -1229,32 +1159,12 @@ void CSkillAction_AT_FURIOS_STORM::PlayThunderEffect(CGameActor* source) { // FUNCTION: fn_03239 void CEfstAction_FURIOS_STORM::OnEfstEnd(int efstId, int argument2, int argument3, int argument4, CRenderObject* actor) { if (actor) { - g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("thundering_cast", 0x7FC1015DFFCF6D19ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); + g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("thundering_cast", 0x7FC1015DFFCF6D19ULL, std::uint8_t))); for (int index = 0; index < 4; ++index) { - g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("furios_storm_a", 0xCB3FBD4183DB8323ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); - g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("furios_storm_a_bottom", 0x7FCD77F9C7CBD14DULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); - g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("furios_storm_b", 0xD1538513DF975701ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); - g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("furios_storm_b_bottom", 0x91E147EBBD47C39FULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); + g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("furios_storm_a", 0xCB3FBD4183DB8323ULL, std::uint8_t))); + g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("furios_storm_a_bottom", 0x7FCD77F9C7CBD14DULL, std::uint8_t))); + g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("furios_storm_b", 0xD1538513DF975701ULL, std::uint8_t))); + g_effectMgr->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("furios_storm_b_bottom", 0x91E147EBBD47C39FULL, std::uint8_t))); } } } @@ -1419,17 +1329,9 @@ int CSkillAction_AT_TEMPEST_FLAP::GetSkillAttackMotion() { void CSkillAction_AT_TEMPEST_FLAP::OnSkillEffect(int level, CGameActor* source, CGameActor* target) { if (target) { EffectLists* effects = g_effectMgr; - effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("tempest_flap", 0x17FFC98B398FAF61ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); + effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("tempest_flap", 0x17FFC98B398FAF61ULL, char)), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("tempest_flap_bottom", 0x9B5B959B954D9333ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); + effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("tempest_flap_bottom", 0x9B5B959B954D9333ULL, char)), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } } @@ -1448,28 +1350,8 @@ void CSkillAction_AT_TERRA_HARVEST::OnSkillEffect(int level, CGameActor* source, const int roll = std::rand() % 2; const int variant = roll >= 0 ? roll : 0; - const int effectId = CEZ2STREffectMgr::GetInstance()->EffectId(variant ? std::string([] { - constexpr auto bytesText = CRYPT_NAME("terra_harvest_red", 0xAFA5617F178B6185ULL); - const auto& bytes = bytesText.data; - thread_local EncryptedName name(bytes); - return name.Text(); - }()) : std::string([] { - constexpr auto bytesText = CRYPT_NAME("terra_harvest_yellow", 0x078143534999254DULL); - const auto& bytes = bytesText.data; - thread_local EncryptedName name(bytes); - return name.Text(); - }())); - const int bottomId = CEZ2STREffectMgr::GetInstance()->EffectId(variant ? std::string([] { - constexpr auto bytesText = CRYPT_NAME("terra_harvest_red_bottom", 0x8741152D8FB34B4FULL); - const auto& bytes = bytesText.data; - thread_local EncryptedName name(bytes); - return name.Text(); - }()) : std::string([] { - constexpr auto bytesText = CRYPT_NAME("terra_harvest_yellow_bottom", 0x955D4DF94DE9BB07ULL); - const auto& bytes = bytesText.data; - thread_local EncryptedName name(bytes); - return name.Text(); - }())); + const int effectId = CEZ2STREffectMgr::GetInstance()->EffectId(variant ? std::string(OBFUSCATE_TEXT("terra_harvest_red", 0xAFA5617F178B6185ULL)) : std::string(OBFUSCATE_TEXT("terra_harvest_yellow", 0x078143534999254DULL))); + const int bottomId = CEZ2STREffectMgr::GetInstance()->EffectId(variant ? std::string(OBFUSCATE_TEXT("terra_harvest_red_bottom", 0x8741152D8FB34B4FULL)) : std::string(OBFUSCATE_TEXT("terra_harvest_yellow_bottom", 0x955D4DF94DE9BB07ULL))); g_effectMgr->Spawn(target->render.accountId, effectId, vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); g_effectMgr->Spawn(target->render.accountId, bottomId, vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } @@ -1478,17 +1360,9 @@ void CSkillAction_AT_TERRA_HARVEST::OnSkillEffect(int level, CGameActor* source, // FUNCTION: fn_03268 void CSkillAction_AT_TERRA_WAVE::OnGroundSkillEffect(vector3d position, int argument2, int argument3) { EffectLists* effects = g_effectMgr; - effects->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("terra_wave", 0xC399B7091589B50BULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), position.x, position.y, position.z, 0, -1, 0, 0); + effects->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("terra_wave", 0xC399B7091589B50BULL, char)), position.x, position.y, position.z, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("terra_wave_bottom", 0xB739073FE921AD6FULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), position.x, position.y, position.z, 0, -1, 0, 0); + effects->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("terra_wave_bottom", 0xB739073FE921AD6FULL, char)), position.x, position.y, position.z, 0, -1, 0, 0); } // OFFSET: 0x005AD970 @@ -1502,17 +1376,9 @@ int CSkillAction_AT_SOLID_STOMP::GetSkillAttackMotion() { void CSkillAction_AT_SOLID_STOMP::OnSkillEffect(int level, CGameActor* source, CGameActor* target) { if (target) { EffectLists* effects = g_effectMgr; - effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("solid_stomp", 0xFF7D83CB791339D9ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("solid_stomp", 0xFF7D83CB791339D9ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("solid_stomp_bottom", 0xED5143E7C1B39315ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("solid_stomp_bottom", 0xED5143E7C1B39315ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } } @@ -1540,17 +1406,9 @@ void CEfstAction_ZEPHYR_LINK::OnEfstBegin(int efstId, int value, int argument3, if (actor) { this->OnEfstEnd(efstId, value, argument3, argument4, actor); EffectLists* effects = g_effectMgr; - effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("zephyr_link", 0x393D916561BDC391ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("zephyr_link", 0x393D916561BDC391ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); effects = g_effectMgr; - effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("zephyr_link_bottom", 0x31956551B311FD95ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); + effects->Spawn(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("zephyr_link_bottom", 0x31956551B311FD95ULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0); } } @@ -1559,17 +1417,9 @@ void CEfstAction_ZEPHYR_LINK::OnEfstBegin(int efstId, int value, int argument3, void CEfstAction_ZEPHYR_LINK::OnEfstEnd(int efstId, int argument2, int argument3, int argument4, CRenderObject* actor) { if (actor) { EffectLists* effects = g_effectMgr; - effects->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("zephyr_link", 0x2F2701A7E56D3D89ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); + effects->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("zephyr_link", 0x2F2701A7E56D3D89ULL, char))); effects = g_effectMgr; - effects->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("zephyr_link_bottom", 0x6B3301E1A3079125ULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }())); + effects->Retire(actor->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("zephyr_link_bottom", 0x6B3301E1A3079125ULL, char))); } } @@ -1668,11 +1518,7 @@ void CSkillAction_AT_SAVAGE_LUNGE::OnSkillEffect(int level, CGameActor* source, // FUNCTION: fn_03264 void CSkillAction_AT_TEMPEST_FLAP::OnSkillCast(int level, CGameActor* source) { if (this->CanUse(source)) { - if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId([] { - constexpr std::array bytes = CRYPT_NAME("tempest_flap_cast", 0x33832D4D3FDFBDBFULL); - thread_local EncryptedName name(bytes); - return name.Text(); - }()), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { + if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId(OBFUSCATE_ARRAY_TEXT("tempest_flap_cast", 0x33832D4D3FDFBDBFULL, char)), vector3d{0.0f, 0.0f, 0.0f}, 0, -1, 0, 0)) { effect->SetLifeTime(level); } } diff --git a/Source/Contents/Tables/TipBoxTitles.cpp b/Source/Contents/Tables/TipBoxTitles.cpp index 5b84aa357..a92c810c1 100644 --- a/Source/Contents/Tables/TipBoxTitles.cpp +++ b/Source/Contents/Tables/TipBoxTitles.cpp @@ -8,6 +8,7 @@ #include "Utility/Cipher/XorBytes.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" extern "C" { #include diff --git a/Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.cpp b/Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.cpp index 28504e1cf..0d04b6030 100644 --- a/Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.cpp +++ b/Source/Contents/UserData/CharacterLinkedUserDataLoadAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -26,7 +27,7 @@ namespace { } // GLOBAL: gl_25607 -const char* g_characterLinkedUserDataLoadPoolName = DecryptName<0xC52FB5FBB94FF917ULL>(CRYPT_BYTES(29, "CharacterLinkedUserData_Load", 0xC52FB5FBB94FF917ULL)); +const char* g_characterLinkedUserDataLoadPoolName = OBFUSCATE_ARRAY_TEXT("CharacterLinkedUserData_Load", 0xC52FB5FBB94FF917ULL, std::uint8_t); // OFFSET: 0x005E4A50 // FUNCTION: fn_03916 diff --git a/Source/Contents/UserData/CharacterLinkedUserDataSaveAsyncWork.cpp b/Source/Contents/UserData/CharacterLinkedUserDataSaveAsyncWork.cpp index 8eceeb51e..a6cd59baf 100644 --- a/Source/Contents/UserData/CharacterLinkedUserDataSaveAsyncWork.cpp +++ b/Source/Contents/UserData/CharacterLinkedUserDataSaveAsyncWork.cpp @@ -7,6 +7,7 @@ #include "Utility/Text/FormatString.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -26,7 +27,7 @@ namespace { } // GLOBAL: gl_25608 -const char* g_characterLinkedUserDataSavePoolName = DecryptName<0x17359BF953C367B3ULL>(CRYPT_BYTES(29, "CharacterLinkedUserData_Save", 0x17359BF953C367B3ULL)); +const char* g_characterLinkedUserDataSavePoolName = OBFUSCATE_ARRAY_TEXT("CharacterLinkedUserData_Save", 0x17359BF953C367B3ULL, std::uint8_t); // OFFSET: 0x005E7C10 // FUNCTION: fn_03944 diff --git a/Source/Security/NProtectGameGuardMgr.cpp b/Source/Security/NProtectGameGuardMgr.cpp index a292be1fe..9ddfd8ee8 100644 --- a/Source/Security/NProtectGameGuardMgr.cpp +++ b/Source/Security/NProtectGameGuardMgr.cpp @@ -9,6 +9,7 @@ #include "Utility/Threading/NSyncObject.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include "Resource/MSGSTRINGID.h" #include diff --git a/Source/UI/Dialogs/UILocaleTextWnd.cpp b/Source/UI/Dialogs/UILocaleTextWnd.cpp index 4d18d3de6..a4cdbc51a 100644 --- a/Source/UI/Dialogs/UILocaleTextWnd.cpp +++ b/Source/UI/Dialogs/UILocaleTextWnd.cpp @@ -3,6 +3,7 @@ #include "Utility/Cipher/XorBytes.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include #include @@ -20,12 +21,7 @@ void CUISubTab::OnCreate(int width, int height) { this->labelText->SetText(""); this->labelText->SetFitText(0); this->labelText->SetAlign(6, 6); - this->labelText->SetFont([] { - constexpr std::array fontSourceArray = CRYPT_NAME("Gulim", 0xB127A19D775BF751ULL); - const std::uint8_t (&fontSource)[6] = fontSourceArray._Elems; - thread_local EncryptedName fontName(fontSource); - return fontName.Text(); - }()); + this->labelText->SetFont(OBFUSCATE_TEXT_NAMED("Gulim", 0xB127A19D775BF751ULL, fontName)); this->labelText->SetFontHeight(12); this->labelText->SetBold(1); this->labelText->SetColor(0x5F3C2C); @@ -36,11 +32,7 @@ void CUISubTab::OnCreate(int width, int height) { this->stampImage = new CUIStaticImage(); this->stampImage->SetSize(40, 26); this->stampImage->Move(58, 0); - this->stampImage->SetImage([] { - const std::array stampSource = CRYPT_CHARS(54, "유저인터페이스\\AdventureGuide\\stamp_completed_sub.bmp", 0x0F61499B4973EB5DULL); - thread_local EncryptedName stampName(stampSource); - return stampName.Text(); - }()); + this->stampImage->SetImage(OBFUSCATE_TEXT_NAMED("유저인터페이스\\AdventureGuide\\stamp_completed_sub.bmp", 0x0F61499B4973EB5DULL, stampName)); this->AddChild(this->stampImage); } @@ -77,12 +69,7 @@ void CUITabInfo::OnCreate(int width, int height) { this->titleText->SetText(""); this->titleText->SetFitText(0); this->titleText->SetAlign(0, 6); - this->titleText->SetFont([] { - constexpr std::array fontSourceArray = CRYPT_NAME("Gulim", 0xCD8F077123FB7D6FULL); - const std::uint8_t (&fontSource)[6] = fontSourceArray._Elems; - thread_local EncryptedName fontName(fontSource); - return fontName.Text(); - }()); + this->titleText->SetFont(OBFUSCATE_TEXT_NAMED("Gulim", 0xCD8F077123FB7D6FULL, fontName)); this->titleText->SetFontHeight(12); this->titleText->SetBold(1); this->titleText->SetColor(0x815A48); @@ -96,11 +83,7 @@ void CUITabInfo::OnCreate(int width, int height) { this->descriptionText->SetText(""); this->descriptionText->SetFitText(1); this->descriptionText->SetAlign(0, 6); - this->descriptionText->SetFont([] { - const std::uint8_t fontSource[] = CRYPT_BYTES(6, "Gulim", 0x9949BFD527532943ULL); - thread_local EncryptedName fontName(fontSource); - return fontName.Text(); - }()); + this->descriptionText->SetFont(OBFUSCATE_TEXT_NAMED("Gulim", 0x9949BFD527532943ULL, fontName)); this->descriptionText->SetFontHeight(12); this->descriptionText->SetBold(0); this->descriptionText->SetColor(0x2A435D); diff --git a/Source/UI/Items/UIEquipmentPropertiesWnd.cpp b/Source/UI/Items/UIEquipmentPropertiesWnd.cpp index 4070fd43b..fe18206bf 100644 --- a/Source/UI/Items/UIEquipmentPropertiesWnd.cpp +++ b/Source/UI/Items/UIEquipmentPropertiesWnd.cpp @@ -3,6 +3,7 @@ #include "UI/Items/UIEquipmentPropertiesWnd.h" #include "Utility/Cipher/LocalEncryptedName.h" #include "Utility/Cipher/CryptName.h" +#include "Utility/Cipher/Obfuscate.h" #include "Contents/Tables/MessageTable.h" #include "Contents/Messenger/ClientMessenger.h" @@ -282,24 +283,12 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { this->titleBar->Move(0, 0); { CUITitleBar* titleBar = this->titleBar; - const std::string right([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\titlebar_right.bmp", 0x0B7109397F6B1387ULL); - // GLOBAL: gl_25321 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string middle([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\titlebar_mid.bmp", 0x03772763F96D9DA5ULL); - // GLOBAL: gl_25322 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string left([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\titlebar_left.bmp", 0xC517FB932D95BB6DULL); - // GLOBAL: gl_25323 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25321 + const std::string right(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\titlebar_right.bmp", 0x0B7109397F6B1387ULL, char)); + // GLOBAL: gl_25322 + const std::string middle(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\titlebar_mid.bmp", 0x03772763F96D9DA5ULL, char)); + // GLOBAL: gl_25323 + const std::string left(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\titlebar_left.bmp", 0xC517FB932D95BB6DULL, char)); titleBar->SetImages(left, middle, right); } this->AddChild(this->titleBar); @@ -311,12 +300,8 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { title->SetFitText(0); title->SetAlign(0, 6); { - title->SetFont(std::string([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x13E33FA1A591AB67ULL); - // GLOBAL: gl_25324 - thread_local EncryptedName name(source); - return name.Text(); - }())); + // GLOBAL: gl_25324 + title->SetFont(std::string(OBFUSCATE_ARRAY_TEXT("Gulim", 0x13E33FA1A591AB67ULL, char))); } title->SetFontHeight(12); title->SetBold(0); @@ -334,30 +319,14 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { baseButton->disabled = 0; baseButton->Invalidate(); { - const std::string inactive([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_base_off.bmp", 0xD97D5DBDBB2F2709ULL); - // GLOBAL: gl_25325 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string pressed([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_base_on.bmp", 0xCD8F077123FB7D6FULL); - // GLOBAL: gl_25326 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string hover([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_base_on.bmp", 0x9949BFD527532943ULL); - // GLOBAL: gl_25327 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string normal([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_base_off.bmp", 0x17A9E5BF39AD4737ULL); - // GLOBAL: gl_25328 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25325 + const std::string inactive(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_base_off.bmp", 0xD97D5DBDBB2F2709ULL, char)); + // GLOBAL: gl_25326 + const std::string pressed(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_base_on.bmp", 0xCD8F077123FB7D6FULL, char)); + // GLOBAL: gl_25327 + const std::string hover(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_base_on.bmp", 0x9949BFD527532943ULL, char)); + // GLOBAL: gl_25328 + const std::string normal(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_base_off.bmp", 0x17A9E5BF39AD4737ULL, char)); baseButton->SetImages(normal, hover, pressed, inactive); } this->titleBar->AddChild(baseButton); @@ -369,30 +338,14 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { closeButton->disabled = 0; closeButton->Invalidate(); { - const std::string inactive([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_close_off.bmp", 0xDD3913D5D7F97BE1ULL); - // GLOBAL: gl_25329 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string pressed([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_close_on.bmp", 0xA5FD29D7AB6DC59FULL); - // GLOBAL: gl_25331 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string hover([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_close_on.bmp", 0xF14F79170939C7F1ULL); - // GLOBAL: gl_25333 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string normal([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\basic_interface\\sys_close_off.bmp", 0xED796785D1DF137FULL); - // GLOBAL: gl_25335 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25329 + const std::string inactive(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_close_off.bmp", 0xDD3913D5D7F97BE1ULL, char)); + // GLOBAL: gl_25331 + const std::string pressed(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_close_on.bmp", 0xA5FD29D7AB6DC59FULL, char)); + // GLOBAL: gl_25333 + const std::string hover(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_close_on.bmp", 0xF14F79170939C7F1ULL, char)); + // GLOBAL: gl_25335 + const std::string normal(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\basic_interface\\sys_close_off.bmp", 0xED796785D1DF137FULL, char)); closeButton->SetImages(normal, hover, pressed, inactive); } this->titleBar->SetSecondButton(closeButton); @@ -413,50 +366,26 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { this->list->scrollBar->step = 18; { auto* list = this->list; - const std::string down([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\scroll0down.bmp", 0x83EFBFBB37EDBDBDULL); - // GLOBAL: gl_25336 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string up([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\scroll0up.bmp", 0x050505679903579BULL); - // GLOBAL: gl_25337 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25336 + const std::string down(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\scroll0down.bmp", 0x83EFBFBB37EDBDBDULL, char)); + // GLOBAL: gl_25337 + const std::string up(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\scroll0up.bmp", 0x050505679903579BULL, char)); list->scrollBar->SetButtonImages(up, down); } { auto* list = this->list; - const std::string background([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\scroll0mid.bmp", 0xBF2B4B31397FF5A7ULL); - // GLOBAL: gl_25338 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25338 + const std::string background(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\scroll0mid.bmp", 0xBF2B4B31397FF5A7ULL, char)); list->scrollBar->SetBackground(background); } { auto* list = this->list; - const std::string bottom([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\scroll0bar_down.bmp", 0x2F8B0F37118D157FULL); - // GLOBAL: gl_25339 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string middle([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\scroll0bar_mid.bmp", 0x39FF7FB50DEB998FULL); - // GLOBAL: gl_25340 - thread_local EncryptedName name(source); - return name.Text(); - }()); - const std::string top([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\scroll0bar_up.bmp", 0x2FE993D1DDE1F197ULL); - // GLOBAL: gl_25341 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25339 + const std::string bottom(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\scroll0bar_down.bmp", 0x2F8B0F37118D157FULL, char)); + // GLOBAL: gl_25340 + const std::string middle(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\scroll0bar_mid.bmp", 0x39FF7FB50DEB998FULL, char)); + // GLOBAL: gl_25341 + const std::string top(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\scroll0bar_up.bmp", 0x2FE993D1DDE1F197ULL, char)); list->scrollBar->SetThumbImages(top, middle, bottom); } this->list->AddNewItem(); @@ -480,23 +409,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { allButton->Invalidate(); allButton->SetId(0); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("전체", 0xAD075B8DB599F1CDULL); - // GLOBAL: gl_25342 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25342 + const std::string label(OBFUSCATE_ARRAY_TEXT("전체", 0xAD075B8DB599F1CDULL, char)); allButton->SetText(label); } allButton->SetFitText(0); allButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x4941FD9F21BBB9FDULL); - // GLOBAL: gl_25343 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25343 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x4941FD9F21BBB9FDULL, char)); allButton->SetFont(font); } allButton->SetFontHeight(12); @@ -516,23 +437,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { statButton->Invalidate(); statButton->SetId(1); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("스탯", 0x35E5656B5DEDCD75ULL); - // GLOBAL: gl_25344 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25344 + const std::string label(OBFUSCATE_ARRAY_TEXT("스탯", 0x35E5656B5DEDCD75ULL, char)); statButton->SetText(label); } statButton->SetFitText(0); statButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0xB7FD8F670FC7B96BULL); - // GLOBAL: gl_25345 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25345 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0xB7FD8F670FC7B96BULL, char)); statButton->SetFont(font); } statButton->SetFontHeight(12); @@ -552,23 +465,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { abilityButton->Invalidate(); abilityButton->SetId(2); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("어빌", 0xE7978FB5A94DD7FDULL); - // GLOBAL: gl_25346 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25346 + const std::string label(OBFUSCATE_ARRAY_TEXT("어빌", 0xE7978FB5A94DD7FDULL, char)); abilityButton->SetText(label); } abilityButton->SetFitText(0); abilityButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x7115D9F973F913C9ULL); - // GLOBAL: gl_25347 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25347 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x7115D9F973F913C9ULL, char)); abilityButton->SetFont(font); } abilityButton->SetFontHeight(12); @@ -588,23 +493,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { battleButton->Invalidate(); battleButton->SetId(3); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("전투", 0xCB1D253B7FE1F563ULL); - // GLOBAL: gl_25348 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25348 + const std::string label(OBFUSCATE_ARRAY_TEXT("전투", 0xCB1D253B7FE1F563ULL, char)); battleButton->SetText(label); } battleButton->SetFitText(0); battleButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x793F370985ED674FULL); - // GLOBAL: gl_25349 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25349 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x793F370985ED674FULL, char)); battleButton->SetFont(font); } battleButton->SetFontHeight(12); @@ -624,23 +521,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { elementButton->Invalidate(); elementButton->SetId(4); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("속성", 0xE55723712993051DULL); - // GLOBAL: gl_25350 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25350 + const std::string label(OBFUSCATE_ARRAY_TEXT("속성", 0xE55723712993051DULL, char)); elementButton->SetText(label); } elementButton->SetFitText(0); elementButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x7DE349D717D7F123ULL); - // GLOBAL: gl_25351 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25351 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x7DE349D717D7F123ULL, char)); elementButton->SetFont(font); } elementButton->SetFontHeight(12); @@ -660,23 +549,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { raceButton->Invalidate(); raceButton->SetId(5); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("종족", 0x0F15B16B5BAFD57FULL); - // GLOBAL: gl_25352 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25352 + const std::string label(OBFUSCATE_ARRAY_TEXT("종족", 0x0F15B16B5BAFD57FULL, char)); raceButton->SetText(label); } raceButton->SetFitText(0); raceButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x7941D76335CFA14FULL); - // GLOBAL: gl_25353 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25353 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x7941D76335CFA14FULL, char)); raceButton->SetFont(font); } raceButton->SetFontHeight(12); @@ -696,23 +577,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { skillButton->Invalidate(); skillButton->SetId(6); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("스킬", 0x7321C3814F8799E1ULL); - // GLOBAL: gl_25354 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25354 + const std::string label(OBFUSCATE_ARRAY_TEXT("스킬", 0x7321C3814F8799E1ULL, char)); skillButton->SetText(label); } skillButton->SetFitText(0); skillButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x839B27DF8F5967B3ULL); - // GLOBAL: gl_25355 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25355 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x839B27DF8F5967B3ULL, char)); skillButton->SetFont(font); } skillButton->SetFontHeight(12); @@ -732,23 +605,15 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { specialButton->Invalidate(); specialButton->SetId(7); { - const std::string label([] { - constexpr std::array source = CRYPT_NAME("특수", 0xF3CB6F7711A71B6DULL); - // GLOBAL: gl_25356 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25356 + const std::string label(OBFUSCATE_ARRAY_TEXT("특수", 0xF3CB6F7711A71B6DULL, char)); specialButton->SetText(label); } specialButton->SetFitText(0); specialButton->SetAlign(6, 6); { - const std::string font([] { - constexpr std::array source = CRYPT_NAME("Gulim", 0x452FEF0D7FC95565ULL); - // GLOBAL: gl_25357 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25357 + const std::string font(OBFUSCATE_ARRAY_TEXT("Gulim", 0x452FEF0D7FC95565ULL, char)); specialButton->SetFont(font); } specialButton->SetFontHeight(12); @@ -765,12 +630,8 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { this->resizer->Move(286, 294); { CUIResizer* resizer = this->resizer; - const std::string image([] { - constexpr std::array source = CRYPT_NAME("유저인터페이스\\btn_resize.bmp", 0x9FED7DA189490D5DULL); - // GLOBAL: gl_25358 - thread_local EncryptedName name(source); - return name.Text(); - }()); + // GLOBAL: gl_25358 + const std::string image(OBFUSCATE_ARRAY_TEXT("유저인터페이스\\btn_resize.bmp", 0x9FED7DA189490D5DULL, char)); resizer->SetImage(image); } this->resizer->SetOnResize([this](int deltaWidth, int deltaHeight) { this->Grow(deltaWidth, deltaHeight); }); @@ -793,13 +654,8 @@ void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate(int width, this->labelText->SetText(""); this->labelText->SetFitText(0); this->labelText->SetAlign(6, 0); - this->labelText->SetFont(std::string([] { - constexpr auto sourceText = CRYPT_NAME("Gulim", 0x2BAD156DE3E1F9D9ULL); - const auto& source = sourceText.data; - // GLOBAL: gl_25121 - thread_local EncryptedName name(source); - return name.Text(); - }())); + // GLOBAL: gl_25121 + this->labelText->SetFont(std::string(OBFUSCATE_TEXT("Gulim", 0x2BAD156DE3E1F9D9ULL))); this->labelText->SetFontHeight(12); this->labelText->SetBold(0); this->labelText->SetColor(0xFF2A00); @@ -813,13 +669,8 @@ void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate(int width, this->valueText->SetText(""); this->valueText->SetFitText(1); this->valueText->SetAlign(0, 0); - this->valueText->SetFont(std::string([] { - constexpr auto sourceText = CRYPT_NAME("Gulim", 0x23BBD58F8B5FF5C9ULL); - const auto& source = sourceText.data; - // GLOBAL: gl_25122 - thread_local EncryptedName name(source); - return name.Text(); - }())); + // GLOBAL: gl_25122 + this->valueText->SetFont(std::string(OBFUSCATE_TEXT("Gulim", 0x23BBD58F8B5FF5C9ULL))); this->valueText->SetFontHeight(12); this->valueText->SetBold(0); this->valueText->SetColor(0);