mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
Merge branch 'main' into Log-Line-Cleaning
This commit is contained in:
@@ -71,7 +71,7 @@ void BuffComponent::Update(float deltaTime)
|
||||
buff.second.tickTime = buff.second.tick;
|
||||
buff.second.stacks--;
|
||||
|
||||
SkillComponent::HandleUnmanaged(buff.second.behaviorID, m_Parent->GetObjectID());
|
||||
SkillComponent::HandleUnmanaged(buff.second.behaviorID, m_Parent->GetObjectID(), buff.second.source);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -481,9 +481,9 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
|
||||
delete bitStream;
|
||||
}
|
||||
|
||||
void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID target)
|
||||
void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID target, LWOOBJID source)
|
||||
{
|
||||
auto* context = new BehaviorContext(target);
|
||||
auto* context = new BehaviorContext(source);
|
||||
|
||||
context->unmanaged = true;
|
||||
context->caster = target;
|
||||
@@ -496,7 +496,7 @@ void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID t
|
||||
|
||||
delete bitStream;
|
||||
|
||||
delete context;
|
||||
delete context;
|
||||
}
|
||||
|
||||
void SkillComponent::HandleUnCast(const uint32_t behaviorId, const LWOOBJID target)
|
||||
|
@@ -158,8 +158,9 @@ public:
|
||||
* Computes a server-side skill calculation without an associated entity.
|
||||
* @param behaviorId the root behavior ID of the skill
|
||||
* @param target the explicit target of the skill
|
||||
* @param source the explicit source of the skill
|
||||
*/
|
||||
static void HandleUnmanaged(uint32_t behaviorId, LWOOBJID target);
|
||||
static void HandleUnmanaged(uint32_t behaviorId, LWOOBJID target, LWOOBJID source = LWOOBJID_EMPTY);
|
||||
|
||||
/**
|
||||
* Computes a server-side skill uncast calculation without an associated entity.
|
||||
|
@@ -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<ScriptedActivityComponent>();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user