View Single Post
  #19  
Old 11-08-2002, 04:07 PM
quester
Hill Giant
 
Join Date: Oct 2002
Posts: 108
Default

Well I found what would need to be changed.. bt its a pain. You'd have to add a new callback for the exe to use just to determine the MAX id, so you can allocate it properly in the OpenNPCTypesMMF function.

Code:
// Would need to add a second callback here to retrieve the 
// max id and pass that in to OpenNPCTypes
	int8 ret = OpenNPCTypesMMF(iNPCTypesCount);
	MMFNPCTypes->MaxNPCTypeID = iMaxNPCTypeID;
	MMFNPCTypes->NPCTypeCount = iNPCTypesCount;
	if (ret == 2) {
		AddNPCTypeAllowed = true;
		// use a callback so the DB functions are done in the main exe
		// this way the DLL doesnt have to open a connection to mysql
		cbDBLoadNPCTypes(MMFNPCTypes->NPCTypeCount, MMFNPCTypes->MaxNPCTypeID);
		AddNPCTypeAllowed = false;
		MMFNPCTypes->Loaded = true;
		return true;
	}
I'll look into doing that.. but at the moment my brain is fuzzy.. and i'm pissed that my bard just died in OT and lost a level.. so i'm off to take a walk or something :p
Reply With Quote