diff --git a/common/ruletypes.h b/common/ruletypes.h index f9b46cda1..098fbd94f 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -766,6 +766,7 @@ RULE_CATEGORY(HotReload) RULE_BOOL(HotReload, QuestsRepopWithReload, true, "When a hot reload is triggered, the zone will repop") RULE_BOOL(HotReload, QuestsRepopWhenPlayersNotInCombat, true, "When a hot reload is triggered, the zone will repop when no clients are in combat") RULE_BOOL(HotReload, QuestsResetTimersWithReload, true, "When a hot reload is triggered, quest timers will be reset") +RULE_BOOL(HotReload, QuestsAutoReloadGlobalScripts, false, "When a quest, plugin, or global script changes, auto reload.") RULE_CATEGORY_END() RULE_CATEGORY(Instances) diff --git a/common/servertalk.h b/common/servertalk.h index a487c84ca..a0b51af67 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -27,7 +27,6 @@ #define ServerOP_Who 0x000B // #who #define ServerOP_ZonePlayer 0x000C // #zone, or #summon #define ServerOP_KickPlayer 0x000D // #kick - #define ServerOP_RefreshGuild 0x000E // Notice to all zoneservers to refresh their guild cache for ID# in packet (ServerGuildRefresh_Struct) #define ServerOP_VoiceMacro 0x000F //#define ServerOP_GuildInvite 0x0010 diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index c4a544357..1b07c5567 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/eq_packet_structs.h" #include "../common/misc_functions.h" #include "../common/rulesys.h" +#include "../common/say_link.h" #include "../common/servertalk.h" #include "../common/profanity_manager.h" @@ -2194,9 +2195,14 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) std::string request_zone_short_name = hot_reload_quests->zone_short_name; std::string local_zone_short_name = zone->GetShortName(); + bool can_reload_global_script = (request_zone_short_name == "all" && RuleB(HotReload, QuestsAutoReloadGlobalScripts)); - if (request_zone_short_name == local_zone_short_name || request_zone_short_name == "all"){ + if (request_zone_short_name == local_zone_short_name || can_reload_global_script) { zone->SetQuestHotReloadQueued(true); + } else if (request_zone_short_name == "all") { + std::string reload_quest_saylink = EQ::SayLinkEngine::GenerateQuestSaylink("#reloadquest", false, "Locally"); + std::string reload_world_saylink = EQ::SayLinkEngine::GenerateQuestSaylink("#reloadworld", false, "Globally"); + worldserver.SendEmoteMessage(0, 0, 20, 15, "A quest, plugin, or global script has changed reload quests [%s] [%s].", reload_quest_saylink.c_str(), reload_world_saylink.c_str()); } break;