diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 25766a0a2..b91afb374 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -14420,6 +14420,11 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) return; } + if (GetTarget()) + { + GetTarget()->IsTargeted(-1); + } + // Locate and cache new target ClientTarget_Struct* ct = (ClientTarget_Struct*)app->pBuffer; pClientSideTarget = ct->new_target; @@ -14428,11 +14433,6 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) Mob *nt = entity_list.GetMob(ct->new_target); if (nt) { - if (GetTarget()) - { - GetTarget()->IsTargeted(-1); - } - SetTarget(nt); bool inspect_buffs = false; // 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 { - 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; } }