- Port hit-order Lua stand-ins (unit tokens, tooltips, combat log filters and current entry, bags/containers, quest POI, minimap, titles, world states, trade, group roles, runes, mirror timers, saved-variable registration, Quit) - LoadAddOn: real add-on loading (Blizzard_CombatLog etc. now load) - CombatLogEntry::PushEvent: COMBAT_LOG_EVENT arguments - World map chain: SetMapToCurrentZone, SetMap, GetWorldPosition, landmarks, overlays, highlight, zones, dungeon levels, player position - OpenArchives: locale index was off by one (enUS read the koKR DBC slot, leaving zone/map names empty) - Zone/area sound chain, invisible units (spline mode read size), raid/bag crash fixes, stand-in console, waystone icon for all executables - Coding-rule cleanups: statics/includes at the top, event enums, Lua _Scripts layout Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#include "LootRoll.h"
|
|
#include "Engine/Source/FrameScript/FrameScript.h"
|
|
#include "WoW/Source/Ui/Types.h"
|
|
|
|
// STATIC: 0x00ADA7B4
|
|
TSExplicitList<PendingLootRoll, offsetof(PendingLootRoll, m_link)> s_pendingLootRolls;
|
|
|
|
// STATIC: 0x00CA0550
|
|
WOWGUID s_masterLootCandidates[40];
|
|
|
|
// STATIC: 0x00CA0694
|
|
uint32_t s_numShownLootRolls;
|
|
|
|
// VERIFY: 291d5e6d auto
|
|
// OFFSET: 0x006FA770
|
|
WOWGUID GetMasterLootCandidate(uint32_t index) {
|
|
if (index >= sizeof(s_masterLootCandidates) / sizeof(s_masterLootCandidates[0])) {
|
|
return WOWGUID();
|
|
}
|
|
|
|
return s_masterLootCandidates[index];
|
|
}
|
|
|
|
// VERIFY: d35c8b17 manual
|
|
// OFFSET: 0x006FB150
|
|
PendingLootRoll* FindRoll(int32_t id) {
|
|
for (PendingLootRoll* roll = s_pendingLootRolls.Head(); roll; roll = roll->Next()) {
|
|
if (roll->m_id == id) {
|
|
return roll;
|
|
}
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
// VERIFY: e08c1b05 manual
|
|
// OFFSET: 0x006FB180
|
|
void LootRollShowPending() {
|
|
if (s_numShownLootRolls >= 4) {
|
|
return;
|
|
}
|
|
|
|
for (PendingLootRoll* roll = s_pendingLootRolls.Head(); roll; roll = roll->Next()) {
|
|
if (!roll->m_showPending) {
|
|
continue;
|
|
}
|
|
|
|
s_numShownLootRolls++;
|
|
roll->m_showPending = 0;
|
|
FrameScript_SignalEvent(SCRIPT_EVENT_START_LOOT_ROLL, "%d%d", roll->m_id, roll->m_rollTime);
|
|
|
|
if (s_numShownLootRolls >= 4) {
|
|
break;
|
|
}
|
|
}
|
|
}
|