diff --git a/changelog.txt b/changelog.txt index 058e05542..9eaba6158 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) == 11/09/2014 == Kayen: Implemented support for spell target type (45) 'Target Rings' on Underfoot (does work earlier expansions) Thanks to Lecht for figuring out the op_code side. +Implement new Live-like faction adjustment message using rule Client:UseLiveFactionMessage. +Optional SQL: utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql == 11/06/2014 == demonstar55: Tracking default sort will now be correct order diff --git a/common/classes.cpp b/common/classes.cpp index a1a3bf05a..f33d0354a 100644 --- a/common/classes.cpp +++ b/common/classes.cpp @@ -290,50 +290,3 @@ const char* GetEQClassName(uint8 class_, uint8 level) { } } -uint32 GetArrayEQClass(uint8 eqclass) { - switch (eqclass) { - case WARRIOR: - return WARRIOR; - case CLERIC: - return CLERIC; - case PALADIN: - return PALADIN; - case RANGER: - return RANGER; - case SHADOWKNIGHT: - return SHADOWKNIGHT; - case DRUID: - return DRUID; - case MONK: - return MONK; - case BARD: - return BARD; - case ROGUE: - return ROGUE; - case SHAMAN: - return SHAMAN; - case NECROMANCER: - return NECROMANCER; - case WIZARD: - return WIZARD; - case MAGICIAN: - return MAGICIAN; - case ENCHANTER: - return ENCHANTER; - case BEASTLORD: - return BEASTLORD; - case BERSERKER: - return BERSERKER; - default: - return 0; - } -} - -uint8 GetEQArrayEQClass(uint8 eqclass) { - if (eqclass >= WARRIOR && eqclass <= BERSERKER) - return eqclass - WARRIOR; - if (eqclass >= WARRIORGM && eqclass <= BERSERKERGM) - return eqclass - WARRIORGM; - return WARRIOR; -} - diff --git a/common/classes.h b/common/classes.h index b70609379..c2f0c8acf 100644 --- a/common/classes.h +++ b/common/classes.h @@ -86,7 +86,5 @@ #define call_1 65536 const char* GetEQClassName(uint8 class_, uint8 level = 0); -uint32 GetArrayEQClass(uint8 eqclass); -uint8 GetEQArrayEQClass(uint8 eqclass); #endif diff --git a/common/ruletypes.h b/common/ruletypes.h index 1fdf95ddb..129e0ed61 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -124,7 +124,6 @@ RULE_INT ( Guild, PlayerCreationLimit, 1) // Only allow use of the UF+ window i RULE_INT ( Guild, PlayerCreationRequiredStatus, 0) // Required admin status. RULE_INT ( Guild, PlayerCreationRequiredLevel, 0) // Required Level of the player attempting to create the guild. RULE_INT ( Guild, PlayerCreationRequiredTime, 0) // Required Time Entitled On Account (in Minutes) to create the guild. - RULE_CATEGORY_END() RULE_CATEGORY( Skills ) @@ -248,7 +247,6 @@ RULE_INT ( Pathing, CullNodesFromStart, 1) // Checks LOS from Start point to se RULE_INT ( Pathing, CullNodesFromEnd, 1) // Checks LOS from End point to second to last node for this many nodes and removes last node if there is LOS RULE_REAL ( Pathing, CandidateNodeRangeXY, 400) // When searching for path start/end nodes, only nodes within this range will be considered. RULE_REAL ( Pathing, CandidateNodeRangeZ, 10) // When searching for path start/end nodes, only nodes within this range will be considered. - RULE_CATEGORY_END() RULE_CATEGORY( Watermap ) @@ -326,7 +324,6 @@ RULE_INT ( Spells, AI_IdleNoSpellMaxRecast, 2000) // AI spell recast time(MS) ch RULE_INT ( Spells, AI_IdleBeneficialChance, 100) // Chance while idle to do a beneficial spell on self or others. RULE_BOOL ( Spells, SHDProcIDOffByOne, true) // pre June 2009 SHD spell procs were off by 1, they stopped doing this in June 2009 (so UF+ spell files need this false) RULE_BOOL ( Spells, Jun182014HundredHandsRevamp, false) // this should be true for if you import a spell file newer than June 18, 2014 - RULE_CATEGORY_END() RULE_CATEGORY( Combat ) @@ -506,7 +503,6 @@ RULE_INT ( Merchant, PricePenaltyPct, 4) // Determines maximum price penalty fro RULE_REAL( Merchant, ChaBonusMod, 3.45) // Determines CHA cap, from 104 CHA. 3.45 is 132 CHA at apprehensive. 0.34 is 400 CHA at apprehensive. RULE_REAL ( Merchant, ChaPenaltyMod, 1.52) // Determines CHA bottom, up to 102 CHA. 1.52 is 37 CHA at apprehensive. 0.98 is 0 CHA at apprehensive. RULE_BOOL ( Merchant, EnableAltCurrencySell, true) // Enables the ability to resell items to alternate currency merchants - RULE_CATEGORY_END() RULE_CATEGORY ( Bazaar ) @@ -590,6 +586,10 @@ RULE_BOOL ( Inventory, EnforceAugmentUsability, true) // Forces augmented item u RULE_BOOL ( Inventory, EnforceAugmentWear, true) // Forces augment wear slot validation RULE_CATEGORY_END() +RULE_CATEGORY( Client ) +RULE_BOOL( Client, UseLiveFactionMessage, false) // Allows players to see faction adjustments like Live +RULE_CATEGORY_END() + #undef RULE_CATEGORY #undef RULE_INT #undef RULE_REAL diff --git a/utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql b/utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql new file mode 100644 index 000000000..de407d283 --- /dev/null +++ b/utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql @@ -0,0 +1 @@ +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Client:UseLiveFactionMessage', 'false', 'Allow players to see faction adjustments like Live.'); diff --git a/zone/client.cpp b/zone/client.cpp index 6d491fae0..52f046dfd 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7755,12 +7755,14 @@ void Client::SendFactionMessage(int32 tmpvalue, int32 faction_id, int32 totalval return; else if (totalvalue >= MAX_PERSONAL_FACTION) Message_StringID(0, FACTION_BEST, name); - else if (tmpvalue > 0 && totalvalue < MAX_PERSONAL_FACTION) - Message_StringID(0, FACTION_BETTER, name); - else if (tmpvalue < 0 && totalvalue > MIN_PERSONAL_FACTION) - Message_StringID(0, FACTION_WORSE, name); else if (totalvalue <= MIN_PERSONAL_FACTION) Message_StringID(0, FACTION_WORST, name); + else if (tmpvalue > 0 && totalvalue < MAX_PERSONAL_FACTION && !RuleB(Client, UseLiveFactionMessage)) + Message_StringID(0, FACTION_BETTER, name); + else if (tmpvalue < 0 && totalvalue > MIN_PERSONAL_FACTION && !RuleB(Client, UseLiveFactionMessage)) + Message_StringID(0, FACTION_WORSE, name); + else if (RuleB(Client, UseLiveFactionMessage)) + Message(0, "Your faction standing with %s has been adjusted by %i.", name, tmpvalue); //New Live faction message (14261) return; }