#include "UI/Enchant/EnchantUI.h" #include "UI/Window/WindowId.h" #include "Client/Session.h" #include "Contents/EnchantMgr.h" #include "Render/Renderer.h" #include "UI/Buttons/UIRadioButton.h" #include "UI/Lists/UIVScrollBar.h" #include "UI/Text/UITextViewerControl.h" #include "UI/Text/UIStaticTextControl.h" #include "Utility/Cipher/XorBytes.h" #include "UI/Window/UIRegisterMgr.h" #include #include #include #include #include #include #include namespace { template class EncryptedSource { public: // INLINED template constexpr explicit EncryptedSource(const Byte (&source)[Length]) : data{} { for (std::size_t index = 0; index < Length; ++index) { this->data[index] = static_cast(source[index]); } } char data[Length]; }; template class EncryptedName { public: // INLINED explicit EncryptedName(const EncryptedSource& source) : m_encrypted(true) { for (std::uint64_t index = 0; index < Length; ++index) { this->m_text[index] = static_cast(source.data[index]); } } explicit EncryptedName(const std::uint8_t (&source)[Length]) : m_encrypted(true) { for (std::uint64_t index = 0; index < Length; ++index) { this->m_text[index] = source[index]; } } ~EncryptedName() { for (std::uint64_t index = 0; index < Length; ++index) { this->m_text[index] = 0; } } const char* Text() { if (this->m_encrypted) { utility::XorBytes(this->m_text, Length, Key); this->m_encrypted = false; } return reinterpret_cast(this->m_text); } private: std::uint8_t m_text[Length]; bool m_encrypted; }; } // GLOBAL: gl_24882 template <> CEnchantMgr* Singleton::s_instance = nullptr; // OFFSET: 0x009F9B40 // FUNCTION: fn_14814 // OFFSET: 0x009F9C10 // FUNCTION: fn_14815 template void CUIListBoxEx::OnCreate(int width, int height) { this->scrollBar = new CUIVScrollBar(); this->scrollBar->Show(0); this->scrollBar->SetOnChange([this](int position) { this->OnScroll(position); }); this->AddChild(this->scrollBar); } template void CUIListBoxEx::OnCreate(int, int); template void CUIListBoxEx::OnCreate(int, int); template void CUIListBoxEx::Paint(); template void CUIListBoxEx::Paint(); template void CUIListBoxEx::OnWheel(int); template void CUIListBoxEx::OnWheel(int); template void CUIListBoxEx::OnScroll(int); template void CUIListBoxEx::OnScroll(int); template void CUIListBoxEx::ClearItems(); template void CUIListBoxEx::ClearItems(); template int CUIListBoxEx::AddData(const EnchantUI::CEnchantItemData&, bool); template void CUIListBoxEx::ClearData(); template void CUIListBoxEx::UpdateScrollBar(); template <> __declspec(noinline) void CUIListBoxEx::AddNewItem(); template <> __declspec(noinline) void CUIListBoxEx::AddNewItem(); template <> __declspec(noinline) CUIListBoxEx::CUIListBoxEx(); // OFFSET: 0x009F93D0 // FUNCTION: fn_14806 template <> EnchantUI::CUIEnchantItem* CUIListBoxEx::CreateItem() { EnchantUI::CUIEnchantItem* item = new EnchantUI::CUIEnchantItem(); item->SetSize(this->itemWidth, this->rowHeight); item->Show(0); item->SetImageResources(this->normalImage, this->hoverImage, this->pressedImage, this->disabledImage); item->onHover = [this](CUIListItem* listItem) { for (EnchantUI::CUIEnchantItem* other : this->items) { other->SetHighlighted(other == listItem); } }; item->onPress = [this](CUIListItem* listItem) { if (this->layoutFlag) { return; } for (EnchantUI::CUIEnchantItem* other : this->items) { if (listItem != other) { other->SetSelected(0); } } listItem->SetSelected(1); if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } EnchantUI::CUIEnchantItem* selectedItem = dynamic_cast(listItem); if (!selectedItem) { return; } this->selected = selectedItem->index; if (this->onSelect && static_cast(this->selected) >= 0 && this->selected < this->data.size()) { auto node = this->data.begin(); std::advance(node, static_cast(this->selected)); this->onSelect(selectedItem, *node); } }; this->AddChild(item); return item; } // OFFSET: 0x00A01FB0 // FUNCTION: fn_14836 template <> void CUIListBoxEx::AddNewItem() { if (this->itemWidth <= 0 || this->rowHeight <= 0) { return; } for (EnchantUI::CUIEnchantItem* item : this->items) { this->RemoveChild(item, 1); } this->items.clear(); this->selected = static_cast(-1); if (this->geometry.height >= this->rowHeight) { unsigned int count = static_cast(this->geometry.height / this->rowHeight) + 1; if (this->geometry.height % this->rowHeight >= 2) { ++count; } this->items.resize(count); for (EnchantUI::CUIEnchantItem*& slot : this->items) { slot = this->CreateItem(); } } this->scrollBar->SetTotal(this->geometry.height); this->scrollBar->SetVisible(this->geometry.height); } // OFFSET: 0x00A022A0 // FUNCTION: fn_14839 template <> void CUIListBoxEx::LoadSkin(bool resolveSkin) { CResPtr* images = reinterpret_cast*>(reinterpret_cast(this) + 0x80); images[0] = CResPtr(this->LoadBitmapResource(this->imageNames[0], resolveSkin)); images[1] = CResPtr(this->LoadBitmapResource(this->imageNames[1], resolveSkin)); images[2] = CResPtr(this->LoadBitmapResource(this->imageNames[2], resolveSkin)); images[3] = CResPtr(this->LoadBitmapResource(this->disabledName, resolveSkin)); for (EnchantUI::CUIEnchantItem* item : this->items) { item->SetImageResources(images[0], images[1], images[2], images[3]); } } // OFFSET: 0x00A026C0 // FUNCTION: fn_14841 template <> void CUIListBoxEx::Resize(int width, int height) { UIWindow::Resize(width, height); this->AddNewItem(); this->scrollBar->Resize(this->scrollBar->geometry.width, height); this->scrollBar->SetTotal(this->rowHeight * static_cast(this->data.size()) + this->itemY); this->scrollBar->SetVisible(this->geometry.height); this->scrollBar->SetPosition(this->scrollBar->position); this->rebind = 1; } // OFFSET: 0x009F9570 // FUNCTION: fn_14807 template <> EnchantUI::CUITargetItem* CUIListBoxEx::CreateItem() { EnchantUI::CUITargetItem* item = new EnchantUI::CUITargetItem(); item->SetSize(this->itemWidth, this->rowHeight); item->Show(0); item->SetImageResources(this->normalImage, this->hoverImage, this->pressedImage, this->disabledImage); item->onHover = [this](CUIListItem* listItem) { for (EnchantUI::CUITargetItem* other : this->items) { other->SetHighlighted(other == listItem); } }; item->onPress = [this](CUIListItem* listItem) { if (this->layoutFlag) { return; } for (EnchantUI::CUITargetItem* other : this->items) { if (listItem != other) { other->SetSelected(0); } } listItem->SetSelected(1); if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } EnchantUI::CUITargetItem* selectedItem = dynamic_cast(listItem); if (!selectedItem) { return; } this->selected = selectedItem->index; if (this->onSelect && static_cast(this->selected) >= 0 && this->selected < this->data.size()) { auto node = this->data.begin(); std::advance(node, static_cast(this->selected)); this->onSelect(selectedItem, *node); } }; this->AddChild(item); return item; } // OFFSET: 0x00A020C0 // FUNCTION: fn_14837 template <> void CUIListBoxEx::AddNewItem() { if (this->itemWidth <= 0 || this->rowHeight <= 0) { return; } for (EnchantUI::CUITargetItem* item : this->items) { this->RemoveChild(item, 1); } this->items.clear(); this->selected = static_cast(-1); if (this->geometry.height >= this->rowHeight) { unsigned int count = static_cast(this->geometry.height / this->rowHeight) + 1; if (this->geometry.height % this->rowHeight >= 2) { ++count; } this->items.resize(count); for (EnchantUI::CUITargetItem*& slot : this->items) { slot = this->CreateItem(); } } this->scrollBar->SetTotal(this->geometry.height); this->scrollBar->SetVisible(this->geometry.height); } // OFFSET: 0x00A024B0 // FUNCTION: fn_14840 template <> void CUIListBoxEx::LoadSkin(bool resolveSkin) { CResPtr* images = reinterpret_cast*>(reinterpret_cast(this) + 0x80); images[0] = CResPtr(this->LoadBitmapResource(this->imageNames[0], resolveSkin)); images[1] = CResPtr(this->LoadBitmapResource(this->imageNames[1], resolveSkin)); images[2] = CResPtr(this->LoadBitmapResource(this->imageNames[2], resolveSkin)); images[3] = CResPtr(this->LoadBitmapResource(this->disabledName, resolveSkin)); for (EnchantUI::CUITargetItem* item : this->items) { item->SetImageResources(images[0], images[1], images[2], images[3]); } } // OFFSET: 0x00A02740 // FUNCTION: fn_14842 template <> void CUIListBoxEx::Resize(int width, int height) { UIWindow::Resize(width, height); this->AddNewItem(); this->scrollBar->Resize(this->scrollBar->geometry.width, height); this->scrollBar->SetTotal(this->rowHeight * static_cast(this->data.size()) + this->itemY); this->scrollBar->SetVisible(this->geometry.height); this->scrollBar->SetPosition(this->scrollBar->position); this->rebind = 1; } // OFFSET: 0x006863F0 // FUNCTION: fn_05565 template <> CEnchantMgr* Singleton::GetInstance() { if (!s_instance) { s_instance = new (std::nothrow) CEnchantMgr; } return s_instance; } // OFFSET: 0x00A04860 // FUNCTION: fn_14958 CUIEnchantUI::~CUIEnchantUI() { CEnchantMgr::GetInstance()->SendCloseEnchant(); } namespace EnchantUI { // OFFSET: 0x009F70C0 // FUNCTION: fn_14768 CUIEnchantPage::CUIEnchantPage() : CUIControl(), backgroundStorage{}, gameItem(nullptr), slots(), ingredients(), enchantList(nullptr), costText{}, enchantInfo(nullptr), group(0), selectedSlot(-1) { } // OFFSET: 0x009F72F0 // FUNCTION: fn_14770 CUIMainPage::CUIMainPage() : CUIControl(), firstPage(nullptr), secondPage(nullptr), tab(nullptr) { } } // OFFSET: 0x009F7380 // FUNCTION: fn_14771 CUITab::CUITab() : CUIControl(), current(nullptr) { } // OFFSET: 0x009F7420 // FUNCTION: fn_14772 CUITabButton::CUITabButton() : CUIImageTextButton(), page(nullptr), useSkinColors(0), normalColor(0xFFFFFF), selectedColor(0xFFFFFF), borderColor(0xCECECE), normalCell{0, 0}, selectedCell{0, 0}, borderCell{3, 1} { } // OFFSET: 0x009F74E0 // FUNCTION: fn_14773 template <> CUIListBoxEx::~CUIListBoxEx() { } namespace EnchantUI { // OFFSET: 0x009F9CE0 // FUNCTION: fn_14816 void CUIEnchantItem::OnCreate(int width, int height) { this->itemIcon = new CUIGameItem(); this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(2, 3); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->name = new CUIStaticText(); this->name->SetSize(101, 12); this->name->Move(28, 9); this->name->SetText(""); this->name->SetFitText(1); this->name->SetAlign(0, 6); { this->name->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0xC8, 0xEC, 0x87, 0x64, 0xD8, 0x7F}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25222 thread_local EncryptedName<6, 0x39FF7FB50DEB998FULL> name(source); return name.Text(); }())); } this->name->SetFontHeight(12); this->name->SetBold(1); this->name->SetColor(0xC89682); this->name->SetShadow(0, 0xFFFFFF); this->name->SetOutline(0, 0xFFFFFF); this->AddChild(this->name); } // OFFSET: 0x00A00880 // FUNCTION: fn_14828 void CUITargetItem::OnCreate(int width, int height) { this->itemIcon = new CUIGameItem(); this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(6, 13); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->targetIcon = new CUIStaticImage(); this->targetIcon->SetSize(12, 12); this->targetIcon->Move(166, 7); { this->targetIcon->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x4F, 0x12, 0x2F, 0x7D, 0xBD, 0x0B, 0x68, 0xB8, 0x49, 0x59, 0x2F, 0x4B, 0xC0, 0x7F, 0xF1, 0x12, 0xFD, 0xDC, 0x8B, 0xE2, 0x22, 0xA0, 0xC3, 0x16, 0xE7, 0xDC, 0x81, 0xF3, 0x21, 0xA2, 0xDF, 0x14, 0xEB, 0xD8, 0xB0, 0xEE, 0x1E, 0xAA, 0xC3, 0x44, 0xA1, 0xDF, 0x82, 0xF7, 0x7D }; constexpr EncryptedSource<45> source(bytes); // GLOBAL: gl_25223 thread_local EncryptedName<45, 0x75ADC57D87EFBD8FULL> name(source); return name.Text(); }())); } this->AddChild(this->targetIcon); this->targetText = new CUIStaticText(); this->targetText->SetSize(152, 12); this->targetText->Move(38, 23); this->targetText->SetText(""); this->targetText->SetFitText(1); this->targetText->SetAlign(0, 0); { this->targetText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x2A, 0xCE, 0xF9, 0x44, 0xFE, 0xFB}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25224 thread_local EncryptedName<6, 0xC517FB932D95BB6DULL> name(source); return name.Text(); }())); } this->targetText->SetFontHeight(12); this->targetText->SetBold(1); this->targetText->SetColor(0x959595); this->targetText->SetShadow(0, 0xFFFFFF); this->targetText->SetOutline(0, 0xFFFFFF); this->AddChild(this->targetText); } // OFFSET: 0x009F9880 // FUNCTION: fn_14809 void CUIEnchantPage::OnSelectSlot(int) { } // OFFSET: 0x009F99B0 // FUNCTION: fn_14812 CUIIngredient* CUIEnchantPage::CreateIngredient() { CUIIngredient* ingredient = new CUIIngredient(); ingredient->SetSize(70, 50); ingredient->Move(4, 200); this->AddChild(ingredient); return ingredient; } // OFFSET: 0x009FB800 // FUNCTION: fn_14818 void CUIIngredient::OnCreate(int width, int height) { this->backgroundImage = new CUIStaticImage(); this->backgroundImage->SetSize(70, 50); this->backgroundImage->Move(0, 0); { this->backgroundImage->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x5B, 0xF8, 0xC3, 0x63, 0xA7, 0xCB, 0xC0, 0xC8, 0x5D, 0xB3, 0xC3, 0x55, 0xDA, 0xBF, 0x59, 0x40, 0xF5, 0x34, 0x6B, 0xF8, 0x09, 0x71, 0x50, 0x4C, 0xC7, 0x35, 0x64, 0xC6, 0x02, 0x6B, 0x66, 0x5A, 0xF4, 0x31, 0x65, 0xB7, 0x05, 0x68, 0x75, 0x05 }; constexpr EncryptedSource<40> source(bytes); // GLOBAL: gl_25225 thread_local EncryptedName<40, 0x050505679903579BULL> name(source); return name.Text(); }())); } this->AddChild(this->backgroundImage); this->sufficientMaterialImage = new CUIStaticImage(); this->sufficientMaterialImage->SetSize(70, 50); this->sufficientMaterialImage->Move(0, 0); { this->sufficientMaterialImage->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x21, 0xD4, 0x39, 0x2D, 0x15, 0xDD, 0xFC, 0x10, 0x27, 0x9F, 0x39, 0x1B, 0x68, 0xA9, 0x65, 0x98, 0x8F, 0x18, 0x91, 0xB6, 0xBB, 0x67, 0x6C, 0x94, 0xBD, 0x19, 0x9E, 0x88, 0xB0, 0x7D, 0x5A, 0x82, 0x8E, 0x15, 0xD7, 0xB5, 0xB8, 0x63, 0x39 }; constexpr EncryptedSource<39> source(bytes); // GLOBAL: gl_25226 thread_local EncryptedName<39, 0xDD3913D5D7F97BE1ULL> name(source); return name.Text(); }())); } this->AddChild(this->sufficientMaterialImage); this->itemIcon = new CUIGameItem(); this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(6, 10); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->ownedText = new CUIStaticText(); this->ownedText->SetSize(40, 14); this->ownedText->Move(30, 17); this->ownedText->SetText(""); this->ownedText->SetFitText(0); this->ownedText->SetAlign(6, 6); { this->ownedText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0xE0, 0x80, 0x13, 0x50, 0x5C, 0x4B}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25227 thread_local EncryptedName<6, 0xBF2B4B31397FF5A7ULL> name(source); return name.Text(); }())); } this->ownedText->SetFontHeight(12); this->ownedText->SetBold(1); this->ownedText->SetColor(0xF0F0F0); this->ownedText->SetShadow(0, 0xFFFFFF); this->ownedText->SetOutline(1, 0x965532); this->AddChild(this->ownedText); this->requiredText = new CUIStaticText(); this->requiredText->SetSize(40, 14); this->requiredText->Move(30, 31); this->requiredText->SetText(""); this->requiredText->SetFitText(0); this->requiredText->SetAlign(6, 6); { this->requiredText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0xFA, 0xC8, 0x81, 0x5E, 0xD6, 0xBF}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25228 thread_local EncryptedName<6, 0x83EFBFBB37EDBDBDULL> name(source); return name.Text(); }())); } this->requiredText->SetFontHeight(12); this->requiredText->SetBold(1); this->requiredText->SetColor(0xF0F0F0); this->requiredText->SetShadow(0, 0xFFFFFF); this->requiredText->SetOutline(1, 0x965532); this->AddChild(this->requiredText); } // OFFSET: 0x009F9B30 // FUNCTION: fn_14813 void CUIEnchantPage::OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemData& data) { } } // OFFSET: 0x009F9710 // FUNCTION: fn_14808 CUIEnchantUI* CreateEnchantUI() { return new CUIEnchantUI(); } // OFFSET: 0x00492010 // FUNCTION: fn_45547 static bool s_registered = [] { std::function factory = CreateEnchantUI; Singleton::GetInstance()->Register(10006, factory); return true; }(); namespace EnchantUI { // OFFSET: 0x009FD340 // FUNCTION: fn_14823 void CUISlot0::OnCreate(int width, int height) { CUISlot::OnCreate(width, height); this->radioButton->Move(59, 1); this->radioButton->SetOnSelect([this](CUIRadioButton* button) { this->SelectSlot(button); }); { CUIRadioButton* radioButton = this->radioButton; radioButton->disabled = 0; radioButton->Invalidate(); } this->radioButton->SetImages( std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_select.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_over.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp") ); { CUIRadioButton* radioButton = this->radioButton; radioButton->checked = false; radioButton->Invalidate(); } this->itemIcon->Move(69, 11); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->description->Move(0, 44); this->description->SetTextOffset(2, 0); this->description->SetFont(std::string("Gulim")); this->description->SetFontHeight(12); this->description->SetBold(true); this->description->SetTextColor(0x965532); this->description->SetOutline(false, 0xFFFFFF); this->description->SetLineSpacing(1); this->description->SetBackgroundColor(0xFFFF00FF); this->description->SetPadding(0, 0, 0, 0); this->description->SetScrollBarSize(13, 39); this->description->SetScrollStep(13); this->description->SetScrollBarButtonImages(std::string("유저인터페이스\\scroll0up.bmp"), std::string("유저인터페이스\\scroll0down.bmp")); this->description->SetScrollBarBackground(std::string("유저인터페이스\\scroll0mid.bmp")); this->description->SetScrollBarThumbImages( std::string("유저인터페이스\\scroll0bar_up.bmp"), std::string("유저인터페이스\\scroll0bar_mid.bmp"), std::string("유저인터페이스\\scroll0bar_down.bmp") ); } // OFFSET: 0x009FDC30 // FUNCTION: fn_14824 void CUISlot1::OnCreate(int width, int height) { CUISlot::OnCreate(width, height); this->radioButton->Move(59, 1); this->radioButton->SetOnSelect([this](CUIRadioButton* button) { this->SelectSlot(button); }); { CUIRadioButton* radioButton = this->radioButton; radioButton->disabled = 0; radioButton->Invalidate(); } this->radioButton->SetImages( std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_select.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_over.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp") ); { CUIRadioButton* radioButton = this->radioButton; radioButton->checked = false; radioButton->Invalidate(); } this->itemIcon->Move(69, 11); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->description->Move(0, 44); this->description->SetTextOffset(2, 0); this->description->SetFont(std::string("Gulim")); this->description->SetFontHeight(12); this->description->SetBold(true); this->description->SetTextColor(0x965532); this->description->SetOutline(false, 0xFFFFFF); this->description->SetLineSpacing(1); this->description->SetBackgroundColor(0xFFFF00FF); this->description->SetPadding(0, 0, 0, 0); this->description->SetScrollBarSize(13, 39); this->description->SetScrollStep(13); this->description->SetScrollBarButtonImages(std::string("유저인터페이스\\scroll0up.bmp"), std::string("유저인터페이스\\scroll0down.bmp")); this->description->SetScrollBarBackground(std::string("유저인터페이스\\scroll0mid.bmp")); this->description->SetScrollBarThumbImages( std::string("유저인터페이스\\scroll0bar_up.bmp"), std::string("유저인터페이스\\scroll0bar_mid.bmp"), std::string("유저인터페이스\\scroll0bar_down.bmp") ); } // OFFSET: 0x009FE520 // FUNCTION: fn_14825 void CUISlot2::OnCreate(int width, int height) { CUISlot::OnCreate(width, height); this->radioButton->Move(3, 1); this->radioButton->SetOnSelect([this](CUIRadioButton* button) { this->SelectSlot(button); }); { CUIRadioButton* radioButton = this->radioButton; radioButton->disabled = 0; radioButton->Invalidate(); } this->radioButton->SetImages( std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_select.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_over.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp") ); { CUIRadioButton* radioButton = this->radioButton; radioButton->checked = false; radioButton->Invalidate(); } this->itemIcon->Move(13, 11); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->description->Move(10, 44); this->description->SetTextOffset(0, 0); this->description->SetFont(std::string("Gulim")); this->description->SetFontHeight(12); this->description->SetBold(true); this->description->SetTextColor(0x965532); this->description->SetOutline(false, 0xFFFFFF); this->description->SetLineSpacing(1); this->description->SetBackgroundColor(0xFFFF00FF); this->description->SetPadding(0, 0, 0, 0); this->description->SetScrollBarSize(13, 39); this->description->SetScrollStep(13); this->description->SetScrollBarButtonImages(std::string("유저인터페이스\\scroll0up.bmp"), std::string("유저인터페이스\\scroll0down.bmp")); this->description->SetScrollBarBackground(std::string("유저인터페이스\\scroll0mid.bmp")); this->description->SetScrollBarThumbImages( std::string("유저인터페이스\\scroll0bar_up.bmp"), std::string("유저인터페이스\\scroll0bar_mid.bmp"), std::string("유저인터페이스\\scroll0bar_down.bmp") ); } // OFFSET: 0x009FEE10 // FUNCTION: fn_14826 void CUISlot3::OnCreate(int width, int height) { CUISlot::OnCreate(width, height); this->radioButton->Move(3, 1); this->radioButton->SetOnSelect([this](CUIRadioButton* button) { this->SelectSlot(button); }); { CUIRadioButton* radioButton = this->radioButton; radioButton->disabled = 0; radioButton->Invalidate(); } this->radioButton->SetImages( std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_select.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_over.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_socket_out.bmp") ); { CUIRadioButton* radioButton = this->radioButton; radioButton->checked = false; radioButton->Invalidate(); } this->itemIcon->Move(13, 11); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->description->Move(10, 44); this->description->SetTextOffset(0, 0); this->description->SetFont(std::string("Gulim")); this->description->SetFontHeight(12); this->description->SetBold(true); this->description->SetTextColor(0x965532); this->description->SetOutline(false, 0xFFFFFF); this->description->SetLineSpacing(1); this->description->SetBackgroundColor(0xFFFF00FF); this->description->SetPadding(0, 0, 0, 0); this->description->SetScrollBarSize(13, 39); this->description->SetScrollStep(13); this->description->SetScrollBarButtonImages(std::string("유저인터페이스\\scroll0up.bmp"), std::string("유저인터페이스\\scroll0down.bmp")); this->description->SetScrollBarBackground(std::string("유저인터페이스\\scroll0mid.bmp")); this->description->SetScrollBarThumbImages( std::string("유저인터페이스\\scroll0bar_up.bmp"), std::string("유저인터페이스\\scroll0bar_mid.bmp"), std::string("유저인터페이스\\scroll0bar_down.bmp") ); } } namespace EnchantUI { // OFFSET: 0x009FC080 // FUNCTION: fn_14819 void CUINormal::OnCreate(int width, int height) { this->firstPage = new CUINormalRandom; this->firstPage->SetSize(470, 377); this->firstPage->Move(0, 0); this->AddChild(this->firstPage); this->secondPage = new CUINormalPerfect; this->secondPage->SetSize(470, 377); this->secondPage->Move(0, 0); this->AddChild(this->secondPage); this->tab = new CUITab; this->tab->SetSize(76, 20); this->tab->Move(7, 1); this->AddChild(this->tab); CUITabButton* firstButton = new CUITabButton; firstButton->SetSize(38, 20); firstButton->Move(0, 0); firstButton->disabled = 0; firstButton->Invalidate(); { firstButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0xAD, 0xB4, 0x67, 0xEB, 0xB7, 0xA1, 0x0E, 0x3E, 0xAB, 0xFF, 0x67, 0xDD, 0xCA, 0xD5, 0x97, 0xB6, 0x03, 0x78, 0xCF, 0x70, 0x19, 0x1B, 0x9E, 0xBA, 0x31, 0x6F, 0xC6, 0x73, 0x28, 0x0A, 0xA5, 0x90, 0x32, 0x69, 0xC6, 0x7F, 0x13, 0x00, 0xA6, 0xAC, 0x02, 0x6E, 0xD3, 0x3F, 0x15, 0x02, 0xBB, 0xF3 }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25233 thread_local EncryptedName<48, 0xF3CB6F7711A71B6DULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x73, 0xC8, 0x99, 0x75, 0x1F, 0xE9, 0x5E, 0x4E, 0x75, 0x83, 0x99, 0x43, 0x62, 0x9D, 0xC7, 0xC6, 0xDD, 0x04, 0x31, 0xEE, 0xB1, 0x53, 0xCE, 0xCA, 0xEF, 0x13, 0x38, 0xED, 0x80, 0x42, 0xF5, 0xE0, 0xEC, 0x15, 0x38, 0xE1, 0xBB, 0x48, 0xF6, 0xDC, 0xC3, 0x15, 0x3C, 0xFC, 0xAC, 0x42, 0xFF, 0xAD, 0xD1, 0x0A, 0x29, 0x8F }; constexpr EncryptedSource<52> source(bytes); // GLOBAL: gl_25232 thread_local EncryptedName<52, 0x839B27DF8F5967B3ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x9D, 0xA2, 0x89, 0x73, 0x61, 0xB3, 0x28, 0x52, 0x9B, 0xE9, 0x89, 0x45, 0x1C, 0xC7, 0xB1, 0xDA, 0x33, 0x6E, 0x21, 0xE8, 0xCF, 0x09, 0xB8, 0xD6, 0x01, 0x79, 0x28, 0xEB, 0xFE, 0x18, 0x83, 0xFC, 0x02, 0x7F, 0x28, 0xE7, 0xC5, 0x12, 0x80, 0xC0, 0x32, 0x78, 0x3D, 0xA7, 0xC3, 0x10, 0x9D, 0x9F }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25231 thread_local EncryptedName<48, 0x9FED7DA189490D5DULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xA5, 0xFA, 0x09, 0x85, 0xCD, 0x21, 0xEA, 0x88, 0xA3, 0xB1, 0x09, 0xB3, 0xB0, 0x55, 0x73, 0x00, 0x0B, 0x36, 0xA1, 0x1E, 0x63, 0x9B, 0x7A, 0x0C, 0x39, 0x21, 0xA8, 0x1D, 0x52, 0x8A, 0x41, 0x26, 0x3A, 0x27, 0xA8, 0x11, 0x69, 0x80, 0x42, 0x1A, 0x01, 0x3C, 0xBA, 0x1E, 0x6F, 0x83, 0x4A, 0x6B, 0x07, 0x38, 0xB9, 0x7F }; constexpr EncryptedSource<52> source(bytes); // GLOBAL: gl_25230 thread_local EncryptedName<52, 0x452FEF0D7FC95565ULL> name(source); return name.Text(); }())); } this->tab->AddChild(firstButton); CUITabButton* secondButton = new CUITabButton; secondButton->SetSize(38, 20); secondButton->Move(38, 0); secondButton->disabled = 0; secondButton->Invalidate(); { secondButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0xA5, 0x5C, 0x17, 0xA7, 0x4D, 0xDD, 0xAA, 0xDA, 0xA3, 0x17, 0x17, 0x91, 0x30, 0xA9, 0x33, 0x52, 0x0B, 0x90, 0xBF, 0x3C, 0xE3, 0x67, 0x3A, 0x5E, 0x39, 0x87, 0xB6, 0x3F, 0xD2, 0x76, 0x01, 0x74, 0x3A, 0x90, 0xB8, 0x33, 0xEB, 0x7A, 0x1D, 0x7A, 0x3A, 0x9C, 0xA2, 0x29, 0xA3, 0x71, 0x02, 0x67, 0x65 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25237 thread_local EncryptedName<49, 0x176F138D5DD7F365ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x01, 0xE8, 0x05, 0xED, 0x21, 0x57, 0x10, 0x36, 0x07, 0xA3, 0x05, 0xDB, 0x5C, 0x23, 0x89, 0xBE, 0xAF, 0x24, 0xAD, 0x76, 0x8F, 0xED, 0x80, 0xB2, 0x9D, 0x33, 0xA4, 0x75, 0xBE, 0xFC, 0xBB, 0x98, 0x9E, 0x24, 0xAA, 0x79, 0x87, 0xF0, 0xA7, 0x96, 0x9E, 0x37, 0xB7, 0x72, 0x92, 0xEA, 0xB0, 0x9F, 0xEF, 0x25, 0xA8, 0x67, 0xE1 }; constexpr EncryptedSource<53> source(bytes); // GLOBAL: gl_25236 thread_local EncryptedName<53, 0xFBD599E117C547C1ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xD7, 0xB4, 0xED, 0x59, 0x7D, 0x25, 0x84, 0xC2, 0xD1, 0xFF, 0xED, 0x6F, 0x00, 0x51, 0x1D, 0x4A, 0x79, 0x78, 0x45, 0xC2, 0xD3, 0x9F, 0x14, 0x46, 0x4B, 0x6F, 0x4C, 0xC1, 0xE2, 0x8E, 0x2F, 0x6C, 0x48, 0x78, 0x42, 0xCD, 0xDB, 0x82, 0x33, 0x62, 0x48, 0x74, 0x58, 0xD7, 0x93, 0x89, 0x2C, 0x7F, 0x17 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25235 thread_local EncryptedName<49, 0x0F41EBBDA32D1B17ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x2D, 0xDA, 0xA1, 0xD9, 0x77, 0x2D, 0x94, 0xE0, 0x2B, 0x91, 0xA1, 0xEF, 0x0A, 0x59, 0x0D, 0x68, 0x83, 0x16, 0x09, 0x42, 0xD9, 0x97, 0x04, 0x64, 0xB1, 0x01, 0x00, 0x41, 0xE8, 0x86, 0x3F, 0x4E, 0xB2, 0x16, 0x0E, 0x4D, 0xD1, 0x8A, 0x23, 0x40, 0xB2, 0x11, 0x08, 0x50, 0xD6, 0x81, 0x3D, 0x48, 0xC3, 0x17, 0x0C, 0x53, 0xB7 }; constexpr EncryptedSource<53> source(bytes); // GLOBAL: gl_25234 thread_local EncryptedName<53, 0x2D51E3B7236175EDULL> name(source); return name.Text(); }())); } this->tab->AddChild(secondButton); firstButton->page = this->firstPage; secondButton->page = this->secondPage; this->tab->Select(firstButton); } // OFFSET: 0x009FF700 // FUNCTION: fn_14827 void CUISlot::OnCreate(int width, int height) { this->radioButton = new CUIRadioButton(); this->radioButton->SetSize(44, 44); this->radioButton->Move(59, 1); this->radioButton->SetOnSelect([this](CUIRadioButton* button) { this->SelectSlot(button); }); this->radioButton->disabled = 0; this->radioButton->Invalidate(); { this->radioButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x09, 0x5A, 0x9F, 0x71, 0x4F, 0x1B, 0x7E, 0xEE, 0x0F, 0x11, 0x9F, 0x47, 0x32, 0x6F, 0xE7, 0x66, 0xA7, 0x96, 0x37, 0xEA, 0xE1, 0xA1, 0xEE, 0x6A, 0x95, 0x97, 0x2B, 0xE5, 0xD0, 0xA6, 0xD4, 0x40, 0xA2, 0x90, 0x2B, 0xD4, 0xE0, 0xA0, 0xCF, 0x0D, 0xAB, 0x98, 0x2F, 0x8B }; constexpr EncryptedSource<44> source(bytes); // GLOBAL: gl_25192 thread_local EncryptedName<44, 0x23BBD58F8B5FF5C9ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x47, 0xBC, 0xAB, 0x85, 0xF9, 0xC7, 0xB4, 0xC6, 0x41, 0xF7, 0xAB, 0xB3, 0x84, 0xB3, 0x2D, 0x4E, 0xE9, 0x70, 0x03, 0x1E, 0x57, 0x7D, 0x24, 0x42, 0xDB, 0x71, 0x1F, 0x11, 0x66, 0x7A, 0x1E, 0x68, 0xEC, 0x76, 0x1F, 0x20, 0x4A, 0x6C, 0x1D, 0x6E, 0xE4, 0x67, 0x45, 0x1D, 0x54, 0x79, 0x71 }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25191 thread_local EncryptedName<47, 0x0B7109397F6B1387ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x65, 0x32, 0xAD, 0x03, 0xA3, 0xE9, 0xB2, 0xCE, 0x63, 0x79, 0xAD, 0x35, 0xDE, 0x9D, 0x2B, 0x46, 0xCB, 0xFE, 0x05, 0x98, 0x0D, 0x53, 0x22, 0x4A, 0xF9, 0xFF, 0x19, 0x97, 0x3C, 0x54, 0x18, 0x60, 0xCE, 0xF8, 0x19, 0xA6, 0x0C, 0x51, 0x12, 0x71, 0x8B, 0xFF, 0x00, 0x89, 0x63 }; constexpr EncryptedSource<45> source(bytes); // GLOBAL: gl_25190 thread_local EncryptedName<45, 0x03772763F96D9DA5ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xF7, 0xE8, 0x6D, 0xC3, 0x7F, 0x2B, 0x6C, 0xDA, 0xF1, 0xA3, 0x6D, 0xF5, 0x02, 0x5F, 0xF5, 0x52, 0x59, 0x24, 0xC5, 0x58, 0xD1, 0x91, 0xFC, 0x5E, 0x6B, 0x25, 0xD9, 0x57, 0xE0, 0x96, 0xC6, 0x74, 0x5C, 0x22, 0xD9, 0x66, 0xD0, 0x90, 0xDD, 0x39, 0x55, 0x2A, 0xDD, 0x39 }; constexpr EncryptedSource<44> source(bytes); // GLOBAL: gl_25189 thread_local EncryptedName<44, 0x17A9E5BF39AD4737ULL> name(source); return name.Text(); }())); } this->radioButton->checked = false; this->radioButton->Invalidate(); this->AddChild(this->radioButton); this->itemIcon = new CUIGameItem(); this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(69, 11); this->itemIcon->showNameTooltip = 1; this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->description = new CUITextViewer(); this->description->SetSize(96, 39); this->description->Move(0, 44); this->description->SetTextOffset(2, 0); { this->description->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x20, 0xDE, 0xFD, 0xCC, 0xCC, 0x3F}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25193 thread_local EncryptedName<6, 0x13E33FA1A591AB67ULL> name(source); return name.Text(); }())); } this->description->SetFontHeight(12); this->description->SetBold(true); this->description->SetTextColor(0x965532); this->description->SetOutline(false, 0xFFFFFF); this->description->SetLineSpacing(1); this->description->SetBackgroundColor(0xFFFF00FF); this->description->SetPadding(0, 0, 0, 0); this->description->SetScrollBarSize(13, 39); this->description->SetScrollStep(13); { this->description->SetScrollBarButtonImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0xAF, 0xD2, 0x3B, 0xD9, 0xB1, 0xC9, 0x4A, 0x00, 0xA9, 0x99, 0x3B, 0xEF, 0xCC, 0xBD, 0xD3, 0xBE, 0x0C, 0x0F, 0x94, 0x4F, 0x1D, 0x37, 0xFA, 0xBD, 0x41, 0x1F, 0x96, 0x53, 0x71 }; constexpr EncryptedSource<29> source(bytes); // GLOBAL: gl_25195 thread_local EncryptedName<29, 0xCD8F077123FB7D6FULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x83, 0x86, 0x93, 0xDD, 0x15, 0x71, 0x8C, 0x54, 0x85, 0xCD, 0x93, 0xEB, 0x68, 0x05, 0x15, 0xEA, 0x20, 0x5B, 0x3C, 0x4B, 0xB9, 0x8F, 0x2D, 0xF6, 0x34, 0x47, 0x7D, 0x45, 0xB8, 0xCF, 0x49 }; constexpr EncryptedSource<31> source(bytes); // GLOBAL: gl_25194 thread_local EncryptedName<31, 0x9949BFD527532943ULL> name(source); return name.Text(); }())); } { this->description->SetScrollBarBackground(std::string([]() { constexpr std::uint8_t bytes[] = { 0xBF, 0xBC, 0x1F, 0x2B, 0x45, 0xA9, 0xBC, 0x20, 0xB9, 0xF7, 0x1F, 0x1D, 0x38, 0xDD, 0x25, 0x9E, 0x1C, 0x61, 0xB0, 0xBD, 0xE9, 0x57, 0x14, 0x84, 0x1B, 0x3D, 0xBD, 0xBC, 0xF5, 0x67 }; constexpr EncryptedSource<30> source(bytes); // GLOBAL: gl_25196 thread_local EncryptedName<30, 0xED796785D1DF137FULL> name(source); return name.Text(); }())); } { this->description->SetScrollBarThumbImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0xC9, 0x88, 0xEF, 0x41, 0x7D, 0x93, 0xB8, 0x14, 0xCF, 0xC3, 0xEF, 0x77, 0x00, 0xE7, 0x21, 0xAA, 0x6A, 0x55, 0x40, 0xD7, 0xD1, 0x6D, 0x1F, 0xB8, 0x7B, 0x78, 0x5A, 0xCB, 0x93, 0x3F, 0x10, 0xA9, 0x09 }; constexpr EncryptedSource<33> source(bytes); // GLOBAL: gl_25199 thread_local EncryptedName<33, 0xD97D5DBDBB2F2709ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x5F, 0x6A, 0xAD, 0x51, 0x17, 0xE7, 0x38, 0x68, 0x59, 0x21, 0xAD, 0x67, 0x6A, 0x93, 0xA1, 0xD6, 0xFC, 0xB7, 0x02, 0xC7, 0xBB, 0x19, 0x9F, 0xC4, 0xED, 0x9A, 0x00, 0xC2, 0xB3, 0x07, 0x9F, 0xC8, 0xEF, 0xC5 }; constexpr EncryptedSource<34> source(bytes); // GLOBAL: gl_25198 thread_local EncryptedName<34, 0xA5FD29D7AB6DC59FULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x31, 0x68, 0xF9, 0xF3, 0xD7, 0xB7, 0x8A, 0x3C, 0x37, 0x23, 0xF9, 0xC5, 0xAA, 0xC3, 0x13, 0x82, 0x92, 0xB5, 0x56, 0x65, 0x7B, 0x49, 0x2D, 0x90, 0x83, 0x98, 0x5D, 0x66, 0x60, 0x17, 0x61, 0x93, 0x9C, 0xB7, 0x39 }; constexpr EncryptedSource<35> source(bytes); // GLOBAL: gl_25197 thread_local EncryptedName<35, 0xF14F79170939C7F1ULL> name(source); return name.Text(); }())); } this->AddChild(this->description); } // OFFSET: 0x00A00D50 // FUNCTION: fn_14829 void CUIUpgrade::OnCreate(int width, int height) { this->firstPage = new CUIUpgradeRandom; this->firstPage->SetSize(470, 377); this->firstPage->Move(0, 0); this->AddChild(this->firstPage); this->secondPage = new CUIUpgradePerfect; this->secondPage->SetSize(470, 377); this->secondPage->Move(0, 0); this->AddChild(this->secondPage); this->tab = new CUITab; this->tab->SetSize(76, 20); this->tab->Move(7, 1); this->AddChild(this->tab); CUITabButton* firstButton = new CUITabButton; firstButton->SetSize(38, 20); firstButton->Move(0, 0); firstButton->disabled = 0; firstButton->Invalidate(); { firstButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x77, 0x9E, 0x2F, 0x39, 0xC3, 0x11, 0x5C, 0x82, 0x71, 0xD5, 0x2F, 0x0F, 0xBE, 0x65, 0xC5, 0x0A, 0xD9, 0x52, 0x87, 0xA2, 0x6D, 0xAB, 0xCC, 0x06, 0xEB, 0x45, 0x8E, 0xA1, 0x5C, 0xBA, 0xF7, 0x2C, 0xE8, 0x43, 0x8E, 0xAD, 0x67, 0xB0, 0xF4, 0x10, 0xD8, 0x44, 0x9B, 0xED, 0x61, 0xB2, 0xE9, 0x4F }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25243 thread_local EncryptedName<48, 0x4F99DF03C3EF31B7ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x37, 0x66, 0xA3, 0x93, 0xBD, 0x57, 0xB4, 0x5C, 0x31, 0x2D, 0xA3, 0xA5, 0xC0, 0x23, 0x2D, 0xD4, 0x99, 0xAA, 0x0B, 0x08, 0x13, 0xED, 0x24, 0xD8, 0xAB, 0xBD, 0x02, 0x0B, 0x22, 0xFC, 0x1F, 0xF2, 0xA8, 0xBB, 0x02, 0x07, 0x19, 0xF6, 0x1C, 0xCE, 0x87, 0xBB, 0x06, 0x1A, 0x0E, 0xFC, 0x15, 0xBF, 0x95, 0xA4, 0x13, 0x69 }; constexpr EncryptedSource<52> source(bytes); // GLOBAL: gl_25242 thread_local EncryptedName<52, 0x9171997D6963C9F7ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x9F, 0x9A, 0x6F, 0x6F, 0x5D, 0x47, 0x36, 0x02, 0x99, 0xD1, 0x6F, 0x59, 0x20, 0x33, 0xAF, 0x8A, 0x31, 0x56, 0xC7, 0xF4, 0xF3, 0xFD, 0xA6, 0x86, 0x03, 0x41, 0xCE, 0xF7, 0xC2, 0xEC, 0x9D, 0xAC, 0x00, 0x47, 0xCE, 0xFB, 0xF9, 0xE6, 0x9E, 0x90, 0x30, 0x40, 0xDB, 0xBB, 0xFF, 0xE4, 0x83, 0xCF }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25241 thread_local EncryptedName<48, 0xCFF3899D95AF355FULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xE5, 0xDE, 0x6F, 0x31, 0xCD, 0x3D, 0xE8, 0x28, 0xE3, 0x95, 0x6F, 0x07, 0xB0, 0x49, 0x71, 0xA0, 0x4B, 0x12, 0xC7, 0xAA, 0x63, 0x87, 0x78, 0xAC, 0x79, 0x05, 0xCE, 0xA9, 0x52, 0x96, 0x43, 0x86, 0x7A, 0x03, 0xCE, 0xA5, 0x69, 0x9C, 0x40, 0xBA, 0x41, 0x18, 0xDC, 0xAA, 0x6F, 0x9F, 0x48, 0xCB, 0x47, 0x1C, 0xDF, 0xCB }; constexpr EncryptedSource<52> source(bytes); // GLOBAL: gl_25240 thread_local EncryptedName<52, 0xE52DF30DCBAF7125ULL> name(source); return name.Text(); }())); } this->tab->AddChild(firstButton); CUITabButton* secondButton = new CUITabButton; secondButton->SetSize(38, 20); secondButton->Move(38, 0); secondButton->disabled = 0; secondButton->Invalidate(); { secondButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x99, 0x18, 0xC7, 0xE9, 0x05, 0xB3, 0xA6, 0x82, 0x9F, 0x53, 0xC7, 0xDF, 0x78, 0xC7, 0x3F, 0x0A, 0x37, 0xD4, 0x6F, 0x72, 0xAB, 0x09, 0x36, 0x06, 0x05, 0xC3, 0x66, 0x71, 0x9A, 0x18, 0x0D, 0x2C, 0x06, 0xD4, 0x68, 0x7D, 0xA3, 0x14, 0x11, 0x22, 0x06, 0xD8, 0x72, 0x67, 0xEB, 0x1F, 0x0E, 0x3F, 0x59 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25247 thread_local EncryptedName<49, 0x4F637DC51307B759ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x6B, 0x6E, 0x8D, 0xC3, 0xA7, 0xBB, 0x0E, 0xE0, 0x6D, 0x25, 0x8D, 0xF5, 0xDA, 0xCF, 0x97, 0x68, 0xC5, 0xA2, 0x25, 0x58, 0x09, 0x01, 0x9E, 0x64, 0xF7, 0xB5, 0x2C, 0x5B, 0x38, 0x10, 0xA5, 0x4E, 0xF4, 0xA2, 0x22, 0x57, 0x01, 0x1C, 0xB9, 0x40, 0xF4, 0xB1, 0x3F, 0x5C, 0x14, 0x06, 0xAE, 0x49, 0x85, 0xA3, 0x20, 0x49, 0x67 }; constexpr EncryptedSource<53> source(bytes); // GLOBAL: gl_25246 thread_local EncryptedName<53, 0x2DCB7567394DC1ABULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x4D, 0x14, 0x0F, 0x81, 0x51, 0x69, 0x5A, 0x7E, 0x4B, 0x5F, 0x0F, 0xB7, 0x2C, 0x1D, 0xC3, 0xF6, 0xE3, 0xD8, 0xA7, 0x1A, 0xFF, 0xD3, 0xCA, 0xFA, 0xD1, 0xCF, 0xAE, 0x19, 0xCE, 0xC2, 0xF1, 0xD0, 0xD2, 0xD8, 0xA0, 0x15, 0xF7, 0xCE, 0xED, 0xDE, 0xD2, 0xD4, 0xBA, 0x0F, 0xBF, 0xC5, 0xF2, 0xC3, 0x8D }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25245 thread_local EncryptedName<49, 0xB39FA7917BCFBB8DULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x37, 0xBC, 0xEB, 0x55, 0x31, 0xC1, 0xD8, 0x40, 0x31, 0xF7, 0xEB, 0x63, 0x4C, 0xB5, 0x41, 0xC8, 0x99, 0x70, 0x43, 0xCE, 0x9F, 0x7B, 0x48, 0xC4, 0xAB, 0x67, 0x4A, 0xCD, 0xAE, 0x6A, 0x73, 0xEE, 0xA8, 0x70, 0x44, 0xC1, 0x97, 0x66, 0x6F, 0xE0, 0xA8, 0x77, 0x42, 0xDC, 0x90, 0x6D, 0x71, 0xE8, 0xD9, 0x71, 0x46, 0xDF, 0xF1 }; constexpr EncryptedSource<53> source(bytes); // GLOBAL: gl_25244 thread_local EncryptedName<53, 0x8D1D0FF1AF2B13F7ULL> name(source); return name.Text(); }())); } this->tab->AddChild(secondButton); firstButton->page = this->firstPage; secondButton->page = this->secondPage; this->tab->Select(firstButton); } } // OFFSET: 0x00A021D0 // FUNCTION: fn_14838 void CUIRadioButton::SetOnSelect(std::function callback) { this->onSelect = callback; } namespace EnchantUI { // OFFSET: 0x00A02D80 // FUNCTION: fn_14845 void CUIEnchantPage::SetSlot(int value) { this->selectedSlot = value; } // OFFSET: 0x00A05190 // FUNCTION: fn_14970 void CUIUpgradeEnchantPage::OnSelectSlot(int value) { if (CUIMainPage* mainPage = dynamic_cast(this->parent)) { mainPage->firstPage->SetSlot(value); mainPage->secondPage->SetSlot(value); } } // OFFSET: 0x00A06B00 // FUNCTION: fn_15006 void CUIUpgradeEnchantPage::SetSlot(int value) { this->selectedSlot = value; for (const auto& slot : this->slots) { CUISlot* item = slot.second; const bool selected = value == slot.first; item->radioButton->checked = selected; item->radioButton->Invalidate(); item->description->SetTextColor(selected ? 0x644031 : 0xB6752E); item->description->SetBold(selected); item->description->Relayout(); } this->UpdateEnchantInfo(); } // OFFSET: 0x00A05290 // FUNCTION: fn_14972 int CUIEnchantPage::FindEmptySlot() { const ITEM_INFO* info = this->gameItem->GetItemInfo(); const std::vector& slots = this->enchantInfo->slots; auto it = std::find_if(slots.begin(), slots.end(), [item = *info](int slot) { if (slot >= 4) { return true; } int card; std::memcpy(&card, item.cards + slot * 4, sizeof(card)); return card == 0; }); if (it != slots.end()) { return *it; } return -1; } // OFFSET: 0x00A053D0 // FUNCTION: fn_14973 ITEM_INFO* CUITargetItem::GetItemInfo() { return this->itemIcon->GetItemInfo(); } // OFFSET: 0x00A053E0 // FUNCTION: fn_14974 std::optional CUIEnchantPage::FindOption(uint32_t key) { if (this->enchantInfo == nullptr) { return std::nullopt; } auto& options = this->enchantInfo->options; auto it = options.find(key); if (it == options.end()) { return std::nullopt; } return &it->second; } // OFFSET: 0x00A05CE0 // FUNCTION: fn_14980 void CUISlot::Paint() { this->ClearSurface(0xFFFF00FF); } } // OFFSET: 0x00A05DF0 // FUNCTION: fn_14983 void CUIEnchantUI::OnInit() { this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2); } namespace EnchantUI { // OFFSET: 0x00A06050 // FUNCTION: fn_14988 void CUISlot0::OnInit() { CUISlot::OnInit(); this->radioButton->SetId(0); } // OFFSET: 0x00A06090 // FUNCTION: fn_14989 void CUISlot1::OnInit() { CUISlot::OnInit(); this->radioButton->SetId(1); } // OFFSET: 0x00A060D0 // FUNCTION: fn_14990 void CUISlot2::OnInit() { CUISlot::OnInit(); this->radioButton->SetId(2); } // OFFSET: 0x00A06110 // FUNCTION: fn_14991 void CUISlot3::OnInit() { CUISlot::OnInit(); this->radioButton->SetId(3); } // OFFSET: 0x00A06150 // FUNCTION: fn_14992 void CUISlot::OnInit() { this->itemIcon->hitEnabled = 0; this->description->scrollBar->SetHidden(1); } } // OFFSET: 0x00A06190 // FUNCTION: fn_14994 void CUIEnchantUI::OnLBtnDown(int x, int y) { if (this->titleBar->IsPointInside(x, y)) { CUIFrameWnd::OnLBtnDown(x, y); } } namespace EnchantUI { // OFFSET: 0x00A061C0 // FUNCTION: fn_14995 void CUIEnchantItem::OnMouseHover(int x, int y) { this->itemIcon->OnMouseHover(x - this->itemIcon->geometry.x, y - this->itemIcon->geometry.y); } // OFFSET: 0x00A061F0 // FUNCTION: fn_14996 void CUITargetItem::OnMouseHover(int x, int y) { this->itemIcon->OnMouseHover(x - this->itemIcon->geometry.x, y - this->itemIcon->geometry.y); } // OFFSET: 0x00A06220 // FUNCTION: fn_14997 void CUIEnchantItem::OnRBtnDown(int x, int y) { this->itemIcon->OnRBtnDown(x - this->itemIcon->geometry.x, y - this->itemIcon->geometry.y); } // OFFSET: 0x00A06250 // FUNCTION: fn_14998 void CUISlot::OnRBtnDown(int x, int y) { if (this->itemIcon->IsPointInside(x, y)) { this->itemIcon->OnRBtnDown(x - this->itemIcon->geometry.x, y - this->itemIcon->geometry.y); } } // OFFSET: 0x00A06290 // FUNCTION: fn_14999 void CUITargetItem::OnRBtnDown(int x, int y) { this->itemIcon->OnRBtnDown(x - this->itemIcon->geometry.x, y - this->itemIcon->geometry.y); } // OFFSET: 0x00A062C0 // FUNCTION: fn_15000 void CUISlot::SelectSlot(UIWindow* button) { if (CUIEnchantPage* page = dynamic_cast(this->parent)) { page->OnSelectSlot(button->geometry.id); } } // OFFSET: 0x00A06A50 // FUNCTION: fn_15005 void CUITargetItem::SetSelected(bool selected) { if (selected) { if (this->selected != 1) { this->itemIcon->Move(this->itemIcon->geometry.x + 1, this->itemIcon->geometry.y + 1); this->targetIcon->Move(this->targetIcon->geometry.x + 1, this->targetIcon->geometry.y + 1); this->targetText->Move(this->targetText->geometry.x + 1, this->targetText->geometry.y + 1); } } else if (this->selected == 1) { this->itemIcon->Move(this->itemIcon->geometry.x - 1, this->itemIcon->geometry.y - 1); this->targetIcon->Move(this->targetIcon->geometry.x - 1, this->targetIcon->geometry.y - 1); this->targetText->Move(this->targetText->geometry.x - 1, this->targetText->geometry.y - 1); } CUIListItem::SetSelected(selected); } // OFFSET: 0x00A04D70 // FUNCTION: fn_14965 void CUINormalPerfect::RequestEnchant() { CUIListBoxEx* list = this->enchantList; if (static_cast(list->selected) >= 0 && list->selected < list->data.size()) { auto it = list->data.begin(); for (int i = list->selected; i > 0; --i) { ++it; } CEnchantMgr::GetInstance()->RequestPerfectEnchant( this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot), it->itemId ); } } // OFFSET: 0x00A04E60 // FUNCTION: fn_14966 void CUINormalRandom::RequestEnchant() { CEnchantMgr::GetInstance()->RequestRandomEnchant( this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot) ); } // OFFSET: 0x00A04F10 // FUNCTION: fn_14967 void CUIReset::RequestEnchant() { CEnchantMgr::GetInstance()->RequestResetEnchant(this->group, static_cast(this->gameItem->GetItemInfo()->identity[1])); } // OFFSET: 0x00A04FB0 // FUNCTION: fn_14968 void CUIUpgradePerfect::RequestEnchant() { if (this->isUpgrade) { CEnchantMgr::GetInstance()->RequestUpgradeEnchant( this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot) ); return; } CUIListBoxEx* list = this->enchantList; if (static_cast(list->selected) >= 0 && list->selected < list->data.size()) { auto it = list->data.begin(); std::advance(it, static_cast(list->selected)); CEnchantMgr::GetInstance()->RequestUpgradePerfectEnchant( this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot), it->itemId ); } } // OFFSET: 0x00A050E0 // FUNCTION: fn_14969 void CUIUpgradeRandom::RequestEnchant() { CEnchantMgr::GetInstance()->RequestUpgradeRandomEnchant( this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot) ); } } // OFFSET: 0x00A08110 // FUNCTION: fn_15017 bool CUIEnchantUI::CanHitTest() { return !CEnchantMgr::GetInstance()->m_inputBlocked; } // OFFSET: 0x009F6D40 // FUNCTION: fn_14766 template <> CUIListBoxEx::CUIListBoxEx() : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), selectionFlag(1), rebind(0) { } // OFFSET: 0x009F6F00 // FUNCTION: fn_14767 template <> CUIListBoxEx::CUIListBoxEx() : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), selectionFlag(1), rebind(0) { } // OFFSET: 0x009F7670 // FUNCTION: fn_14774 template <> CUIListBoxEx::~CUIListBoxEx() { } // OFFSET: 0x00A05970 // FUNCTION: fn_14978 void CUIEnchantUI::OnSelectTarget(EnchantUI::CUITargetItem* item, const ITEM_INFO& info) { this->normalPage->LoadTarget(this->enchantInfo, this->group, *item->itemIcon->GetItemInfo()); this->upgradePage->LoadTarget(this->enchantInfo, this->group, *item->itemIcon->GetItemInfo()); this->resetPage->LoadTarget(this->enchantInfo, this->group, *item->itemIcon->GetItemInfo()); this->Invalidate(); } // OFFSET: 0x00A06C40 // FUNCTION: fn_15008 void CUIEnchantUI::SetEnchantGroup(uint64_t group) { this->enchantInfo = CEnchantMgr::GetInstance()->GetEnchantInfo(group); if (!this->enchantInfo) { g_windowMgr.CloseWindow(WID_ENCHANTUI); return; } this->group = group; this->textViewer->Clear(); this->textViewer->AddLine(this->enchantInfo->caution); for (int itemId : this->enchantInfo->targetItems) { const std::vector indices = g_session.FindInventoryIndicesByItemId(itemId, 1); for (int index : indices) { if (g_session.HasSwapEquipmentItem(index)) { continue; } const ITEM_INFO target = LookupClientItemByIdentity(g_session.m_inventoryItems, index); if (static_cast(target.refiningLevel) < this->enchantInfo->condition1) { continue; } if (static_cast(target.grade) < this->enchantInfo->condition2) { continue; } if (!this->enchantInfo->approveRandomOption && target.optionCount > 0) { continue; } this->targetList->data.push_back(target); } this->targetList->UpdateScrollBar(); } } namespace EnchantUI { // OFFSET: 0x00A06BE0 // FUNCTION: fn_15007 void CUIEnchantItem::SetFrozen(bool frozen) { auto* const icon = this->itemIcon; icon->transparent = frozen; icon->Invalidate(); this->name->SetColor(frozen ? 0xAAAAAA : 0xC89682); } // OFFSET: 0x00A05860 // FUNCTION: fn_14977 void CUIEnchantPage::UpdateEnchantItem(CUIEnchantItem* item, const CEnchantItemData& data) { { ITEM_INFO info; info.SetItemId(data.itemId); info.identified = 1; item->itemIcon->SetItem(info); item->name->SetText(info.DisplayName(0)); } item->SetFrozen(data.frozen); } // OFFSET: 0x00A05B90 // FUNCTION: fn_14979 void UpdateTargetItem(CUITargetItem* item, ITEM_INFO* info) { item->itemIcon->SetItem(*info); if (0 < info->grade) { item->targetIcon->SetImage(std::format("유저인터페이스\\grade_enchant\\grade_icon{}.bmp", info->grade)); } item->targetIcon->Show(0 < info->grade); item->targetText->SetText(info->DisplayName(0)); } // OFFSET: 0x00A05E20 // FUNCTION: fn_14984 void CUIMainPage::OnInit() { CUITabButton* button = this->tab->FindButton(this->firstPage); if (button != nullptr) { button->disabled = 1; button->Invalidate(); } button = this->tab->FindButton(this->secondPage); if (button != nullptr) { button->disabled = 1; button->Invalidate(); } } } // OFFSET: 0x009F3160 // FUNCTION: fn_14752 void CUIEnchantUI::Initialize() { this->ownedSkinColors = 0; this->m_resolveSkin = true; this->Resize(690, 470); this->Move(0, 0); this->OnCreate(this->geometry.width, this->geometry.height); this->OnInit(); } // OFFSET: 0x00A06170 // FUNCTION: fn_14993 void EnchantUI::CUIUpgradeRandom::OnInit() { EnchantUI::CUIEnchantPage::OnInit(); auto* const list = this->enchantList; list->layoutFlag = 1; list->Invalidate(); } namespace EnchantUI { // OFFSET: 0x00A05CF0 // FUNCTION: fn_14981 void CUIEnchantPage::OnInit() { for (int i = 0; i < 8; ++i) { CUIIngredient* ingredient = this->CreateIngredient(); ingredient->Move(ingredient->geometry.x + i % 4 * 74, ingredient->geometry.y + i / 4 * 52); this->ingredients.push_back(ingredient); } this->ResetSlots(); } // OFFSET: 0x00A05E80 // FUNCTION: fn_14985 void CUINormalPerfect::OnInit() { CUIEnchantPage::OnInit(); for (const auto& slot : this->slots) { auto* const radioButton = slot.second->radioButton; radioButton->disabled = 1; radioButton->Invalidate(); } } // OFFSET: 0x00A05F10 // FUNCTION: fn_14986 void CUINormalRandom::OnInit() { CUIEnchantPage::OnInit(); for (const auto& slot : this->slots) { auto* const radioButton = slot.second->radioButton; radioButton->disabled = 1; radioButton->Invalidate(); } auto* const list = this->enchantList; list->layoutFlag = 1; list->Invalidate(); } // OFFSET: 0x00A05FB0 // FUNCTION: fn_14987 void CUIReset::OnInit() { CUIEnchantPage::OnInit(); for (const auto& slot : this->slots) { auto* const radioButton = slot.second->radioButton; radioButton->disabled = 1; radioButton->Invalidate(); } auto* const list = this->enchantList; list->layoutFlag = 1; list->Invalidate(); } // OFFSET: 0x00A06350 // FUNCTION: fn_15002 void CUIEnchantPage::UpdateEnchantInfo() { this->enchantList->ClearData(); for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } this->costText->SetText(std::to_string(0)); { CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } const bool ready = this->LoadEnchantList(); if (CUIMainPage* mainPage = dynamic_cast(this->parent)) { if (CUITabButton* button = mainPage->tab->FindButton(this)) { button->disabled = !ready; button->Invalidate(); } } } // OFFSET: 0x00A06520 // FUNCTION: fn_15003 void CUIReset::UpdateEnchantInfo() { for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } this->costText->SetText(std::to_string(0)); { CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } this->enchantList->ClearData(); this->LoadEnchantList(); } // OFFSET: 0x00A06800 // FUNCTION: fn_15004 void CUIEnchantPage::ResetSlots() { for (const auto& slot : this->slots) { slot.second->Show(0); } for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } this->enchantList->ClearData(); this->costText->SetText(std::to_string(0)); { CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } this->SetSlot(-1); } // OFFSET: 0x00A06F80 // FUNCTION: fn_15009 bool CUINormalPerfect::LoadEnchantList() { const int slot = this->FindEmptySlot(); if (slot == -1) { return false; } std::optional option = this->FindOption(slot); if (!option) { return false; } this->SetSlot(slot); if ((*option)->perfectEnchants.size() == 0) { return false; } for (const auto& entry : (*option)->perfectEnchants) { const bool lackZeny = g_session.m_zeny < entry.second.cost; const bool lackMaterial = std::any_of(entry.second.materials.begin(), entry.second.materials.end(), [](const std::pair& material) { return static_cast(g_session.GetInventoryItemCount(material.first)) < static_cast(material.second); }); const bool frozen = lackZeny || lackMaterial; this->enchantList->AddData({entry.first, frozen}, false); } this->enchantList->UpdateScrollBar(); return true; } } namespace EnchantUI { // OFFSET: 0x00A05470 // FUNCTION: fn_14975 void CUINormalPerfect::OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemData& data) { for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } this->costText->SetText(std::to_string(0)); std::optional option = this->FindOption(this->selectedSlot); if (option && (*option)->perfectEnchants.size() != 0) { const int itemId = std::atoi(item->itemIcon->GetItemInfo()->itemId.c_str()); auto it = (*option)->perfectEnchants.find(itemId); if (it != (*option)->perfectEnchants.end()) { this->SetCost(it->second); } } } // OFFSET: 0x00A05640 // FUNCTION: fn_14976 void CUIUpgradePerfect::OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemData& data) { for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } this->costText->SetText(std::to_string(0)); std::optional option = this->FindOption(this->selectedSlot); if (option && (*option)->perfectUpgrades.size() != 0) { const int baseItemId = std::atoi(this->slots[this->selectedSlot]->itemIcon->GetItemInfo()->itemId.c_str()); auto base = (*option)->perfectUpgrades.find(baseItemId); if (base != (*option)->perfectUpgrades.end()) { const int itemId = std::atoi(item->itemIcon->GetItemInfo()->itemId.c_str()); auto it = base->second.find(itemId); if (it != base->second.end()) { this->SetCost(it->second); } } } } // OFFSET: 0x00A072E0 // FUNCTION: fn_15011 bool CUIReset::LoadEnchantList() { this->SetCost(*reinterpret_cast(&this->enchantInfo->resetCost)); if (!this->enchantInfo->resetEnabled) { { CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } return false; } const std::vector& slots = this->enchantInfo->slots; const bool empty = std::none_of(slots.begin(), slots.end(), [item = *this->gameItem->GetItemInfo()](int slot) { if (slot >= 4) { return false; } int card; std::memcpy(&card, item.cards + slot * 4, sizeof(card)); return card != 0; }); if (empty) { { CUIImageButton* button = this->enchantButton; button->disabled = empty; button->Invalidate(); } } return !empty; } // OFFSET: 0x00A079E0 // FUNCTION: fn_15014 bool CUIEnchantPage::SetItem(const ITEM_INFO& item) { if (item.identity[1] <= 0) { return false; } this->gameItem->SetItem(item); for (const auto& entry : this->slots) { CUISlot* slot = entry.second; int card = 0; if (entry.first < 4) { std::memcpy(&card, item.cards + entry.first * 4, sizeof(card)); } if (card > 0) { ITEM_INFO cardInfo; cardInfo.SetItemId(card); cardInfo.identified = 1; slot->itemIcon->SetItem(cardInfo); slot->radioButton->tooltip = slot->itemIcon->name; slot->description->Clear(); slot->description->AddLine(cardInfo.DisplayName(0)); slot->Show(1); } else { slot->Show(0); } } return true; } // OFFSET: 0x00A07BA0 // FUNCTION: fn_15015 void CUIIngredient::SetMaterial(int itemId, int required) { ITEM_INFO info; info.SetItemId(itemId); info.identified = 1; this->itemIcon->SetItem(info); const int owned = g_session.GetInventoryItemCount(itemId); this->ownedText->SetText(std::to_string(owned)); this->requiredText->SetText(std::format("/{}", required)); const bool enough = owned >= required; this->sufficientMaterialImage->Show(enough); const std::uint32_t color = enough ? 0xF0F0F0 : 0x5A3CE6; this->ownedText->SetColor(color); this->ownedText->SetOutline(enough, 0x965532); this->requiredText->SetColor(color); this->requiredText->SetOutline(enough, 0x965532); } // OFFSET: 0x00A07F00 // FUNCTION: fn_15016 void CUIEnchantPage::SetCost(const EnchantPerfectInfo& info) { auto material = info.materials.begin(); for (CUIIngredient* ingredient : this->ingredients) { if (material != info.materials.end()) { ingredient->Show(1); ingredient->SetMaterial(material->first, material->second); ++material; } else { ingredient->Show(0); } } this->costText->SetText(std::to_string(info.cost)); const bool lackZeny = g_session.m_zeny < info.cost; const bool lackMaterial = std::any_of(this->ingredients.begin(), this->ingredients.end(), [](CUIIngredient* ingredient) { return ingredient->geometry.visible && !ingredient->sufficientMaterialImage->geometry.visible; }); { CUIImageButton* button = this->enchantButton; button->disabled = lackZeny || lackMaterial; button->Invalidate(); } } // OFFSET: 0x00A07100 // FUNCTION: fn_15010 bool CUINormalRandom::LoadEnchantList() { const int slot = this->FindEmptySlot(); if (slot == -1) { return false; } std::optional option = this->FindOption(slot); if (!option) { return false; } this->SetSlot(slot); if ((*option)->enchants.size() == 0) { return false; } auto grade = (*option)->enchants.find(this->gameItem->GetItemInfo()->grade); if (grade == (*option)->enchants.end()) { return false; } std::list itemIds; for (const auto& entry : grade->second) { itemIds.push_back(entry.first); } for (int itemId : itemIds) { this->enchantList->AddData({itemId, false}, false); } this->enchantList->UpdateScrollBar(); this->SetCost(*reinterpret_cast(*option)); return true; } // OFFSET: 0x00A075E0 // FUNCTION: fn_15013 bool CUIUpgradeRandom::LoadEnchantList() { if (this->selectedSlot == -1) { return false; } std::optional option = this->FindOption(this->selectedSlot); if (!option || (*option)->randomUpgrades.size() == 0) { return false; } const int baseItemId = std::atoi(this->slots[this->selectedSlot]->itemIcon->GetItemInfo()->itemId.c_str()); auto base = (*option)->randomUpgrades.find(baseItemId); if (base == (*option)->randomUpgrades.end()) { return false; } std::list itemIds; for (const auto& entry : base->second.rates) { itemIds.push_back(entry.first); } for (int itemId : itemIds) { this->enchantList->AddData({itemId, false}, false); } this->enchantList->UpdateScrollBar(); this->SetCost(*reinterpret_cast(&base->second)); return true; } // OFFSET: 0x00A07440 // FUNCTION: fn_15012 bool CUIUpgradePerfect::LoadEnchantList() { if (this->selectedSlot == -1) { return false; } std::optional option = this->FindOption(this->selectedSlot); if (!option) { return false; } this->isUpgrade = (*option)->isUpgrade; const auto& upgrades = (*option)->perfectUpgrades; if (upgrades.size() == 0) { return false; } const int baseItemId = std::atoi(this->slots[this->selectedSlot]->itemIcon->GetItemInfo()->itemId.c_str()); auto base = upgrades.find(baseItemId); if (base == upgrades.end() || base->second.size() == 0) { return false; } for (const auto& entry : base->second) { const bool lackZeny = g_session.m_zeny < entry.second.cost; const bool lackMaterial = std::any_of(entry.second.materials.begin(), entry.second.materials.end(), [](const std::pair& material) { return static_cast(g_session.GetInventoryItemCount(material.first)) < static_cast(material.second); }); const bool frozen = lackZeny || lackMaterial; this->enchantList->AddData({entry.first, frozen}, false); } this->enchantList->UpdateScrollBar(); return true; } // OFFSET: 0x009F9FE0 // FUNCTION: fn_14817 void CUIEnchantPage::OnCreate(int width, int height) { this->background = new CUIStaticImage; this->background->SetSize(470, 377); this->background->Move(0, 0); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x57, 0x5E, 0x21, 0x27, 0x11, 0x5D, 0x2C, 0xE2, 0x51, 0x15, 0x21, 0x11, 0x6C, 0x29, 0xB5, 0x6A, 0xF9, 0x92, 0x89, 0xBC, 0xBF, 0xE7, 0xBC, 0x66, 0xCB, 0x93, 0x86, 0x82, 0xA2, 0xE6, 0x8B, 0x5F, 0xF6, 0x96, 0x84, 0xF3, 0xB3, 0xFE, 0x99, 0x2F }; constexpr EncryptedSource<40> source(bytes); // GLOBAL: gl_25259 thread_local EncryptedName<40, 0x2FE993D1DDE1F197ULL> name(source); return name.Text(); }())); } this->AddChild(this->background); this->gameItem = new CUIGameItem; this->gameItem->SetMode(1); this->gameItem->SetScale(100); this->gameItem->Move(112, 5); this->gameItem->showNameTooltip = 1; this->gameItem->allowItemInfo = 1; this->AddChild(this->gameItem); CUISlot* slot = new CUISlot0; slot->SetSize(106, 84); slot->Move(6, 20); this->AddChild(slot); this->slots[0] = slot; slot = new CUISlot1; slot->SetSize(106, 84); slot->Move(29, 105); this->AddChild(slot); this->slots[1] = slot; slot = new CUISlot2; slot->SetSize(106, 84); slot->Move(164, 105); this->AddChild(slot); this->slots[2] = slot; slot = new CUISlot3; slot->SetSize(106, 84); slot->Move(187, 20); this->AddChild(slot); this->slots[3] = slot; CUIListBoxEx* enchantList = new CUIListBoxEx; this->enchantList = enchantList; enchantList->itemWidth = 150; enchantList->rowHeight = 30; enchantList->SetSize(169, 377); this->enchantList->Move(300, 0); this->enchantList->SetOnSelect([this](CUIEnchantItem* item, const CEnchantItemData& data) { this->OnSelectEnchant(item, data); }); this->enchantList->SetBinder([this](CUIEnchantItem* item, const CEnchantItemData& data) { this->UpdateEnchantItem(item, data); }); { this->enchantList->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x0D, 0x5E, 0x59, 0x4F, 0x4D, 0x95, 0xC2, 0x60, 0x0B, 0x15, 0x59, 0x79, 0x30, 0xE1, 0x5B, 0xE8, 0xA3, 0x92, 0xF1, 0xD4, 0xE3, 0x2F, 0x52, 0xE4, 0x91, 0x93, 0xED, 0xDB, 0xD2, 0x3E, 0x69, 0xCE, 0x92, 0x98, 0xED, 0xD0, 0xE0, 0x75, 0x65, 0xC0, 0xBD, 0xF1 }; constexpr EncryptedSource<42> source(bytes); // GLOBAL: gl_25263 thread_local EncryptedName<42, 0xAD075B8DB599F1CDULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xBF, 0xBA, 0x4D, 0xEB, 0xF7, 0xC1, 0x4E, 0xE2, 0xB9, 0xF1, 0x4D, 0xDD, 0x8A, 0xB5, 0xD7, 0x6A, 0x11, 0x76, 0xE5, 0x70, 0x59, 0x7B, 0xDE, 0x66, 0x23, 0x77, 0xF9, 0x7F, 0x68, 0x6A, 0xE5, 0x4C, 0x20, 0x7C, 0xF9, 0x74, 0x5A, 0x50, 0xFB, 0x5D, 0x1A, 0x66, 0xFE, 0x3F, 0x55, 0x62, 0xFB, 0x2F }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25262 thread_local EncryptedName<48, 0x2F8B0F37118D157FULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xB5, 0x62, 0x2D, 0xA7, 0xAB, 0xAB, 0x20, 0xF8, 0xB3, 0x29, 0x2D, 0x91, 0xD6, 0xDF, 0xB9, 0x70, 0x1B, 0xAE, 0x85, 0x3C, 0x05, 0x11, 0xB0, 0x7C, 0x29, 0xAF, 0x99, 0x33, 0x34, 0x00, 0x8B, 0x56, 0x2A, 0xA4, 0x99, 0x38, 0x06, 0x3A, 0x8A, 0x43, 0x10, 0xBF, 0xC3, 0x3F, 0x06, 0x15, 0xE5 }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25261 thread_local EncryptedName<47, 0x35E5656B5DEDCD75ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x3D, 0x16, 0x7B, 0xDB, 0x5F, 0x33, 0x84, 0x84, 0x3B, 0x5D, 0x7B, 0xED, 0x22, 0x47, 0x1D, 0x0C, 0x93, 0xDA, 0xD3, 0x40, 0xF1, 0x89, 0x14, 0x00, 0xA1, 0xDB, 0xCF, 0x4F, 0xC0, 0x98, 0x2F, 0x2A, 0xA2, 0xD0, 0xCF, 0x44, 0xF2, 0xD3, 0x23, 0x24, 0x8D, 0xB9 }; constexpr EncryptedSource<42> source(bytes); // GLOBAL: gl_25260 thread_local EncryptedName<42, 0x4941FD9F21BBB9FDULL> name(source); return name.Text(); }())); } { auto* const list = this->enchantList; list->itemX = 3; list->itemY = 0; } this->enchantList->scrollBar->SetSize(16, 377); this->enchantList->scrollBar->Move(153, 0); this->enchantList->scrollBar->step = 30; { this->enchantList->SetScrollBarButtonImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x3D, 0x78, 0x8D, 0x53, 0x75, 0x41, 0x52, 0x2A, 0x3B, 0x33, 0x8D, 0x65, 0x08, 0x35, 0xCB, 0xA2, 0x93, 0xB4, 0x25, 0xC8, 0xDB, 0xFB, 0xC2, 0xAE, 0xA1, 0xA4, 0x2E, 0xDB, 0xDA, 0xE3, 0xFB, 0xB8, 0x9C, 0xA5, 0x3F, 0xC6, 0xC2, 0xD0, 0xE2, 0x97, 0xD3, 0xB5, 0x20, 0xD9, 0xB5 }; constexpr EncryptedSource<45> source(bytes); // GLOBAL: gl_25265 thread_local EncryptedName<45, 0xE7978FB5A94DD7FDULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xAB, 0x16, 0x07, 0xF5, 0xA7, 0x41, 0x38, 0x7A, 0xAD, 0x5D, 0x07, 0xC3, 0xDA, 0x35, 0xA1, 0xF2, 0x05, 0xDA, 0xAF, 0x6E, 0x09, 0xFB, 0xA8, 0xFE, 0x37, 0xCA, 0xA4, 0x7D, 0x08, 0xE3, 0x91, 0xE8, 0x0A, 0xCB, 0xB5, 0x60, 0x10, 0xD0, 0x99, 0xD8, 0x1C, 0xD4, 0xE9, 0x6D, 0x0A, 0xFF, 0xFD }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25264 thread_local EncryptedName<47, 0xB7FD8F670FC7B96BULL> name(source); return name.Text(); }())); } { this->enchantList->SetScrollBarBackground(std::string([]() { constexpr std::uint8_t bytes[] = { 0xA3, 0x5A, 0x21, 0x85, 0xFB, 0xEB, 0xD8, 0x06, 0xA5, 0x11, 0x21, 0xB3, 0x86, 0x9F, 0x41, 0x8E, 0x0D, 0x96, 0x89, 0x1E, 0x55, 0x51, 0x48, 0x82, 0x3F, 0x86, 0x82, 0x0D, 0x54, 0x49, 0x71, 0x94, 0x01, 0x92, 0xCF, 0x1D, 0x56, 0x55, 0x1D }; constexpr EncryptedSource<39> source(bytes); // GLOBAL: gl_25266 thread_local EncryptedName<39, 0xCB1D253B7FE1F563ULL> name(source); return name.Text(); }())); } { this->enchantList->SetScrollBarThumbImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x09, 0xBC, 0x39, 0x89, 0x39, 0x17, 0xD0, 0xBC, 0x0F, 0xF7, 0x39, 0xBF, 0x44, 0x63, 0x49, 0x34, 0xA7, 0x70, 0x91, 0x12, 0x97, 0xAD, 0x40, 0x38, 0x95, 0x60, 0x9A, 0x01, 0x96, 0xB5, 0x79, 0x2E, 0xAB, 0x67, 0x97, 0x5D, 0x9B, 0xB4, 0x65, 0x71 }; constexpr EncryptedSource<40> source(bytes); // GLOBAL: gl_25267 thread_local EncryptedName<40, 0x7115D9F973F913C9ULL> name(source); return name.Text(); }())); } this->enchantList->AddNewItem(); this->AddChild(this->enchantList); this->costText = new CUIStaticText; this->costText->SetSize(100, 15); this->costText->Move(150, 309); this->costText->SetText(""); this->costText->SetFitText(0); this->costText->SetAlign(2, 6); { this->costText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x5A, 0x70, 0xFF, 0x40, 0x1C, 0x23}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25268 thread_local EncryptedName<6, 0xE55723712993051DULL> name(source); return name.Text(); }())); } this->costText->SetFontHeight(14); this->costText->SetBold(1); this->costText->SetColor(0); this->costText->SetShadow(0, 0xFFFFFF); this->costText->SetOutline(0, 0xFFFFFF); this->AddChild(this->costText); this->enchantButton = new CUIImageButton; this->enchantButton->SetSize(140, 40); this->enchantButton->Move(80, 330); this->enchantButton->SetOnClick([this]() { this->RequestEnchant(); }); { CUIImageButton* button = this->enchantButton; button->disabled = 0; button->Invalidate(); } this->enchantButton->SetImages( std::string("유저인터페이스\\EnchantUI\\btn_enc.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_enc_press.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_enc_over.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_enc_dis.bmp") ); this->AddChild(this->enchantButton); } // OFFSET: 0x009FCDE0 // FUNCTION: fn_14820 void CUINormalPerfect::OnCreate(int width, int height) { CUIEnchantPage::OnCreate(width, height); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0xBF, 0x7A, 0x6F, 0xA1, 0xAB, 0x7F, 0xD0, 0xC2, 0xB9, 0x31, 0x6F, 0x97, 0xD6, 0x0B, 0x49, 0x4A, 0x11, 0xB6, 0xC7, 0x3A, 0x05, 0xC5, 0x40, 0x46, 0x23, 0xB7, 0xC8, 0x04, 0x18, 0xC4, 0x77, 0x7F, 0x1E, 0xB2, 0xCA, 0x02, 0x45, 0xD3, 0x78, 0x7F, 0x7F }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25269 thread_local EncryptedName<41, 0x0F15B16B5BAFD57FULL> name(source); return name.Text(); }())); } } // OFFSET: 0x009FCFB0 // FUNCTION: fn_14821 void CUINormalRandom::OnCreate(int width, int height) { CUIEnchantPage::OnCreate(width, height); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x8F, 0xC8, 0x2D, 0x7F, 0xC9, 0xF9, 0xFA, 0xB4, 0x89, 0x83, 0x2D, 0x49, 0xB4, 0x8D, 0x63, 0x3C, 0x21, 0x04, 0x85, 0xE4, 0x67, 0x43, 0x6A, 0x30, 0x13, 0x05, 0x8A, 0xDA, 0x7A, 0x42, 0x5D, 0x09, 0x2E, 0x00, 0x88, 0xC7, 0x27, 0x55, 0x52, 0x09, 0x4F }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25270 thread_local EncryptedName<41, 0x793F370985ED674FULL> name(source); return name.Text(); }())); } } // OFFSET: 0x009FD180 // FUNCTION: fn_14822 void CUIReset::OnCreate(int width, int height) { CUIEnchantPage::OnCreate(width, height); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x8F, 0x0E, 0x0F, 0xCF, 0xA3, 0x19, 0x84, 0xB4, 0x89, 0x45, 0x0F, 0xF9, 0xDE, 0x6D, 0x1D, 0x3C, 0x21, 0xC2, 0xA7, 0x54, 0x0D, 0xA3, 0x14, 0x30, 0x13, 0xC3, 0xA8, 0x6A, 0x10, 0xA2, 0x23, 0x09, 0x2E, 0xC6, 0xAA, 0x1B, 0x01, 0xBA, 0x31, 0x79 }; constexpr EncryptedSource<40> source(bytes); // GLOBAL: gl_25271 thread_local EncryptedName<40, 0x7941D76335CFA14FULL> name(source); return name.Text(); }())); } } // OFFSET: 0x00A01AD0 // FUNCTION: fn_14830 void CUIUpgradePerfect::OnCreate(int width, int height) { CUIUpgradeEnchantPage::OnCreate(width, height); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x21, 0x36, 0x47, 0xB5, 0x41, 0x0D, 0xE4, 0xBE, 0x27, 0x7D, 0x47, 0x83, 0x3C, 0x79, 0x7D, 0x36, 0x8F, 0xFA, 0xEF, 0x2E, 0xEF, 0xB7, 0x74, 0x3A, 0xBD, 0xFB, 0xE0, 0x10, 0xF2, 0xB6, 0x43, 0x03, 0x80, 0xFE, 0xE2, 0x16, 0xAF, 0xA1, 0x4C, 0x03, 0xE1 }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25272 thread_local EncryptedName<41, 0x7321C3814F8799E1ULL> name(source); return name.Text(); }())); } } // OFFSET: 0x00A01CA0 // FUNCTION: fn_14831 void CUIUpgradeRandom::OnCreate(int width, int height) { CUIUpgradeEnchantPage::OnCreate(width, height); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0xE3, 0x5E, 0x17, 0xED, 0x17, 0x87, 0x26, 0xB0, 0xE5, 0x15, 0x17, 0xDB, 0x6A, 0xF3, 0xBF, 0x38, 0x4D, 0x92, 0xBF, 0x76, 0xB9, 0x3D, 0xB6, 0x34, 0x7F, 0x93, 0xB0, 0x48, 0xA4, 0x3C, 0x81, 0x0D, 0x42, 0x96, 0xB2, 0x55, 0xF9, 0x2B, 0x8E, 0x0D, 0x23 }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25273 thread_local EncryptedName<41, 0x7DE349D717D7F123ULL> name(source); return name.Text(); }())); } } } // OFFSET: 0x009F31B0 // FUNCTION: fn_14753 void CUIEnchantUI::OnCreate(int width, int height) { this->background = new CUIStaticImage; this->background->SetSize(690, 470); this->background->Move(0, 0); { this->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x0D, 0xAC, 0x0D, 0x81, 0x57, 0xF5, 0xD6, 0xFE, 0x0B, 0xE7, 0x0D, 0xB7, 0x2A, 0x81, 0x4F, 0x76, 0xA3, 0x60, 0xA5, 0x1A, 0xF9, 0x4F, 0x46, 0x7A, 0x91, 0x61, 0xAA, 0x24, 0xF2, 0x55, 0x70, 0x5B, 0xAC, 0x6D, 0xB9, 0x2E, 0xDE, 0x15, 0x71, 0x5E, 0xBD, 0x03 }; constexpr EncryptedSource<42> source(bytes); // GLOBAL: gl_25281 thread_local EncryptedName<42, 0x33133B977BCD03CDULL> name(source); return name.Text(); }())); } this->AddChild(this->background); this->titleBar = new CUITitleBar; this->titleBar->SetSize(690, 17); this->titleBar->Move(0, 0); { this->titleBar->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x11, 0xF4, 0x57, 0x1F, 0xF9, 0x49, 0x2E, 0xE2, 0x17, 0xBF, 0x57, 0x29, 0x84, 0x3D, 0xB7, 0x4D, 0xB0, 0x28, 0xFE, 0x86, 0x66, 0xEE, 0x85, 0x5B, 0xB4, 0x29, 0xF1, 0x84, 0x5A, 0xE2, 0xB7, 0x5B, 0xB8, 0x2F, 0xFB, 0x80, 0x5B, 0xE6, 0x99, 0x70, 0xBD, 0x3E, 0xF1, 0x91, 0x17, 0xE5, 0x86, 0x5F, 0xD1 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25284 thread_local EncryptedName<49, 0x2FEB8739E5975BD1ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xB5, 0x94, 0xC3, 0xD5, 0xD3, 0x0F, 0x64, 0xA6, 0xB3, 0xDF, 0xC3, 0xE3, 0xAE, 0x7B, 0xFD, 0x09, 0x14, 0x48, 0x6A, 0x4C, 0x4C, 0xA8, 0xCF, 0x1F, 0x10, 0x49, 0x65, 0x4E, 0x70, 0xA4, 0xFD, 0x1F, 0x1C, 0x4F, 0x6F, 0x4A, 0x71, 0xA0, 0xD3, 0x34, 0x18, 0x52, 0x67, 0x01, 0x71, 0xAC, 0xD1, 0x6B }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25283 thread_local EncryptedName<48, 0x6BA1C1132F033B75ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xEF, 0x78, 0x85, 0xDF, 0xF9, 0x65, 0xE8, 0x6C, 0xE9, 0x33, 0x85, 0xE9, 0x84, 0x11, 0x71, 0xC3, 0x4E, 0xA4, 0x2C, 0x46, 0x66, 0xC2, 0x43, 0xD5, 0x4A, 0xA5, 0x23, 0x44, 0x5A, 0xCE, 0x71, 0xD5, 0x46, 0xA3, 0x29, 0x40, 0x5B, 0xCA, 0x5F, 0xFE, 0x5D, 0xBE, 0x22, 0x4D, 0x4D, 0x85, 0x4F, 0xCC, 0x5F, 0xD7 }; constexpr EncryptedSource<50> source(bytes); // GLOBAL: gl_25282 thread_local EncryptedName<50, 0xA12DAB392545D72FULL> name(source); return name.Text(); }())); } this->AddChild(this->titleBar); CUIStaticText* title = new CUIStaticText; title->SetSize(100, 17); title->Move(18, 0); title->SetText(""); title->SetFitText(0); title->SetAlign(0, 6); { title->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x5A, 0xB2, 0x27, 0xDC, 0xB0, 0x77}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25285 thread_local EncryptedName<6, 0x234977DDB54BC71DULL> name(source); return name.Text(); }())); } title->SetFontHeight(12); title->SetBold(0); title->SetColor(0); title->SetShadow(1, 0xFFFFFF); title->SetOutline(0, 0xFFFFFF); this->titleBar->titleText = title; this->titleBar->AddChild(title); CUIImageButton* closeButton = new CUIImageButton; closeButton->SetSize(11, 11); closeButton->Move(676, 3); closeButton->SetOnClick([this]() { this->OnClickClose(); }); closeButton->disabled = 0; closeButton->Invalidate(); { const std::string disabled([]() { constexpr std::uint8_t bytes[] = { 0x15, 0x96, 0xEB, 0xB3, 0x27, 0x69, 0x52, 0x68, 0x13, 0xDD, 0xEB, 0x85, 0x5A, 0x1D, 0xCB, 0xC7, 0xB4, 0x4A, 0x42, 0x2A, 0xB8, 0xCE, 0xF9, 0xD1, 0xB0, 0x4B, 0x4D, 0x28, 0x84, 0xC2, 0xCB, 0xD6, 0xAC, 0x4A, 0x74, 0x2A, 0x8B, 0xC8, 0xE4, 0xC0, 0x8A, 0x56, 0x4D, 0x2F, 0xC9, 0xC5, 0xFA, 0xD5, 0xD5 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25286 thread_local EncryptedName<49, 0xA597A7E7492B39D5ULL> name(source); return name.Text(); }()); closeButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x05, 0x82, 0xEB, 0xC5, 0x49, 0xD3, 0xA8, 0x22, 0x03, 0xC9, 0xEB, 0xF3, 0x34, 0xA7, 0x31, 0x8D, 0xA4, 0x5E, 0x42, 0x5C, 0xD6, 0x74, 0x03, 0x9B, 0xA0, 0x5F, 0x4D, 0x5E, 0xEA, 0x78, 0x31, 0x9C, 0xBC, 0x5E, 0x74, 0x5C, 0xE5, 0x72, 0x1E, 0x8A, 0x9A, 0x42, 0x4D, 0x59, 0xA7, 0x7F, 0x00, 0x9F, 0xC5 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25289 thread_local EncryptedName<49, 0xEF6D1D893F2B2DC5ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x9B, 0xFC, 0x9F, 0x27, 0x47, 0x51, 0x66, 0xF4, 0x9D, 0xB7, 0x9F, 0x11, 0x3A, 0x25, 0xFF, 0x5B, 0x3A, 0x20, 0x36, 0xBE, 0xD8, 0xF6, 0xCD, 0x4D, 0x3E, 0x21, 0x39, 0xBC, 0xE4, 0xFA, 0xFF, 0x4A, 0x22, 0x20, 0x00, 0xBE, 0xEB, 0xF0, 0xD0, 0x5C, 0x04, 0x3C, 0x31, 0xF3, 0xE5, 0xF2, 0xD3, 0x39 }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25288 thread_local EncryptedName<48, 0x39A39F87DD5F535BULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xB7, 0x38, 0x47, 0xE7, 0xE3, 0x9D, 0x24, 0xA2, 0xB1, 0x73, 0x47, 0xD1, 0x9E, 0xE9, 0xBD, 0x0D, 0x16, 0xE4, 0xEE, 0x7E, 0x7C, 0x3A, 0x8F, 0x1B, 0x12, 0xE5, 0xE1, 0x7C, 0x40, 0x36, 0xBD, 0x1C, 0x0E, 0xE4, 0xD8, 0x7E, 0x4F, 0x3C, 0x92, 0x0A, 0x28, 0xF8, 0xE9, 0x33, 0x41, 0x3E, 0x91, 0x6F }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25287 thread_local EncryptedName<48, 0x6FE153231D879777ULL> name(source); return name.Text(); }()), disabled); } this->titleBar->SetSecondButton(closeButton); this->targetList = new CUIListBoxEx; this->targetList->itemWidth = 200; this->targetList->rowHeight = 50; this->targetList->SetSize(220, 400); this->targetList->Move(0, 17); this->targetList->SetOnSelect([this](EnchantUI::CUITargetItem* item, const ITEM_INFO& info) { this->OnSelectTarget(item, info); }); this->targetList->SetBinder([this](EnchantUI::CUITargetItem* item, const ITEM_INFO& info) { EnchantUI::UpdateTargetItem(item, const_cast(&info)); }); { const std::string disabled([]() { constexpr std::uint8_t bytes[] = { 0xD7, 0xFE, 0x21, 0xBB, 0xF9, 0x0D, 0x46, 0x4A, 0xD1, 0xB5, 0x21, 0x8D, 0x84, 0x79, 0xDF, 0xC2, 0x79, 0x32, 0x89, 0x20, 0x57, 0xB7, 0xD6, 0xCE, 0x4B, 0x33, 0x86, 0x1E, 0x5C, 0xAD, 0xE0, 0xD8, 0x70, 0x34, 0x80, 0x33, 0x17, 0xA1, 0xEE, 0xF7, 0x17 }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25290 thread_local EncryptedName<41, 0x8783C33941E15117ULL> name(source); return name.Text(); }()); this->targetList->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0xB3, 0x40, 0x7B, 0x2B, 0x15, 0x2D, 0x6E, 0x32, 0xB5, 0x0B, 0x7B, 0x1D, 0x68, 0x59, 0xF7, 0xBA, 0x1D, 0x8C, 0xD3, 0xB0, 0xBB, 0x97, 0xFE, 0xB6, 0x2F, 0x8D, 0xDC, 0x8E, 0xB0, 0x8D, 0xC8, 0xA0, 0x14, 0x8A, 0xDA, 0xA3, 0xFB, 0x81, 0xC6, 0x8F, 0x73 }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25293 thread_local EncryptedName<41, 0xFFABE3D5D1BBEF73ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xCF, 0xE0, 0x85, 0x55, 0x5D, 0x8B, 0x5C, 0xCE, 0xC9, 0xAB, 0x85, 0x63, 0x20, 0xFF, 0xC5, 0x46, 0x61, 0x2C, 0x2D, 0xCE, 0xF3, 0x31, 0xCC, 0x4A, 0x53, 0x2D, 0x22, 0xF0, 0xF8, 0x2B, 0xFA, 0x5C, 0x68, 0x2A, 0x24, 0xDD, 0xC2, 0x35, 0xEB, 0x66, 0x7C, 0x3C, 0x6B, 0xCD, 0xF0, 0x35, 0x99 }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25292 thread_local EncryptedName<47, 0x0399459DAF454F0FULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x6B, 0x00, 0x4D, 0x77, 0x73, 0x43, 0x62, 0x18, 0x6D, 0x4B, 0x4D, 0x41, 0x0E, 0x37, 0xFB, 0x90, 0xC5, 0xCC, 0xE5, 0xEC, 0xDD, 0xF9, 0xF2, 0x9C, 0xF7, 0xCD, 0xEA, 0xD2, 0xD6, 0xE3, 0xC4, 0x8A, 0xCC, 0xCA, 0xEC, 0xFF, 0xEC, 0xE2, 0xD1, 0xB0, 0xD9, 0x81, 0xEF, 0xE0, 0xC3, 0x8D }; constexpr EncryptedSource<46> source(bytes); // GLOBAL: gl_25291 thread_local EncryptedName<46, 0xD5A78DB38D8DAFABULL> name(source); return name.Text(); }()), disabled); } this->targetList->itemX = 4; this->targetList->itemY = 0; this->targetList->scrollBar->SetSize(16, 400); this->targetList->scrollBar->Move(204, 0); this->targetList->scrollBar->step = 50; { this->targetList->SetScrollBarButtonImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x5F, 0x72, 0x43, 0xE5, 0xB7, 0x8B, 0xDE, 0xEA, 0x59, 0x39, 0x43, 0xD3, 0xCA, 0xFF, 0x47, 0x62, 0xF1, 0xBE, 0xEB, 0x7E, 0x19, 0x31, 0x4E, 0x6E, 0xC3, 0xAE, 0xE0, 0x6D, 0x18, 0x29, 0x77, 0x78, 0xFE, 0xAF, 0xF1, 0x70, 0x00, 0x1A, 0x6E, 0x57, 0xB1, 0xBF, 0xEE, 0x6F, 0x77 }; constexpr EncryptedSource<45> source(bytes); // GLOBAL: gl_25295 thread_local EncryptedName<45, 0x271B45771F83DD9FULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x4F, 0xF6, 0xA1, 0x11, 0x75, 0xD7, 0xC6, 0x0A, 0x49, 0xBD, 0xA1, 0x27, 0x08, 0xA3, 0x5F, 0x82, 0xE1, 0x3A, 0x09, 0x8A, 0xDB, 0x6D, 0x56, 0x8E, 0xD3, 0x2A, 0x02, 0x99, 0xDA, 0x75, 0x6F, 0x98, 0xEE, 0x2B, 0x13, 0x84, 0xC2, 0x46, 0x67, 0xA8, 0xF8, 0x34, 0x4F, 0x89, 0xD8, 0x69, 0x03 }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25294 thread_local EncryptedName<47, 0xC70319B5EB61598FULL> name(source); return name.Text(); }())); } { this->targetList->SetScrollBarBackground(std::string([]() { constexpr std::uint8_t bytes[] = { 0x17, 0x3A, 0xDF, 0x61, 0x91, 0x8B, 0x42, 0xC6, 0x11, 0x71, 0xDF, 0x57, 0xEC, 0xFF, 0xDB, 0x4E, 0xB9, 0xF6, 0x77, 0xFA, 0x3F, 0x31, 0xD2, 0x42, 0x8B, 0xE6, 0x7C, 0xE9, 0x3E, 0x29, 0xEB, 0x54, 0xB5, 0xF2, 0x31, 0xF9, 0x3C, 0x35, 0x87 }; constexpr EncryptedSource<39> source(bytes); // GLOBAL: gl_25296 thread_local EncryptedName<39, 0x0B8745519B1F95D7ULL> name(source); return name.Text(); }())); } { this->targetList->SetScrollBarThumbImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0xF1, 0x56, 0x13, 0x03, 0xDD, 0x81, 0x0E, 0xCC, 0xF7, 0x1D, 0x13, 0x35, 0xA0, 0xF5, 0x97, 0x44, 0x5F, 0x9A, 0xBB, 0x98, 0x73, 0x3B, 0x9E, 0x48, 0x6D, 0x8A, 0xB0, 0x8B, 0x72, 0x23, 0xA7, 0x5E, 0x53, 0x8D, 0xBD, 0xD7, 0x7F, 0x22, 0xBB, 0x01 }; constexpr EncryptedSource<40> source(bytes); // GLOBAL: gl_25297 thread_local EncryptedName<40, 0x01CB4F1DF9D3F931ULL> name(source); return name.Text(); }())); } this->targetList->AddNewItem(); this->AddChild(this->targetList); this->tab = new CUITab; this->tab->SetSize(290, 22); this->tab->Move(225, 18); this->AddChild(this->tab); CUITabButton* normalButton = new CUITabButton; normalButton->SetSize(65, 22); normalButton->Move(48, 0); normalButton->disabled = 0; normalButton->Invalidate(); { const std::string disabled([]() { constexpr std::uint8_t bytes[] = { 0x99, 0x2A, 0x47, 0x83, 0x37, 0xE1, 0xFA, 0x2E, 0x9F, 0x61, 0x47, 0xB5, 0x4A, 0x95, 0x63, 0xA6, 0x37, 0xE6, 0xEF, 0x18, 0x99, 0x5B, 0x6A, 0xAA, 0x05, 0xF1, 0xE6, 0x1B, 0xA8, 0x4A, 0x51, 0x80, 0x06, 0xE6, 0xE8, 0x14, 0x9A, 0x40, 0x51, 0xBC, 0x36, 0xF0, 0xF3, 0x57, 0x95, 0x42, 0x4F, 0xE3 }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25298 thread_local EncryptedName<48, 0xE33F2FF779878559ULL> name(source); return name.Text(); }()); normalButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x57, 0x66, 0x09, 0x61, 0x0D, 0x75, 0x74, 0x08, 0x51, 0x2D, 0x09, 0x57, 0x70, 0x01, 0xED, 0x80, 0xF9, 0xAA, 0xA1, 0xFA, 0xA3, 0xCF, 0xE4, 0x8C, 0xCB, 0xBD, 0xA8, 0xF9, 0x92, 0xDE, 0xDF, 0xA6, 0xC8, 0xAA, 0xA6, 0xF6, 0xA0, 0xD4, 0xDF, 0x9A, 0xF8, 0xBC, 0xBD, 0xB5, 0xAF, 0xD6, 0xC1, 0xC5 }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25301 thread_local EncryptedName<48, 0xC5B1BBCD9BC9C997ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x21, 0x2C, 0x11, 0x17, 0xD1, 0x4F, 0x7E, 0x0C, 0x27, 0x67, 0x11, 0x21, 0xAC, 0x3B, 0xE7, 0x84, 0x8F, 0xE0, 0xB9, 0x8C, 0x7F, 0xF5, 0xEE, 0x88, 0xBD, 0xF7, 0xB0, 0x8F, 0x4E, 0xE4, 0xD5, 0xA2, 0xBE, 0xE0, 0xBE, 0x80, 0x7C, 0xEE, 0xD5, 0x9E, 0x92, 0xE6, 0xBD, 0x88, 0x72, 0xF5, 0x95, 0xA3, 0x8C, 0xF3, 0xD1 }; constexpr EncryptedSource<51> source(bytes); // GLOBAL: gl_25300 thread_local EncryptedName<51, 0xC1BB8111EDD183E1ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x4B, 0x32, 0xB7, 0x77, 0x21, 0x13, 0xA2, 0xDA, 0x4D, 0x79, 0xB7, 0x41, 0x5C, 0x67, 0x3B, 0x52, 0xE5, 0xFE, 0x1F, 0xEC, 0x8F, 0xA9, 0x32, 0x5E, 0xD7, 0xE9, 0x16, 0xEF, 0xBE, 0xB8, 0x09, 0x74, 0xD4, 0xFE, 0x18, 0xE0, 0x8C, 0xB2, 0x09, 0x48, 0xE4, 0xE8, 0x03, 0xA3, 0x83, 0xB0, 0x17, 0x17 }; constexpr EncryptedSource<48> source(bytes); // GLOBAL: gl_25299 thread_local EncryptedName<48, 0x1767DDE18D779D8BULL> name(source); return name.Text(); }()), disabled); } this->tab->AddChild(normalButton); CUITabButton* upgradeButton = new CUITabButton; upgradeButton->SetSize(65, 22); upgradeButton->Move(113, 0); upgradeButton->disabled = 0; upgradeButton->Invalidate(); { const std::string disabled([]() { constexpr std::uint8_t bytes[] = { 0x1D, 0xFA, 0xAF, 0x55, 0x29, 0xDB, 0x2C, 0xB4, 0x1B, 0xB1, 0xAF, 0x63, 0x54, 0xAF, 0xB5, 0x3C, 0xB3, 0x36, 0x07, 0xCE, 0x87, 0x61, 0xBC, 0x30, 0x81, 0x21, 0x0E, 0xCD, 0xB6, 0x70, 0x87, 0x1A, 0x82, 0x32, 0x1D, 0xC0, 0x9E, 0x4A, 0x86, 0x0C, 0xA9, 0x7B, 0x0D, 0xC2, 0x99, 0x15 }; constexpr EncryptedSource<46> source(bytes); // GLOBAL: gl_25302 thread_local EncryptedName<46, 0x79E915E9AF6F55DDULL> name(source); return name.Text(); }()); upgradeButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x7F, 0xC6, 0x23, 0x37, 0x45, 0x49, 0x9A, 0x3C, 0x79, 0x8D, 0x23, 0x01, 0x38, 0x3D, 0x03, 0xB4, 0xD1, 0x0A, 0x8B, 0xAC, 0xEB, 0xF3, 0x0A, 0xB8, 0xE3, 0x1D, 0x82, 0xAF, 0xDA, 0xE2, 0x31, 0x92, 0xE0, 0x0E, 0x91, 0xA2, 0xF2, 0xD8, 0x30, 0x84, 0xCB, 0x47, 0x81, 0xA0, 0xF5, 0x87 }; constexpr EncryptedSource<46> source(bytes); // GLOBAL: gl_25305 thread_local EncryptedName<46, 0xF15F8785CDE369BFULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x75, 0x20, 0x81, 0xDF, 0xD3, 0x33, 0xEA, 0xB4, 0x73, 0x6B, 0x81, 0xE9, 0xAE, 0x47, 0x73, 0x3C, 0xDB, 0xEC, 0x29, 0x44, 0x7D, 0x89, 0x7A, 0x30, 0xE9, 0xFB, 0x20, 0x47, 0x4C, 0x98, 0x41, 0x1A, 0xEA, 0xE8, 0x33, 0x4A, 0x64, 0xA2, 0x5C, 0x1C, 0xD9, 0xEA, 0x22, 0x51, 0x3D, 0x9F, 0x42, 0x09, 0xB5 }; constexpr EncryptedSource<49> source(bytes); // GLOBAL: gl_25304 thread_local EncryptedName<49, 0x792FFD1325418FB5ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xF3, 0xCC, 0x95, 0x0B, 0xE9, 0xFB, 0x16, 0x84, 0xF5, 0x87, 0x95, 0x3D, 0x94, 0x8F, 0x8F, 0x0C, 0x5D, 0x00, 0x3D, 0x90, 0x47, 0x41, 0x86, 0x00, 0x6F, 0x17, 0x34, 0x93, 0x76, 0x50, 0xBD, 0x2A, 0x6C, 0x04, 0x27, 0x9E, 0x5E, 0x6A, 0xBC, 0x3C, 0x47, 0x4D, 0x37, 0x9C, 0x59, 0x35 }; constexpr EncryptedSource<46> source(bytes); // GLOBAL: gl_25303 thread_local EncryptedName<46, 0x49D33529F1556333ULL> name(source); return name.Text(); }()), disabled); } this->tab->AddChild(upgradeButton); CUITabButton* resetButton = new CUITabButton; resetButton->SetSize(65, 22); resetButton->Move(178, 0); resetButton->disabled = 0; resetButton->Invalidate(); { resetButton->SetImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0xC1, 0xDA, 0x3D, 0x23, 0xEF, 0x73, 0x6A, 0x7A, 0xC7, 0x91, 0x3D, 0x15, 0x92, 0x07, 0xF3, 0xF2, 0x6F, 0x16, 0x95, 0xB8, 0x41, 0xC9, 0xFA, 0xFE, 0x5D, 0x01, 0x9C, 0xBB, 0x70, 0xD8, 0xC1, 0xD4, 0x5E, 0x07, 0x98, 0xAA, 0x4A, 0xC9, 0xF0, 0xD8, 0x74, 0x01, 0xD3, 0xBB, 0x42, 0xCD, 0xAF }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25309 thread_local EncryptedName<47, 0xB7AFBD2FD9FD7501ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x25, 0xD4, 0xF3, 0xD3, 0x8D, 0xAB, 0xE8, 0xD4, 0x23, 0x9F, 0xF3, 0xE5, 0xF0, 0xDF, 0x71, 0x5C, 0x8B, 0x18, 0x5B, 0x48, 0x23, 0x11, 0x78, 0x50, 0xB9, 0x0F, 0x52, 0x4B, 0x12, 0x00, 0x43, 0x7A, 0xBA, 0x09, 0x56, 0x5A, 0x28, 0x11, 0x72, 0x6A, 0x80, 0x17, 0x56, 0x4A, 0x39, 0x4B, 0x4F, 0x74, 0x95, 0x7B }; constexpr EncryptedSource<50> source(bytes); // GLOBAL: gl_25308 thread_local EncryptedName<50, 0x192D654D29337BE5ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x23, 0x7A, 0x93, 0x0D, 0x65, 0xC9, 0x26, 0x7E, 0x25, 0x31, 0x93, 0x3B, 0x18, 0xBD, 0xBF, 0xF6, 0x8D, 0xB6, 0x3B, 0x96, 0xCB, 0x73, 0xB6, 0xFA, 0xBF, 0xA1, 0x32, 0x95, 0xFA, 0x62, 0x8D, 0xD0, 0xBC, 0xA7, 0x36, 0x84, 0xC0, 0x73, 0xBC, 0xDC, 0x96, 0xA1, 0x7D, 0x95, 0xC8, 0x77, 0xE3 }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25307 thread_local EncryptedName<47, 0xB3E307A5F753D5E3ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xEB, 0x78, 0x89, 0xD5, 0xCF, 0x1F, 0xE6, 0xC6, 0xED, 0x33, 0x89, 0xE3, 0xB2, 0x6B, 0x7F, 0x4E, 0x45, 0xB4, 0x21, 0x4E, 0x61, 0xA5, 0x76, 0x42, 0x77, 0xA3, 0x28, 0x4D, 0x50, 0xB4, 0x4D, 0x68, 0x74, 0xA5, 0x2C, 0x5C, 0x6A, 0xA5, 0x7C, 0x64, 0x5E, 0xA3, 0x67, 0x4D, 0x62, 0xA1, 0x23 }; constexpr EncryptedSource<47> source(bytes); // GLOBAL: gl_25306 thread_local EncryptedName<47, 0x0B23D10F2F49D72BULL> name(source); return name.Text(); }())); } this->tab->AddChild(resetButton); this->normalPage = new EnchantUI::CUINormal; this->normalPage->SetSize(470, 377); this->normalPage->Move(220, 40); this->AddChild(this->normalPage); { this->normalPage->firstPage->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x0F, 0x74, 0x11, 0xEF, 0x59, 0xE1, 0xAA, 0xDE, 0x09, 0x3F, 0x11, 0xD9, 0x24, 0x95, 0x33, 0x56, 0xA1, 0xB8, 0xB9, 0x74, 0xF7, 0x5B, 0x3A, 0x5A, 0x93, 0xB9, 0xB6, 0x4A, 0xEA, 0x5A, 0x0D, 0x63, 0xAE, 0xBC, 0xB4, 0x57, 0xB7, 0x4D, 0x02, 0x63, 0xCF }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25310 thread_local EncryptedName<41, 0x136F2F9915D1DBCFULL> name(source); return name.Text(); }())); } { this->normalPage->secondPage->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x91, 0x02, 0x3D, 0xD1, 0x8F, 0xFD, 0x1A, 0xA6, 0x97, 0x49, 0x3D, 0xE7, 0xF2, 0x89, 0x83, 0x2E, 0x3F, 0xCE, 0x95, 0x4A, 0x21, 0x47, 0x8A, 0x22, 0x0D, 0xCF, 0x9A, 0x74, 0x3C, 0x46, 0xBD, 0x1B, 0x30, 0xCA, 0x98, 0x72, 0x61, 0x51, 0xB2, 0x1B, 0x51 }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25311 thread_local EncryptedName<41, 0x6BDF334F2BFDAD51ULL> name(source); return name.Text(); }())); } this->upgradePage = new EnchantUI::CUIUpgrade; this->upgradePage->SetSize(470, 377); this->upgradePage->Move(220, 40); this->AddChild(this->upgradePage); { this->upgradePage->firstPage->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x81, 0x92, 0x97, 0x8F, 0xF9, 0x51, 0x88, 0xAA, 0x87, 0xD9, 0x97, 0xB9, 0x84, 0x25, 0x11, 0x22, 0x2F, 0x5E, 0x3F, 0x14, 0x57, 0xEB, 0x18, 0x2E, 0x1D, 0x5F, 0x30, 0x2A, 0x4A, 0xEA, 0x2F, 0x17, 0x20, 0x5A, 0x32, 0x37, 0x17, 0xFD, 0x20, 0x17, 0x41 }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25312 thread_local EncryptedName<41, 0x674D9F3975573D41ULL> name(source); return name.Text(); }())); } { this->upgradePage->secondPage->background->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0xFD, 0xEE, 0x4B, 0x33, 0x39, 0xD5, 0x00, 0x60, 0xFB, 0xA5, 0x4B, 0x05, 0x44, 0xA1, 0x99, 0xE8, 0x53, 0x22, 0xE3, 0xA8, 0x97, 0x6F, 0x90, 0xE4, 0x61, 0x23, 0xEC, 0x96, 0x8A, 0x6E, 0xA7, 0xDD, 0x5C, 0x26, 0xEE, 0x90, 0xD7, 0x79, 0xA8, 0xDD, 0x3D }; constexpr EncryptedSource<41> source(bytes); // GLOBAL: gl_25313 thread_local EncryptedName<41, 0xADC51BF9C98B413DULL> name(source); return name.Text(); }())); } this->resetPage = new EnchantUI::CUIReset; this->resetPage->SetSize(470, 377); this->resetPage->Move(220, 40); this->AddChild(this->resetPage); this->textViewer = new CUITextViewer; this->textViewer->SetSize(675, 47); this->textViewer->Move(10, 421); this->textViewer->SetTextOffset(0, 0); { this->textViewer->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x16, 0x80, 0xA3, 0x20, 0x92, 0x17}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25314 thread_local EncryptedName<6, 0xDF8117FF49CFF551ULL> name(source); return name.Text(); }())); } this->textViewer->SetFontHeight(12); this->textViewer->SetBold(1); this->textViewer->SetTextColor(0x503CE6); this->textViewer->SetOutline(0, 0xFFFFFF); this->textViewer->SetLineSpacing(2); this->textViewer->SetBackgroundColor(0xFFFF00FF); this->textViewer->SetPadding(11, 3, 3, 5); this->textViewer->SetScrollBarSize(13, 47); this->textViewer->SetScrollStep(13); { this->textViewer->SetScrollBarButtonImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x89, 0xC2, 0xBF, 0x19, 0x07, 0xCF, 0x8C, 0xDC, 0x8F, 0x89, 0xBF, 0x2F, 0x7A, 0xBB, 0x15, 0x62, 0x2A, 0x1F, 0x10, 0x8F, 0xAB, 0x31, 0x3C, 0x61, 0x67, 0x0F, 0x12, 0x93, 0xC7 }; constexpr EncryptedSource<29> source(bytes); // GLOBAL: gl_25316 thread_local EncryptedName<29, 0x114901C7E37F6D49ULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0xB1, 0x2C, 0xAB, 0xF1, 0xD1, 0xC1, 0x98, 0xB0, 0xB7, 0x67, 0xAB, 0xC7, 0xAC, 0xB5, 0x01, 0x0E, 0x12, 0xF1, 0x04, 0x67, 0x7D, 0x3F, 0x39, 0x12, 0x06, 0xED, 0x45, 0x69, 0x7C, 0x7F, 0x5D }; constexpr EncryptedSource<31> source(bytes); // GLOBAL: gl_25315 thread_local EncryptedName<31, 0x7D5D0F110B6B8371ULL> name(source); return name.Text(); }())); } { this->textViewer->SetScrollBarBackground(std::string([]() { constexpr std::uint8_t bytes[] = { 0x99, 0x28, 0xC3, 0x87, 0x95, 0x05, 0xE2, 0x16, 0x9F, 0x63, 0xC3, 0xB1, 0xE8, 0x71, 0x7B, 0xA8, 0x3A, 0xF5, 0x6C, 0x11, 0x39, 0xFB, 0x4A, 0xB2, 0x3D, 0xA9, 0x61, 0x10, 0x25, 0xCB }; constexpr EncryptedSource<30> source(bytes); // GLOBAL: gl_25317 thread_local EncryptedName<30, 0xDB27CB557D038759ULL> name(source); return name.Text(); }())); } { this->textViewer->SetScrollBarThumbImages(std::string([]() { constexpr std::uint8_t bytes[] = { 0x3F, 0x4C, 0x9D, 0xF9, 0x67, 0x61, 0x66, 0xF2, 0x39, 0x07, 0x9D, 0xCF, 0x1A, 0x15, 0xFF, 0x4C, 0x9C, 0x91, 0x32, 0x6F, 0xCB, 0x9F, 0xC1, 0x5E, 0x8D, 0xBC, 0x28, 0x73, 0x89, 0xCD, 0xCE, 0x4F, 0xFF }; constexpr EncryptedSource<33> source(bytes); // GLOBAL: gl_25320 thread_local EncryptedName<33, 0x3FA3AFA7035DE3FFULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x2F, 0x82, 0x97, 0xF7, 0x05, 0x1F, 0x26, 0x4A, 0x29, 0xC9, 0x97, 0xC1, 0x78, 0x6B, 0xBF, 0xF4, 0x8C, 0x5F, 0x38, 0x61, 0xA9, 0xE1, 0x81, 0xE6, 0x9D, 0x72, 0x3A, 0x64, 0xA1, 0xFF, 0x81, 0xEA, 0x9F, 0x2D }; constexpr EncryptedSource<34> source(bytes); // GLOBAL: gl_25319 thread_local EncryptedName<34, 0x87E3D1C50D572DEFULL> name(source); return name.Text(); }()), std::string([]() { constexpr std::uint8_t bytes[] = { 0x4D, 0x12, 0x7B, 0x99, 0x77, 0xF7, 0x7E, 0x9C, 0x4B, 0x59, 0x7B, 0xAF, 0x0A, 0x83, 0xE7, 0x22, 0xEE, 0xCF, 0xD4, 0x0F, 0xDB, 0x09, 0xD9, 0x30, 0xFF, 0xE2, 0xDF, 0x0C, 0xC0, 0x57, 0x95, 0x33, 0xE0, 0xCD, 0xBB }; constexpr EncryptedSource<35> source(bytes); // GLOBAL: gl_25318 thread_local EncryptedName<35, 0x51BB39B763BBBD8DULL> name(source); return name.Text(); }())); } this->AddChild(this->textViewer); normalButton->page = this->normalPage; upgradeButton->page = this->upgradePage; resetButton->page = this->resetPage; this->tab->Select(normalButton); } void CUIEnchantUI::OnClickClose() { g_windowMgr.CloseWindow(WID_ENCHANTUI); }