[Targeting] Revert #3383 (#3405)

This commit is contained in:
Paul Coene 2023-06-13 16:48:35 -04:00 committed by GitHub
parent 774aa99b29
commit 81b07a5aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14420,6 +14420,11 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
return; return;
} }
if (GetTarget())
{
GetTarget()->IsTargeted(-1);
}
// Locate and cache new target // Locate and cache new target
ClientTarget_Struct* ct = (ClientTarget_Struct*)app->pBuffer; ClientTarget_Struct* ct = (ClientTarget_Struct*)app->pBuffer;
pClientSideTarget = ct->new_target; pClientSideTarget = ct->new_target;
@ -14428,11 +14433,6 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
Mob *nt = entity_list.GetMob(ct->new_target); Mob *nt = entity_list.GetMob(ct->new_target);
if (nt) if (nt)
{ {
if (GetTarget())
{
GetTarget()->IsTargeted(-1);
}
SetTarget(nt); SetTarget(nt);
bool inspect_buffs = false; bool inspect_buffs = false;
// rank 1 gives you ability to see NPC buffs in target window (SoD+) // rank 1 gives you ability to see NPC buffs in target window (SoD+)
@ -14461,7 +14461,21 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
} }
else else
{ {
MessageString(Chat::Red, DONT_SEE_TARGET); SetTarget(nullptr);
SetHoTT(0);
UpdateXTargetType(TargetsTarget, nullptr);
Group *g = GetGroup();
if (g && g->HasRole(this, RoleAssist))
g->SetGroupAssistTarget(0);
if (g && g->HasRole(this, RoleTank))
g->SetGroupTankTarget(0);
if (g && g->HasRole(this, RolePuller))
g->SetGroupPullerTarget(0);
return; return;
} }
} }