In database.cpp I see the following:
/* if (RunQuery(query, MakeAnyLenString(&query, "SELECT faction_id, value, primary_faction FROM npc_faction WHERE npc_id = %i", tmpNPCType.npc_id), errbuf, &result2)) {
safe_delete_array(query);
int i = 0;
while((row2 = mysql_fetch_row(result2))) {
if (atoi(row2[2]) && i != 0) {
tmpNPCType.factionid[i] = tmpNPCType.factionid[0];
tmpNPCType.factionvalue[i] = tmpNPCType.factionvalue[0];
tmpNPCType.factionid[0] = atoi(row2[0]);
tmpNPCType.factionvalue[0] = atoi(row2[1]);
}
else {
tmpNPCType.factionid[i] = atoi(row2[0]);
tmpNPCType.factionvalue[i] = atoi(row2[1]);
}
i++;
if (i >= MAX_NPC_FACTIONS) {
cerr << "Error in DBLoadNPCTypes: More than MAX_NPC_FACTIONS factions returned, npcid=" << tmpNPCType.npc_id << endl;
break;
}
}
mysql_free_result(result2);
}*/
Since this is all commented out it explains my faction problems. However, since I wasn't aware of any change to the npc_types table I was never aware.
How can I correct my npc_type table to allow factions to function?
Many thanks
|