From 3105577c1bc6a0c05a2f8ad385b7b5b27238d8cc Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sat, 13 Apr 2019 12:39:45 -0400 Subject: [PATCH] Fix the auto-correct mechanism on illegal faction Auto correct was not using the new client_base_data for min/max. --- zone/client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index f56aa1d31..e713ce6e4 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7810,9 +7810,9 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui // // Adjust these values for cases where starting faction is below // min or above max by not allowing any earn in those directions. - this_faction_min = MIN_PERSONAL_FACTION - fm.base; + this_faction_min = fm.min - fm.base; this_faction_min = std::min(0, this_faction_min); - this_faction_max = MAX_PERSONAL_FACTION - fm.base; + this_faction_max = fm.max - fm.base; this_faction_max = std::max(0, this_faction_max); // Get the characters current value with that faction @@ -7853,9 +7853,9 @@ void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class // min or above max by not allowing any earn/loss in those directions. // At least one faction starts out way below min, so we don't want // to allow loses in those cases, just massive gains. - this_faction_min = MIN_PERSONAL_FACTION - fm.base; + this_faction_min = fm.min - fm.base; this_faction_min = std::min(0, this_faction_min); - this_faction_max = MAX_PERSONAL_FACTION - fm.base; + this_faction_max = fm.max - fm.base; this_faction_max = std::max(0, this_faction_max); //Get the faction modifiers