Forum > Serverside Modding
[QUESTION:WotlK] Changes for custom pets
(1/3) > >>
cata123:
Hello. I wanted to ask if someone made this before : What changes must be done in order to add a custom pet. Custom pet i mean hunter type pet (with spells, eventually talents, talents that also i need to find out how to make the scheme). The pets i intend to make can be another class also (demon, humanoid, even player models). For the pet it will automatically make use of its added spells in combat ? And last question - Where can i find the default stats for a creature / pet (str,agi,int) ?
Morfium:
I think you can just set the pet to "tameable". I added exotic taming to 2.4.3 ages ago by just checking for the last beast master talent in the tree and then allowed taming those pets in the core. But the only core changes I did were to prevent every hunter from taming it and only allow beastmasters. I'm aware there were several changes since 2.4.3 but I'd just try to set your desired pet to tamable. If you get an invalid target error on humanoids I'd look in spell.dbc if your taming spell is limited on targeting those, or in spell.cpp (old Mangos names) check SPELL_EFFECT_TAMECREATURE. Not sure if trinity still uses those names...
cata123:
Thanks for answer. I`m looking for the code where it defines which class should have pets. And pet default status I can`t find where is defined.
Ascathos:
--- Quote from: "cata123" ---Thanks for answer. I`m looking for the code where it defines which class should have pets. And pet default status I can`t find where is defined. --- End quote --- I doubt there is code for that. Only approperiate spells allow to take pets. It kind of takes the sense of writing specific code to tame. E.g., if iirc, there is a quest in the orc/troll starter area that allows you to charm a pet (or, at least, make it friendly to you).
But yeah. You could, for example, write a spellscript for a specific spell (or even the regular tame spell) that certain pets require e.g. a talent. A list containing every pet entry, a check for the class and talent and you are good to go.
cata123:
I have a custom beastmaster that adds pets to non hunter players, eventually to add custom ones, but i see the pets do not benefit for upgrades (HP, DPS, armors), that`s why i`m looking for the part where pet status is defined, or from where it comes from. As for the code, i found in Pet.cpp from TrinityCore, at line 841:
--- Code: --- //Determine pet type PetType petType = MAX_PET_TYPE; if (IsPet() && GetOwner()->GetTypeId() == TYPEID_PLAYER) { if (GetOwner()->getClass() == CLASS_WARLOCK || GetOwner()->getClass() == CLASS_SHAMAN // Fire Elemental || GetOwner()->getClass() == CLASS_DEATH_KNIGHT) // Risen Ghoul { petType = SUMMON_PET; } else if (GetOwner()->getClass() == CLASS_HUNTER) { petType = HUNTER_PET; m_unitTypeMask |= UNIT_MASK_HUNTER_PET; } else { TC_LOG_ERROR("entities.pet", "Unknown type pet %u is summoned by player class %u", GetEntry(), GetOwner()->getClass()); } } --- End code ---
Navigation
[0] Message Index
[#] Next page
|