diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index d32353e33..5134a5288 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -14419,11 +14419,6 @@ 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; @@ -14432,6 +14427,11 @@ 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+) @@ -14460,21 +14460,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) } else { - 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); - + MessageString(Chat::Red, DONT_SEE_TARGET); return; } } diff --git a/zone/string_ids.h b/zone/string_ids.h index 0f7de013e..08a7a9a72 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -100,6 +100,7 @@ #define DUP_LORE 290 //Duplicate lore items are not allowed. #define TGB_ON 293 //Target other group buff is *ON*. #define TGB_OFF 294 //Target other group buff is *OFF*. +#define DONT_SEE_TARGET 303 //I don't see anyone by that name around here... #define DISARMED_TRAP 305 //You have disarmed the trap. #define LDON_SENSE_TRAP1 306 //You do not Sense any traps. #define TRADESKILL_NOCOMBINE 334 //You cannot combine these items in this container type!