- 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]>
45 lines
2.7 KiB
C++
45 lines
2.7 KiB
C++
#include "PlayerName.h"
|
|
#include "Engine/Source/ConsoleBase/ConsoleVar.h"
|
|
#include "Engine/Source/ConsoleBase/Types.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
|
|
// VERIFY: dc49a19d manual
|
|
// OFFSET: 0x007E60E0
|
|
bool ObjectNameShowCallback(CVar* var, const char* oldValue, const char* value, void* arg) {
|
|
uint32_t mask = s_nameMask;
|
|
|
|
if (SStrToInt(value)) {
|
|
s_nameMask |= static_cast<uint32_t>(reinterpret_cast<uintptr_t>(arg));
|
|
} else {
|
|
s_nameMask &= ~static_cast<uint32_t>(reinterpret_cast<uintptr_t>(arg));
|
|
}
|
|
|
|
if (s_nameMask == mask) {
|
|
return true;
|
|
}
|
|
|
|
for (PLAYERNAMEDESC* desc = s_playerNames.Head(); desc; desc = s_playerNames.Next(desc)) {
|
|
desc->m_flags |= 1;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// VERIFY: b96c6600 auto
|
|
// OFFSET: 0x007E6150
|
|
void PlayerNameRegisterCVars() {
|
|
CVar::Register("UnitNameOwn", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x1), false);
|
|
CVar::Register("UnitNameNPC", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x2), false);
|
|
CVar::Register("UnitNamePlayerGuild", nullptr, 0x10, "1", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x4), false);
|
|
CVar::Register("UnitNamePlayerPVPTitle", nullptr, 0x10, "1", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x8), false);
|
|
CVar::Register("UnitNameEnemyPlayerName", nullptr, 0x10, "1", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x10), false);
|
|
CVar::Register("UnitNameEnemyPetName", nullptr, 0x10, "1", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x20), false);
|
|
CVar::Register("UnitNameEnemyGuardianName", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x1000), false);
|
|
CVar::Register("UnitNameEnemyTotemName", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x40), false);
|
|
CVar::Register("UnitNameFriendlyPlayerName", nullptr, 0x10, "1", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x80), false);
|
|
CVar::Register("UnitNameFriendlyPetName", nullptr, 0x10, "1", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x100), false);
|
|
CVar::Register("UnitNameFriendlyGuardianName", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x2000), false);
|
|
CVar::Register("UnitNameFriendlyTotemName", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x200), false);
|
|
CVar::Register("UnitNameNonCombatCreatureName", nullptr, 0x10, "0", ObjectNameShowCallback, CATEGORY_GAME, false, reinterpret_cast<void*>(0x400), false);
|
|
}
|