From d6e1c3f187999bfe9f0d1cdc5c3fe6036db14e58 Mon Sep 17 00:00:00 2001 From: Fryguy Date: Sun, 7 Jan 2024 02:08:16 -0500 Subject: [PATCH] [Rule] Mounts will wear off on zone (#3865) * [Rule] Mounts will wear off on zone Allows server admins to toggle if they want to prevent players from retaining mounts on zone. false is default to maintain current feature set. * Added Date for mount zoning added --- common/ruletypes.h | 1 + zone/client_packet.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 69f4541f0..395319ff7 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -217,6 +217,7 @@ RULE_BOOL(Character, LeaveCursorMoneyOnCorpse, false, "Enable or disable leaving RULE_BOOL(Character, ItemExtraSkillDamageCalcAsPercent, false, "If enabled, apply Item Extra Skill Damage as Percentage-based modifiers") RULE_BOOL(Character, UseForageCommonFood, true, "If enabled, use the common foods specified in the code.") RULE_INT(Character, ClearXTargetDelay, 10, "Seconds between uses of the #clearxtargets command (Set to 0 to disable)") +RULE_BOOL(Character, PreventMountsFromZoning, false, "Enable to prevent mounts from zoning - Prior to December 15, 2004 this is enabled.") RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 4172c432a..d06781867 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -681,8 +681,11 @@ void Client::CompleteConnect() break; } case SE_SummonHorse: { - SummonHorse(buffs[j1].spellid); - //hasmount = true; //this was false, is that the correct thing? + if (RuleB(Character, PreventMountsFromZoning)) { + BuffFadeByEffect(SE_SummonHorse); + } else { + SummonHorse(buffs[j1].spellid); + } break; } case SE_Silence: