mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
fix(combatlog): preserve spell ids in spell miss events
This commit is contained in:
parent
23023dc140
commit
3fa495d9ea
1 changed files with 3 additions and 3 deletions
|
|
@ -2656,7 +2656,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
};
|
};
|
||||||
// spellId prefix present in all expansions
|
// spellId prefix present in all expansions
|
||||||
if (packet.getSize() - packet.getReadPos() < 4) break;
|
if (packet.getSize() - packet.getReadPos() < 4) break;
|
||||||
/*uint32_t spellId =*/ packet.readUInt32();
|
uint32_t spellId = packet.readUInt32();
|
||||||
if (packet.getSize() - packet.getReadPos() < (spellMissTbcLike ? 8 : 1)) break;
|
if (packet.getSize() - packet.getReadPos() < (spellMissTbcLike ? 8 : 1)) break;
|
||||||
uint64_t casterGuid = readSpellMissGuid();
|
uint64_t casterGuid = readSpellMissGuid();
|
||||||
if (packet.getSize() - packet.getReadPos() < 5) break;
|
if (packet.getSize() - packet.getReadPos() < 5) break;
|
||||||
|
|
@ -2692,10 +2692,10 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
CombatTextEntry::Type ct = (missInfo < 9) ? missTypes[missInfo] : CombatTextEntry::MISS;
|
CombatTextEntry::Type ct = (missInfo < 9) ? missTypes[missInfo] : CombatTextEntry::MISS;
|
||||||
if (casterGuid == playerGuid) {
|
if (casterGuid == playerGuid) {
|
||||||
// We cast a spell and it missed the target
|
// We cast a spell and it missed the target
|
||||||
addCombatText(ct, 0, 0, true, 0, casterGuid, victimGuid);
|
addCombatText(ct, 0, spellId, true, 0, casterGuid, victimGuid);
|
||||||
} else if (victimGuid == playerGuid) {
|
} else if (victimGuid == playerGuid) {
|
||||||
// Enemy spell missed us (we dodged/parried/blocked/resisted/etc.)
|
// Enemy spell missed us (we dodged/parried/blocked/resisted/etc.)
|
||||||
addCombatText(ct, 0, 0, false, 0, casterGuid, victimGuid);
|
addCombatText(ct, 0, spellId, false, 0, casterGuid, victimGuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue