mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-11 01:53:52 +00:00
Merge pull request #842 from noudess/faction_min_max
Fix the auto-correct mechanism on illegal faction
This commit is contained in:
commit
e009e064f3
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user