Log in

View Full Version : Beastlord pets


Nightrider84
06-04-2015, 12:29 PM
I made a change to my server awhile ago and forgot to commit the changes when I recompiled the server. I added beastlord as a playable class to gnomes but I forgot how to change the base pet they get to a custom pet. any thoughts where I should look to make the change?

Kingly_Krab
06-04-2015, 12:32 PM
Check line 335 in pets.cpp: if(record.petnaming == 2)
{
switch(GetBaseRace())
{
case VAHSHIR:
npc_type->race = TIGER;
npc_type->size *= 0.8f;
break;
case TROLL:
npc_type->race = ALLIGATOR;
npc_type->size *= 2.5f;
break;
case OGRE:
npc_type->race = BEAR;
npc_type->texture = 3;
npc_type->gender = 2;
break;
case BARBARIAN:
npc_type->race = WOLF;
npc_type->texture = 2;
break;
case IKSAR:
npc_type->race = WOLF;
npc_type->texture = 0;
npc_type->gender = 1;
npc_type->size *= 2.0f;
npc_type->luclinface = 0;
break;
default:
npc_type->race = WOLF;
npc_type->texture = 0;
}
}

Shendare
06-04-2015, 12:41 PM
For a moment I was scratching my head and wondering why the Beastlord pet appearances are hard-coded, instead of coming from the database pet entry / NPCType, but then I remembered that all Beastlords cast the same spells, referencing the same pet entries, so the server -has- to do the appearance choosing based on the caster's race.