Don't feel like making a new post for one line of code change so... while testing this all out I noticed my faction wasn't raising or lowering on mobs.
in Client::SetFactionLevel() there is:
Code:
if(tmpValue >= MAX_FACTION)
{
t = MAX_FACTION - mod;
if(current_value == t) {
//do nothing, it is already maxed out
} else if(!(database.SetCharacterFactionLevel(char_id, faction_id[i], t, factionvalues)))
{
return;
}
}
else if(tmpValue <= MIN_FACTION)
{
t = MIN_FACTION - mod;
if(current_value == t) {
//do nothing, it is already maxed out
} else if(!(database.SetCharacterFactionLevel(char_id, faction_id[i], t, factionvalues)))
{
return;
}
}
else
{
if(!(database.SetCharacterFactionLevel(char_id, faction_id[i], current_value, factionvalues)))
{
return;
}
}
the issue is down there at the bottom
Code:
if(!(database.SetCharacterFactionLevel(char_id, faction_id[i], current_value, factionvalues)))
You're supposed to be setting the new faction value but you're setting it to the current_value?
should be something like
Code:
if(!(database.SetCharacterFactionLevel(char_id, faction_id[i], current_value+npc_value[i], factionvalues)))