Thread: Merc Runspeed
View Single Post
  #2  
Old 09-30-2013, 11:51 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

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.
Reply With Quote