[XTarget] Revert All XTarget Corpse Changes (#1944)

This commit is contained in:
mmcgarvey 2022-01-23 21:18:38 -05:00 committed by GitHub
parent e99c8dafc5
commit e4f2aec11e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 13 deletions

View File

@ -2583,9 +2583,6 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQ::skills::SkillTy
entity_list.RemoveFromAutoXTargets(this);
if (killer != nullptr && 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)

View File

@ -7173,7 +7173,7 @@ void Client::OpenLFGuildWindow()
bool Client::IsXTarget(const Mob *m) const
{
if(!XTargettingAvailable() || !m || !m->IsValidXTarget())
if(!XTargettingAvailable() || !m || (m->GetID() == 0))
return false;
for(int i = 0; i < GetMaxXTargets(); ++i)
@ -7216,10 +7216,10 @@ void Client::UpdateClientXTarget(Client *c)
// IT IS NOT SAFE TO CALL THIS IF IT'S NOT INITIAL AGGRO
void Client::AddAutoXTarget(Mob *m, bool send)
{
m_activeautohatermgr->increment_count(m);
if (!XTargettingAvailable() || !XTargetAutoAddHaters || IsXTarget(m))
return;
m_activeautohatermgr->increment_count(m);
for(int i = 0; i < GetMaxXTargets(); ++i)
{
@ -7431,7 +7431,6 @@ void Client::ProcessXTargetAutoHaters()
if (XTargets[i].ID != 0 && !GetXTargetAutoMgr()->contains_mob(XTargets[i].ID)) {
XTargets[i].ID = 0;
XTargets[i].Name[0] = 0;
XTargets[i].dirty = true;
}

View File

@ -6650,7 +6650,3 @@ 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());
}

View File

@ -1307,8 +1307,6 @@ public:
std::string GetBucketRemaining(std::string bucket_name);
void SetBucket(std::string bucket_name, std::string bucket_value, std::string expiration = "");
bool IsValidXTarget() const;
#ifdef BOTS
// Bots HealRotation methods
bool IsHealRotationTarget() { return (m_target_of_heal_rotation.use_count() && m_target_of_heal_rotation.get()); }