EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Feature Requests (https://www.eqemulator.org/forums/forumdisplay.php?f=612)
-   -   Merc Runspeed (https://www.eqemulator.org/forums/showthread.php?t=37323)

HnathBST 09-27-2013 02:45 AM

Merc Runspeed
 
Hi, I'm not sure if this is in the right place so feel free to move me. I've had a few players on my server mention that their mercs tend to get lost, sometimes taking up to 2 minutes to find them.

I have upped the runspeed of the mercs in the DB but is it possible to just set the runspeed as the same as the client's current speed? I'm not very skilled in C++ but I'm going to poke around and see what I can find.

I do know that the mercs runspeed is set on the fly (@ zone/merc.cpp 1803) but I don't know how abouts to change this to the clients current run speed.

Thanks.

bad_captain 09-30-2013 11:51 PM

I would look at LoadMerc around line 5021 in merc.cpp.

Code:

                        npc_type->gender = gender;
                        npc_type->loottable_id = 0; // Loottable has to be 0, otherwise we'll be leavin' some corpses!
                        npc_type->npc_id = 0; //NPC ID has to be 0, otherwise db gets all confuzzled.
                        npc_type->race = merc_template->RaceID;
                        npc_type->class_ = merc_template->ClassID;
                        npc_type->maxlevel = 0; //We should hard-set this to override scalerate's functionality in the NPC class when it is constructed.

                        Merc* merc = new Merc(npc_type, c->GetX(), c->GetY(), c->GetZ(), 0);
                        merc->SetMercData( merc_template->MercTemplateID );
                        database.LoadMercEquipment(merc);
                        merc->UpdateMercStats(c);

Or, just add it to the constructor.


All times are GMT -4. The time now is 12:25 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.