[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:
mmcgarvey
2022-01-02 22:07:57 -05:00
committed by GitHub
parent 645251992d
commit 220d8497dd
4 changed files with 24 additions and 3 deletions
+4
View File
@@ -6649,3 +6649,7 @@ void Mob::SetBucket(std::string bucket_name, std::string bucket_value, std::stri
std::string full_bucket_name = fmt::format("{}-{}", GetBucketKey(), bucket_name);
DataBucket::SetData(full_bucket_name, bucket_value, expiration);
}
bool Mob::IsValidXTarget() const {
return (GetID() > 0 || !IsCorpse());
}