mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-13 04:52:25 +00:00
Pet target in UF+
I think older clients might have something like this that sets some spawn data, but these are the only clients that display something
This commit is contained in:
parent
03c006bef5
commit
7011395d4c
@ -348,6 +348,7 @@ N(OP_OpenTributeMaster),
|
|||||||
N(OP_PDeletePetition),
|
N(OP_PDeletePetition),
|
||||||
N(OP_PetBuffWindow),
|
N(OP_PetBuffWindow),
|
||||||
N(OP_PetCommands),
|
N(OP_PetCommands),
|
||||||
|
N(OP_PetHoTT),
|
||||||
N(OP_Petition),
|
N(OP_Petition),
|
||||||
N(OP_PetitionBug),
|
N(OP_PetitionBug),
|
||||||
N(OP_PetitionCheckIn),
|
N(OP_PetitionCheckIn),
|
||||||
|
|||||||
@ -194,6 +194,7 @@ OP_Consent=0x400e
|
|||||||
OP_ConsentDeny=0x34c1
|
OP_ConsentDeny=0x34c1
|
||||||
OP_AutoFire=0x314e
|
OP_AutoFire=0x314e
|
||||||
OP_PetCommands=0x0093
|
OP_PetCommands=0x0093
|
||||||
|
OP_PetHoTT=0x0df4
|
||||||
OP_DeleteSpell=0x305c
|
OP_DeleteSpell=0x305c
|
||||||
OP_Surname=0x1a87
|
OP_Surname=0x1a87
|
||||||
OP_ClearSurname=0x17b6
|
OP_ClearSurname=0x17b6
|
||||||
|
|||||||
@ -193,6 +193,7 @@ OP_Consent=0x1fd1
|
|||||||
OP_ConsentDeny=0x7a45
|
OP_ConsentDeny=0x7a45
|
||||||
OP_AutoFire=0x241e
|
OP_AutoFire=0x241e
|
||||||
OP_PetCommands=0x0159
|
OP_PetCommands=0x0159
|
||||||
|
OP_PetHoTT=0x794a
|
||||||
OP_DeleteSpell=0x3358
|
OP_DeleteSpell=0x3358
|
||||||
OP_Surname=0x0423
|
OP_Surname=0x0423
|
||||||
OP_ClearSurname=0x3fb0
|
OP_ClearSurname=0x3fb0
|
||||||
|
|||||||
@ -197,6 +197,7 @@ OP_Consent=0x6bb9 # C
|
|||||||
OP_ConsentDeny=0x4cd1 # C
|
OP_ConsentDeny=0x4cd1 # C
|
||||||
OP_AutoFire=0x5db5 # C
|
OP_AutoFire=0x5db5 # C
|
||||||
OP_PetCommands=0x7706 # C
|
OP_PetCommands=0x7706 # C
|
||||||
|
OP_PetHoTT=0x2528
|
||||||
OP_DeleteSpell=0x0698 # C
|
OP_DeleteSpell=0x0698 # C
|
||||||
OP_Surname=0x44ae # C
|
OP_Surname=0x44ae # C
|
||||||
OP_ClearSurname=0x6705 # C
|
OP_ClearSurname=0x6705 # C
|
||||||
|
|||||||
@ -457,6 +457,22 @@ Pet::Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 po
|
|||||||
// Class should use npc constructor to set light properties
|
// Class should use npc constructor to set light properties
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Pet::SetTarget(Mob *mob)
|
||||||
|
{
|
||||||
|
if (mob == GetTarget())
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto owner = GetOwner();
|
||||||
|
if (owner && owner->IsClient() && owner->CastToClient()->GetClientVersionBit() & BIT_UFAndLater) {
|
||||||
|
auto app = new EQApplicationPacket(OP_PetHoTT, sizeof(ClientTarget_Struct));
|
||||||
|
auto ct = (ClientTarget_Struct *)app->pBuffer;
|
||||||
|
ct->new_target = mob ? mob->GetID() : 0;
|
||||||
|
owner->CastToClient()->QueuePacket(app);
|
||||||
|
safe_delete(app);
|
||||||
|
}
|
||||||
|
NPC::SetTarget(mob);
|
||||||
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::GetPetEntry(const char *pet_type, PetRecord *into) {
|
bool ZoneDatabase::GetPetEntry(const char *pet_type, PetRecord *into) {
|
||||||
return GetPoweredPetEntry(pet_type, 0, into);
|
return GetPoweredPetEntry(pet_type, 0, into);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,7 @@ struct NPCType;
|
|||||||
class Pet : public NPC {
|
class Pet : public NPC {
|
||||||
public:
|
public:
|
||||||
Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 power);
|
Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 power);
|
||||||
|
virtual void SetTarget(Mob *mob);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user