From 203e75ef3d1c3ef166199d3fc353f88eb9c0adb8 Mon Sep 17 00:00:00 2001 From: Jett <55758076+Jettford@users.noreply.github.com> Date: Sat, 1 Jan 2022 10:10:12 +0000 Subject: [PATCH] Fix resurrecting in BONS (#334) --- dGame/dUtilities/SlashCommandHandler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dGame/dUtilities/SlashCommandHandler.cpp b/dGame/dUtilities/SlashCommandHandler.cpp index 8be99612..47704d2b 100644 --- a/dGame/dUtilities/SlashCommandHandler.cpp +++ b/dGame/dUtilities/SlashCommandHandler.cpp @@ -61,6 +61,7 @@ #include "SkillComponent.h" #include "VanityUtilities.h" #include "GameConfig.h" +#include "ScriptedActivityComponent.h" void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr) { std::string chatCommand; @@ -384,6 +385,13 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "resurrect") { + ScriptedActivityComponent* scriptedActivityComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent(); + + if (scriptedActivityComponent) { // check if user is in activity world and if so, they can't resurrect + ChatPackets::SendSystemMessage(sysAddr, u"You cannot resurrect in an activity world."); + return; + } + GameMessages::SendResurrect(entity); }