mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Clean up SoF+ swarm pet F8 hack
This commit is contained in:
+6
-7
@@ -1854,27 +1854,26 @@ void NPC::PetOnSpawn(NewSpawn_Struct* ns)
|
||||
{
|
||||
swarmOwner = entity_list.GetMobID(GetSwarmOwner());
|
||||
}
|
||||
|
||||
|
||||
if (swarmOwner != nullptr)
|
||||
{
|
||||
if(swarmOwner->IsClient())
|
||||
{
|
||||
SetPetOwnerClient(true); //Simple flag to determine if pet belongs to a client
|
||||
SetAllowBeneficial(1);//Allow temp pets to receive buffs and heals if owner is client.
|
||||
//This is a hack to allow CLIENT swarm pets NOT to be targeted with F8. Warning: Will turn name 'Yellow'!
|
||||
if (RuleB(Pets, SwarmPetNotTargetableWithHotKey))
|
||||
ns->spawn.IsMercenary = 1;
|
||||
//This will allow CLIENT swarm pets NOT to be targeted with F8.
|
||||
ns->spawn.targetable_with_hotkey = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//NPC cast swarm pets should still be targetable with F8.
|
||||
ns->spawn.IsMercenary = 0;
|
||||
ns->spawn.targetable_with_hotkey = 1;
|
||||
}
|
||||
|
||||
SetTempPet(true); //Simple mob flag for checking if temp pet
|
||||
swarmOwner->SetTempPetsActive(true); //Necessary fail safe flag set if mob ever had a swarm pet to ensure they are removed.
|
||||
swarmOwner->SetTempPetCount(swarmOwner->GetTempPetCount() + 1);
|
||||
|
||||
|
||||
//Not recommended if using above (However, this will work better on older clients).
|
||||
if (RuleB(Pets, UnTargetableSwarmPet))
|
||||
{
|
||||
@@ -1882,7 +1881,7 @@ void NPC::PetOnSpawn(NewSpawn_Struct* ns)
|
||||
if(!IsCharmed() && swarmOwner->IsClient())
|
||||
sprintf(ns->spawn.lastName, "%s's Pet", swarmOwner->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(GetOwnerID())
|
||||
{
|
||||
ns->spawn.is_pet = 1;
|
||||
|
||||
Reference in New Issue
Block a user