diff --git a/changelog.txt b/changelog.txt index b16c283ad..67f2311e4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,7 +5,12 @@ Akkadius: (Performance Adjustment) Removed AsyncLoadVariables from InterserverTi see that the query 'SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= timestamp' is called every 10 seconds. This function is loading variables that are initially loaded on World and Zone bootup. When running a large amount of zone servers, the amount of MySQL chatter that is produced is enormous and unnecessary. For example, if I ran 400 zone servers, I would see 3,456,000 unnecessary queries from all idle or active zone processes in a 24 hour interval. - +Secrets: Added a rule to enable multiple procs from the same weapon's other slots if a proc is deemed to trigger, Defaults to true. + If Combat:OneProcPerWeapon is not enabled, we reset the try for that weapon regardless of if we procced or not. + This is for some servers that may want to have as many procs triggering from weapons as possible in a single round. + +Optional SQL: utils/sql/git/optional/2014_04_05_ProcRules.sql + == 04/04/2014 == Kayen: Implemented 'Physical Resists' (Resist Type 9) to be consistent with live based on extensive parsing. SQL will add new field to npc_types 'PhR' and fill in database with values consistent with observations. diff --git a/common/ruletypes.h b/common/ruletypes.h index 39886c9f5..dec5a6a8f 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -396,6 +396,7 @@ RULE_BOOL ( Combat, UseArcheryBonusRoll, false) //Make the 51+ archery bonus req RULE_INT ( Combat, ArcheryBonusChance, 50) RULE_INT ( Combat, BerserkerFrenzyStart, 35) RULE_INT ( Combat, BerserkerFrenzyEnd, 45) +RULE_BOOL ( Combat, OneProcPerWeapon, true) //If enabled, One proc per weapon per round RULE_CATEGORY_END() RULE_CATEGORY( NPC ) diff --git a/utils/sql/git/optional/2014_04_05_ProcRules.sql b/utils/sql/git/optional/2014_04_05_ProcRules.sql new file mode 100644 index 000000000..4566f45fd --- /dev/null +++ b/utils/sql/git/optional/2014_04_05_ProcRules.sql @@ -0,0 +1 @@ +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Combat:OneProcPerWeapon', 'true', 'If OneProcPerWeapon is not enabled, we reset the proc try for that weapon regardless of if we procced or not.'); diff --git a/zone/attack.cpp b/zone/attack.cpp index 91ce521d5..2d26f1c2b 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -4085,6 +4085,10 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on } } } + //If OneProcPerWeapon is not enabled, we reset the try for that weapon regardless of if we procced or not. + //This is for some servers that may want to have as many procs triggering from weapons as possible in a single round. + if(!RuleB(Combat, OneProcPerWeapon)) + proced = false; if (!proced && inst) { for (int r = 0; r < MAX_AUGMENT_SLOTS; r++) {