If you look in the MakePet function in spells.cpp I setup a way for the mage epic to cast its spells, its under a switch, if you look above that function, thats where all the pets are you can set a "type" and define it in MakePet, for example:
MakePet(((int)(3 + ((tmp-2) * 3.5) + (rand()%3))), 0, 75, 2, 0, 4 + (((float)(tmp - 2) / 14) * 3),8); //Notice the 8 at the end? thats the type then under the ::MakePet function in the switch add case 8: //Setup whatever for that special pet { //bleh break; } Just an idea for you, sorry if its not clear enough |
Yeah, I saw all the pet stuff in there, but it only worked for Mages, and used the old random levels code.
I am expanding it to work for all pets, and I want it to me easily modifiable via the DB to keep it tweaked, rather than hard coding them. Just personal preferance maybe. Besides, as was earlier commented before.. Marking an NPC to cats "x spells", is not the same as giving them a proc. |
It was to avoid RAND_MAX and floats which dont help the processor too much :) While trying to duplicate EQ we have to realize that our resources are limited compared to them.
|
Actually, that depends on the person running the server doesn't it?
Besides.. RAND_MAX is a constant, so i'm not sure what you are talking about.. Can you enlighten me? A rand() call doesn't take much in the way of performance either. |
All times are GMT -4. The time now is 11:30 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.