EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Here is code (DIFFs) to add mob melee procs (https://www.eqemulator.org/forums/showthread.php?t=3709)

DeletedUser 11-12-2002 08:38 AM

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

quester 11-14-2002 06:56 AM

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.

DeletedUser 11-14-2002 10:47 AM

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.

quester 11-14-2002 02:08 PM

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.