Merge pull request #1093 from EQEmu/hot_reload_adjustments

Add hot reload saylinks as well as a rule to determine if you bypass the saylinks.
This commit is contained in:
Chris Miles 2020-07-07 14:13:15 -05:00 committed by GitHub
commit b0b63cc64c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -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

View File

@ -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;