|
@@ -4294,14 +4294,13 @@ void ZoneServer::ProcessFaction(Spawn* spawn, Client* client)
|
|
|
if(player->GetFactions()->ShouldDecrease(spawn->GetFactionID()))
|
|
|
{
|
|
|
//make sure the player has discovered the faction before we do anything with it, otherwise add it.
|
|
|
- bool hasfaction = database.VerifyFactionID(player->GetCharacterID(),spawn->GetFactionID());
|
|
|
+ bool hasfaction = database.VerifyFactionID(player->GetCharacterID(), spawn->GetFactionID());
|
|
|
+ database.VerifyFactionID(player->GetCharacterID(),spawn->GetFactionID());
|
|
|
if(hasfaction == 0) {
|
|
|
//they do not have the faction. Lets get the default value and feed it in.
|
|
|
sint32 defaultfaction = master_faction_list.GetDefaultFactionValue(spawn->GetFactionID());
|
|
|
//add the default faction for the player.
|
|
|
- database.AddDefaultFaction(player->GetCharacterID(), spawn->GetFactionID(), defaultfaction);
|
|
|
- //load the clients factions. without this it gets reset to -100 on character save.
|
|
|
- database.LoadPlayerFactions(client);
|
|
|
+ player->SetFactionValue(spawn->GetFactionID(), defaultfaction);
|
|
|
}
|
|
|
|
|
|
update_result = player->GetFactions()->DecreaseFaction(spawn->GetFactionID());
|
|
@@ -4349,9 +4348,7 @@ void ZoneServer::ProcessFaction(Spawn* spawn, Client* client)
|
|
|
//they do not have the faction. Lets get the default value and feed it in.
|
|
|
sint32 defaultfaction = master_faction_list.GetDefaultFactionValue(spawn->GetFactionID());
|
|
|
//add the default faction for the player.
|
|
|
- database.AddDefaultFaction(player->GetCharacterID(), spawn->GetFactionID(), defaultfaction);
|
|
|
- //load the clients factions. without this it gets reset to -100 on character save.
|
|
|
- database.LoadPlayerFactions(client);
|
|
|
+ player->SetFactionValue(spawn->GetFactionID(), defaultfaction);
|
|
|
}
|
|
|
|
|
|
update_result = player->GetFactions()->DecreaseFaction(*itr);
|