mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[XTarget] Disallow Corpses in XTarget Auto Slots (#1881)
* [XTarget] Disallow Corpses in XTarget Auto Slots Why: There exists an odd state where corpses will fill up your XTarget window. This is reproducable using a combination of a pet to kill a mob and timely feign death to wipe the owner's aggro. What: Added an IsCorpse check to IsXTarget. Added a block to mark corpse XTargets as dirty to ProcessXTargetAutoHaters * fixup! [XTarget] Disallow Corpses in XTarget Auto Slots * fixup! [XTarget] Disallow Corpses in XTarget Auto Slots * [XTarget] Disallow Corpses Code Cleanup Added some safety, performance, and code readability changes per PR request.
This commit is contained in:
@@ -1799,6 +1799,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQ::skills::Skill
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
hate_list.RemoveEntFromHateList(this);
|
||||
RemoveAutoXTargets();
|
||||
ProcessXTargetAutoHaters();
|
||||
|
||||
//remove ourself from all proximities
|
||||
ClearAllProximities();
|
||||
@@ -2569,6 +2570,10 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQ::skills::SkillTy
|
||||
}
|
||||
|
||||
entity_list.RemoveFromAutoXTargets(this);
|
||||
|
||||
if (killer->GetUltimateOwner() && killer->GetUltimateOwner()->IsClient()) {
|
||||
killer->GetUltimateOwner()->CastToClient()->ProcessXTargetAutoHaters();
|
||||
}
|
||||
uint16 emoteid = this->GetEmoteID();
|
||||
auto corpse = new Corpse(this, &itemlist, GetNPCTypeID(), &NPCTypedata,
|
||||
level > 54 ? RuleI(NPC, MajorNPCCorpseDecayTimeMS)
|
||||
|
||||
Reference in New Issue
Block a user