[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
4 changed files with 3 additions and 13 deletions
+3 -4
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;
}