DarkflameServer/dGame/dPropertyBehaviors/ControlBehaviorMessages/UpdateStripUiMessage.cpp
David Markowitz 72c93c8913
Further implement Property Behavior parsing (#936)
Further implements the ControlBehavior processing and adds preparations for cheat detection
2023-02-13 18:55:44 -08:00

21 lines
759 B
C++

#include "UpdateStripUiMessage.h"
UpdateStripUiMessage::UpdateStripUiMessage(AMFArrayValue* arguments) {
auto* uiArray = arguments->FindValue<AMFArrayValue>("ui");
if (!uiArray) return;
auto* xPositionValue = uiArray->FindValue<AMFDoubleValue>("x");
auto* yPositionValue = uiArray->FindValue<AMFDoubleValue>("y");
if (!xPositionValue || !yPositionValue) return;
yPosition = yPositionValue->GetDoubleValue();
xPosition = xPositionValue->GetDoubleValue();
stripID = GetStripIDFromArgument(arguments);
stateID = GetBehaviorStateFromArgument(arguments);
behaviorID = GetBehaviorIDFromArgument(arguments);
Game::logger->LogDebug("UpdateStripUIMessage", "x %f y %f stpId %i sttId %i bhId %i", xPosition, yPosition, stripID, stateID, behaviorID);
}