mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: pass actual GUIDs for environmental damage and energize combat log entries
SMSG_ENVIRONMENTALDAMAGELOG and SMSG_ENVIRONMENTAL_DAMAGE_LOG now pass dstGuid=victimGuid with srcGuid=0 (no caster for env damage), ensuring the combat log shows an empty source name rather than the player's current target. SMSG_SPELLENERGIZERLOG now passes casterGuid/victimGuid so the log correctly attributes mana/energy restoration to the actual caster rather than the player's current target.
This commit is contained in:
parent
3bdd3f1d3f
commit
0982f557d2
1 changed files with 9 additions and 7 deletions
|
|
@ -2711,12 +2711,13 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
uint32_t absorb = packet.readUInt32();
|
uint32_t absorb = packet.readUInt32();
|
||||||
uint32_t resist = packet.readUInt32();
|
uint32_t resist = packet.readUInt32();
|
||||||
if (victimGuid == playerGuid) {
|
if (victimGuid == playerGuid) {
|
||||||
|
// Environmental damage: no caster GUID, victim = player
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(damage), 0, false);
|
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(damage), 0, false, 0, 0, victimGuid);
|
||||||
if (absorb > 0)
|
if (absorb > 0)
|
||||||
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(absorb), 0, false);
|
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(absorb), 0, false, 0, 0, victimGuid);
|
||||||
if (resist > 0)
|
if (resist > 0)
|
||||||
addCombatText(CombatTextEntry::RESIST, static_cast<int32_t>(resist), 0, false);
|
addCombatText(CombatTextEntry::RESIST, static_cast<int32_t>(resist), 0, false, 0, 0, victimGuid);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -3988,7 +3989,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
bool isPlayerVictim = (victimGuid == playerGuid);
|
bool isPlayerVictim = (victimGuid == playerGuid);
|
||||||
bool isPlayerCaster = (casterGuid == playerGuid);
|
bool isPlayerCaster = (casterGuid == playerGuid);
|
||||||
if ((isPlayerVictim || isPlayerCaster) && amount > 0)
|
if ((isPlayerVictim || isPlayerCaster) && amount > 0)
|
||||||
addCombatText(CombatTextEntry::ENERGIZE, amount, spellId, isPlayerCaster, energizePowerType);
|
addCombatText(CombatTextEntry::ENERGIZE, amount, spellId, isPlayerCaster, energizePowerType, casterGuid, victimGuid);
|
||||||
packet.setReadPos(packet.getSize());
|
packet.setReadPos(packet.getSize());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -4002,12 +4003,13 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
uint32_t envAbs = packet.readUInt32();
|
uint32_t envAbs = packet.readUInt32();
|
||||||
uint32_t envRes = packet.readUInt32();
|
uint32_t envRes = packet.readUInt32();
|
||||||
if (victimGuid == playerGuid) {
|
if (victimGuid == playerGuid) {
|
||||||
|
// Environmental damage: no caster GUID, victim = player
|
||||||
if (dmg > 0)
|
if (dmg > 0)
|
||||||
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(dmg), 0, false);
|
addCombatText(CombatTextEntry::ENVIRONMENTAL, static_cast<int32_t>(dmg), 0, false, 0, 0, victimGuid);
|
||||||
if (envAbs > 0)
|
if (envAbs > 0)
|
||||||
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(envAbs), 0, false);
|
addCombatText(CombatTextEntry::ABSORB, static_cast<int32_t>(envAbs), 0, false, 0, 0, victimGuid);
|
||||||
if (envRes > 0)
|
if (envRes > 0)
|
||||||
addCombatText(CombatTextEntry::RESIST, static_cast<int32_t>(envRes), 0, false);
|
addCombatText(CombatTextEntry::RESIST, static_cast<int32_t>(envRes), 0, false, 0, 0, victimGuid);
|
||||||
}
|
}
|
||||||
packet.setReadPos(packet.getSize());
|
packet.setReadPos(packet.getSize());
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue