PDA

View Full Version : $client->MakePet / Focus Pet Power


Rabuk
07-31-2015, 07:20 PM
Hello,
just a quick question.

To make a pet iam calling the function:
$client->MakePet(null, $petname, $name);

This works so far.
I wonder what the spellid is for?

i tried few pet power items with the method but the pets dont get the pet power focus applied.

Iam using the newest sourcecode. The function (makepet->makepowerpet) in the sourcecode use the spellid to calculate the focuseffect for the pet power.

But iam not sure what spellid i need to apply.

Thanks in advance. :)

Rabuk
08-01-2015, 03:39 AM
Ok after looking deeper into it i think i find out a little how this system work.
I am working on a pet system where you can call pets with a clicky item.
All of my pets dont have any spell entry like mages or necros. So there is only one version of my pet in the pet table.

If i look into the pet tables for example the SumWaterR15 pet has many entries for the this pet. So each for for pet power level the game provides.

SumWaterR15 -1
SumWaterR15 15
SumWaterR15 20
SumWaterR15 25
SumWaterR15 30
SumWaterR15 35

-1 is the normal water pet rank 15 and will be used when you dont have any pet power focus item.
The spellid is used as kind of a lookup for the makepowerpet function to find based on the pet power value which pet to use.
Than it will query the npcid from the pets table with the power to get the correct entry from npc_types table.
So in this case i have 6 npc entries from normal pet level to pet power level possible at this level.

Atm for my pet system the player is able to catch a soul from mob sometimes and recall it with a clicky to use it as pet.
Work so far. But i have arround 45k npc entries in the npc_type/pets table that a player can use as pet.

To support pet power i need to have multiply entries for a npc_types and pets and also a spellid for the pet.

Hmm seems i need to write a programm/query to generate all this entries based on npc level and possible pet power items avaible at this level range.

Maybe i need to expand parts of the makepowerpet to support the calculations without any spellid and just calculate the pet power for one npc_type. :)

Rabuk
08-01-2015, 09:23 AM
Talking a little to my self :P

Got it now.
I needed to expand a little the makepowerpet function to support pet power for the makepet command without having a spellid and or a bunch of the same npcid for different pet power values.

So i just need just 1 npcid entry and use a clicky to summon it.
Works for all classes that can use pet focus.
Works also for none pet classes if they can use pet focus custom item for example.

Sorry for the spam :P