Charmed pets should no longer be targettable with F8. Charmed pets no longer get a surname of Soandso's Pet.

This commit is contained in:
Derision
2013-02-18 18:58:26 +00:00
parent 9f63498a64
commit 9680c039f0
4 changed files with 13 additions and 6 deletions
+9 -6
View File
@@ -1737,22 +1737,25 @@ void NPC::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
if (RuleB(Pets, UnTargetableSwarmPet)) {
if(GetOwnerID() || GetSwarmOwner()) {
ns->spawn.is_pet = 1;
if (GetOwnerID()) {
if (!IsCharmed() && GetOwnerID()) {
Client *c = entity_list.GetClientByID(GetOwnerID());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
else if (GetSwarmOwner()) {
ns->spawn.bodytype = 11;
Client *c = entity_list.GetClientByID(GetSwarmOwner());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
if(!IsCharmed())
{
Client *c = entity_list.GetClientByID(GetSwarmOwner());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
}
}
} else {
if(GetOwnerID()) {
ns->spawn.is_pet = 1;
if (GetOwnerID()) {
if (!IsCharmed() && GetOwnerID()) {
Client *c = entity_list.GetClientByID(GetOwnerID());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
@@ -2347,4 +2350,4 @@ void NPC::PrintOutQuestItems(Client* c){
}
c->Message(4,"End of quest items list.");
}
}