EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Petnaming not working (https://www.eqemulator.org/forums/showthread.php?t=38806)

zerjz3 09-21-2014 01:35 AM

Petnaming not working
 
No matter what number I use for petnaming in the pets table, the pet in question always comes out at Zerjz`s pet -- this is problematic because I am trying to get the pet to have its actual npc name so that its quest file will launch. What am I doing wrong? Tried setting the petnaming to 4 in the db but that has no effect whatsoever.

Update: I directly copied the Steadfast Servant spell, which properly names the pet "steadfast servant" and not "Zerjz's pet" .... made it into a new spell, changing only the actual pet that gets summoned by it.. does not work... pet is Zerjz's pet

Changing the actual Steadfast Servant spell itself to summon the new pet DOES work, the pet gets named its proper npctype name... so what's the difference here? Why won't the copy of the spell work?

Is there something in the source that controls this? I checked pets.cpp already

Kingly_Krab 09-21-2014 12:36 PM

Here's the code for pet naming (pets.cpp I know you've already checked this) Are you sure you're setting the information up correctly in the pets table?
Code:

if (petname != nullptr) {
        // Name was provided, use it.
        strn0cpy(npc_type->name, petname, 64);
} else if (record.petnaming == 0) {
        strcpy(npc_type->name, this->GetCleanName());
        npc_type->name[25] = '\0';
        strcat(npc_type->name, "`s_pet");
} else if (record.petnaming == 1) {
        strcpy(npc_type->name, this->GetName());
        npc_type->name[19] = '\0';
        strcat(npc_type->name, "`s_familiar");
} else if (record.petnaming == 2) {
        strcpy(npc_type->name, this->GetName());
        npc_type->name[21] = 0;
        strcat(npc_type->name, "`s_Warder");
} else if (record.petnaming == 4) {
        // Keep the DB name
} else if (record.petnaming == 3 && IsClient()) {
        strcpy(npc_type->name, GetRandPetName());
} else {
        strcpy(npc_type->name, this->GetCleanName());
        npc_type->name[25] = '\0';
        strcat(npc_type->name, "`s_pet");
}


zerjz3 09-21-2014 06:54 PM

Yes. I am 100% sure the information is being set up correctly. I have directly copied the Steadfast Servant entries in spells_us, pets, npctypes and made an exact copy of the entries for Steadfast Servant, changing ONLY the name of the spell, the race of the summoned npc, and the name of the summoned npc. Everything else is a direct copy


All times are GMT -4. The time now is 05:33 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.