DarkflameServer/dGame/dPropertyBehaviors/ControlBehaviorMessages/AddStripMessage.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
1.1 KiB
C++
Raw Normal View History

#include "AddStripMessage.h"
#include "Action.h"
2024-02-27 07:29:51 +00:00
AddStripMessage::AddStripMessage(const AMFArrayValue& arguments)
: BehaviorMessageBase{ arguments }
, m_Position{ arguments }
, m_ActionContext{ arguments } {
2024-02-27 07:29:51 +00:00
const auto* const strip = arguments.GetArray("strip");
if (!strip) return;
const auto* const actions = strip->GetArray("actions");
if (!actions) return;
2024-02-27 07:29:51 +00:00
for (size_t actionNumber = 0; actionNumber < actions->GetDense().size(); ++actionNumber) {
const auto* const actionValue = actions->GetArray(actionNumber);
if (!actionValue) continue;
2024-02-27 07:29:51 +00:00
m_ActionsToAdd.emplace_back(*actionValue);
2024-03-08 21:44:02 +00:00
Log::Debug("xPosition {:f} yPosition {:f} stripId {:d} stateId {:d} behaviorId {:d} t {:s} valueParameterName {:s} valueParameterString {:s} valueParameterDouble {:f}", m_Position.GetX(), m_Position.GetY(), m_ActionContext.GetStripId(), GeneralUtils::ToUnderlying(m_ActionContext.GetStateId()), m_BehaviorId, m_ActionsToAdd.back().GetType(), m_ActionsToAdd.back().GetValueParameterName(), m_ActionsToAdd.back().GetValueParameterString(), m_ActionsToAdd.back().GetValueParameterDouble());
}
2024-03-08 21:44:02 +00:00
Log::Debug("number of actions {:d}", m_ActionsToAdd.size());
}