mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix(combatlog): preserve unknown source for environmental entries
This commit is contained in:
parent
ecb56e9a35
commit
5575fc6f28
1 changed files with 4 additions and 1 deletions
|
|
@ -14381,8 +14381,11 @@ void GameHandler::addCombatText(CombatTextEntry::Type type, int32_t amount, uint
|
|||
log.spellId = spellId;
|
||||
log.isPlayerSource = isPlayerSource;
|
||||
log.timestamp = std::time(nullptr);
|
||||
// If the caller provided an explicit destination GUID but left source GUID as 0,
|
||||
// preserve "unknown/no source" (e.g. environmental damage) instead of
|
||||
// backfilling from current target.
|
||||
uint64_t effectiveSrc = (srcGuid != 0) ? srcGuid
|
||||
: (isPlayerSource ? playerGuid : targetGuid);
|
||||
: ((dstGuid != 0) ? 0 : (isPlayerSource ? playerGuid : targetGuid));
|
||||
uint64_t effectiveDst = (dstGuid != 0) ? dstGuid
|
||||
: (isPlayerSource ? targetGuid : playerGuid);
|
||||
log.sourceName = lookupName(effectiveSrc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue