mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-17 09:42:25 +00:00
Fix /pet leader
This commit is contained in:
parent
cdd0b2de00
commit
24b396e516
@ -9960,22 +9960,18 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
Mob* mypet = this->GetPet();
|
||||
Mob *target = entity_list.GetMob(pet->target);
|
||||
|
||||
if (!mypet || pet->command == PET_LEADER)
|
||||
{
|
||||
if (pet->command == PET_LEADER)
|
||||
{
|
||||
if (mypet && (!GetTarget() || GetTarget() == mypet))
|
||||
{
|
||||
if (!mypet || pet->command == PET_LEADER) {
|
||||
if (pet->command == PET_LEADER) {
|
||||
// we either send the ID of an NPC we're interested in or no ID for our own pet
|
||||
if (target) {
|
||||
auto owner = target->GetOwner();
|
||||
if (owner)
|
||||
target->Say_StringID(PET_LEADERIS, owner->GetCleanName());
|
||||
else
|
||||
target->Say_StringID(I_FOLLOW_NOONE);
|
||||
} else if (mypet) {
|
||||
mypet->Say_StringID(PET_LEADERIS, GetName());
|
||||
}
|
||||
else if ((mypet = GetTarget()))
|
||||
{
|
||||
Mob *Owner = mypet->GetOwner();
|
||||
if (Owner)
|
||||
mypet->Say_StringID(PET_LEADERIS, Owner->GetCleanName());
|
||||
else if (mypet->IsNPC())
|
||||
mypet->Say_StringID(I_FOLLOW_NOONE);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user