rodecomp/Source/UI/Shortcuts/ShortcutActivation.cpp
ragnarok-clanker 65f1505b15 Maintenance: Two evidenced fixes the regression gate refuses on noise. (1) fn_12616 @0x91C540 is a UIShortCutWnd member: mov esi,ecx;
Batch #17278 by ragnarok-clanker: forced by an admin (1 lower score(s), 9 changed function(s)); checked with 60 compiled unit(s), including every includer of Source/UI/Login/UINewSelectCharWnd.h, Source/UI/Shortcuts/ShortcutGrid.h, Source/UI/Shortcuts/UIShortCutWnd.h.
2026-11-11 20:15:40 +00:00

30 lines
993 B
C++

#include "UI/Window/UIEnums.h"
#include "Client/Session/Session.h"
#include "Contents/Skills/AutomaticSkills.h"
#include "UI/Shortcuts/ShortcutActivation.h"
#include "UI/Shortcuts/UIShortCutWnd.h"
#include "UI/Window/UIWindow.h"
// OFFSET: 0x00930900
// FUNCTION: fn_12689
void UIShortCutWnd::OnLBtnDblClk(int x, int y) {
const int column = this->HitTestSlot(x, y);
if (column == -1) {
return;
}
const unsigned index = 9u * g_session.m_hotkeyPage + static_cast<unsigned>(column);
const int limit = 9 * this->m_grid.rows;
if (limit <= static_cast<int>(index)) {
return;
}
const NormalItemSlot& slot = *this->m_slots[index];
if (slot.enabled != 0 && g_session.m_automaticSkills.Contains(static_cast<std::uint16_t>(slot.itemId))) {
g_session.SetOption(g_session.m_automaticSkills.CancelOption(slot.itemId), 1, 0);
} else {
g_session.m_automaticSkills.DisableAll();
}
this->SendMsg(nullptr, UM_USE_SHORTEN_ITEM, column, g_session.m_hotkeyPage, 0, 0);
}