mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
fix: clean up combat text, cast bars, and aura cache on entity destroy
When SMSG_DESTROY_OBJECT removes an entity, now also purge combat text entries targeting that GUID (prevents floating damage numbers on despawned mobs), erase unit cast state (prevents stale cast bars), and clear cached auras (prevents stale buff/debuff data for destroyed units).
This commit is contained in:
parent
0f480f5ada
commit
8761ad9301
1 changed files with 14 additions and 1 deletions
|
|
@ -13018,8 +13018,21 @@ void GameHandler::handleDestroyObject(network::Packet& packet) {
|
|||
// Clean up quest giver status
|
||||
npcQuestStatus_.erase(data.guid);
|
||||
|
||||
// Remove combat text entries referencing the destroyed entity so floating
|
||||
// damage numbers don't linger after the source/target despawns.
|
||||
combatText.erase(
|
||||
std::remove_if(combatText.begin(), combatText.end(),
|
||||
[&data](const CombatTextEntry& e) {
|
||||
return e.dstGuid == data.guid;
|
||||
}),
|
||||
combatText.end());
|
||||
|
||||
// Clean up unit cast state (cast bar) for the destroyed unit
|
||||
unitCastStates_.erase(data.guid);
|
||||
// Clean up cached auras
|
||||
unitAurasCache_.erase(data.guid);
|
||||
|
||||
tabCycleStale = true;
|
||||
// Entity count logging disabled
|
||||
}
|
||||
|
||||
void GameHandler::sendChatMessage(ChatType type, const std::string& message, const std::string& target) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue