diff --git a/Source/Client/SessionState.cpp b/Source/Client/SessionState.cpp index f096ae12..d9a1260d 100644 --- a/Source/Client/SessionState.cpp +++ b/Source/Client/SessionState.cpp @@ -194,6 +194,32 @@ bool CSession::IsThirdJobOrHigher(int job) { } // OFFSET: 0x00E2ECD0 +// FUNCTION: fn_24150 +bool CSession::EquipItem61B8(const ITEM_INFO& item) { + const EquipSlots slots = g_session.GetEquipSlots(static_cast(item.unknown_0000[3])); + int order[3]; + order[0] = slots.values[2]; + order[1] = slots.values[1]; + order[2] = slots.values[0]; + if (item.unknown_0000[3] == 0x8000) { + g_session.SetUnknown7EC8(item.unknown_0000[1]); + } + + for (int i = 0; i < 3; ++i) { + const int slot = order[i]; + if (slot == -1 || slot >= 10) { + break; + } + this->unknown_61B8[slot] = item; + this->unknown_61B8[slot].quantity = 1; + } + + if (g_windowMgr.unknown_01E0) { + static_cast(g_windowMgr.unknown_01E0)->NotifyEquipmentChanged(); + } + RefreshItemWindows(&g_windowMgr); + return true; +} // OFFSET: 0x00E3D8A0 // FUNCTION: fn_24192 diff --git a/Source/UI/Window/UINewSkillListWnd.cpp b/Source/UI/Window/UINewSkillListWnd.cpp index e88323a6..f40d77fc 100644 --- a/Source/UI/Window/UINewSkillListWnd.cpp +++ b/Source/UI/Window/UINewSkillListWnd.cpp @@ -120,6 +120,39 @@ void UINewSkillListWnd::Slot35(int delta) { } // OFFSET: 0x009AE730 +// FUNCTION: fn_13800 +void UINewSkillListWnd::sub_9AE730() { + if (*reinterpret_cast(reinterpret_cast(&g_session) + 0xB4) == 0) { + for (const NewSkillListValue& entry : this->m_unknown_02A0) { + const int id = entry.id; + const int value = entry.value; + CSkillInfo* skill = g_session.m_skillBundle.FindGrouped(id); + if (skill != nullptr && skill->available != 0) { + const int next = skill->unknown_0030 + 1; + if (next <= value) { + for (int count = value - next + 1; count != 0; --count) { + g_modeMgr.gameMode->SendMsg(0x43, id, 0, 0, 0); + } + } + } + } + this->m_unknown_02A0.clear(); + } else { + std::list& live = this->SkillList(this->m_tab, true); + std::list& pending = this->SkillList(this->m_tab, false); + auto current = live.begin(); + for (auto it = pending.begin(); it != pending.end(); ++it, ++current) { + if (current->available != 0 && current->id == it->id && current->level < it->level) { + for (int i = 0; i < it->level - current->level; ++i) { + g_modeMgr.gameMode->SendMsg(0x43, current->id, 0, 0, 0); + } + } + } + } + + this->m_locked = 0; + this->LayoutButtons(); +} // OFFSET: 0x009B0370 // FUNCTION: fn_13805