Skip to content

Commit

Permalink
Simpler syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfortier committed Dec 4, 2024
1 parent 6a9e2d2 commit e39c4d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Code/client/Services/Generic/MagicService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ void MagicService::OnAddTargetEvent(const AddTargetEvent& acEvent) noexcept
if (it == std::end(view))
{
spdlog::warn("Form id not found for magic add target, form id: {:X}", acEvent.TargetID);
m_queuedEffects[acEvent.TargetID] = std::pair<int, AddTargetRequest>(0, request);
m_queuedEffects[acEvent.TargetID] = std::pair(0, request);
return;
}

std::optional<uint32_t> serverIdRes = Utils::GetServerId(*it);
if (!serverIdRes.has_value())
{
spdlog::warn("Server id not found for magic add target, form id: {:X}", acEvent.TargetID);
m_queuedEffects[acEvent.TargetID] = std::pair<int, AddTargetRequest>(0, request);
m_queuedEffects[acEvent.TargetID] = std::pair(0, request);
return;
}

Expand All @@ -333,7 +333,7 @@ void MagicService::OnAddTargetEvent(const AddTargetEvent& acEvent) noexcept
if (casterIt == std::end(view))
{
spdlog::warn("Form id not found for magic add target, form id: {:X}", acEvent.CasterID);
m_queuedEffects[acEvent.TargetID] = std::pair<int, AddTargetRequest>(0, request);
m_queuedEffects[acEvent.TargetID] = std::pair(0, request);
return;
}

Expand All @@ -356,7 +356,7 @@ void MagicService::OnNotifyAddTarget(const NotifyAddTarget& acMessage) noexcept
if (!pActor)
{
spdlog::warn(__FUNCTION__ ": could not find actor server id {:X}", acMessage.TargetId);
m_queuedRemoteEffects[acMessage.TargetId] = std::pair<int, NotifyAddTarget>(0, acMessage);
m_queuedRemoteEffects[acMessage.TargetId] = std::pair(0, acMessage);
return;
}

Expand Down

0 comments on commit e39c4d4

Please sign in to comment.