mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 10:18:21 +00:00
72c93c8913
Further implements the ControlBehavior processing and adds preparations for cheat detection
30 lines
1.2 KiB
C++
30 lines
1.2 KiB
C++
#include "SplitStripMessage.h"
|
|
|
|
SplitStripMessage::SplitStripMessage(AMFArrayValue* arguments) {
|
|
auto* srcActionIndexValue = arguments->FindValue<AMFDoubleValue>("srcActionIndex");
|
|
if (!srcActionIndexValue) return;
|
|
|
|
srcActionIndex = static_cast<uint32_t>(srcActionIndexValue->GetDoubleValue());
|
|
|
|
srcStripId = GetStripIDFromArgument(arguments, "srcStripID");
|
|
|
|
srcStateId = GetBehaviorStateFromArgument(arguments, "srcStateID");
|
|
|
|
dstStripId = GetStripIDFromArgument(arguments, "dstStripID");
|
|
|
|
dstStateId = GetBehaviorStateFromArgument(arguments, "dstStateID");
|
|
|
|
auto* dstStripUiArray = arguments->FindValue<AMFArrayValue>("dstStripUI");
|
|
if (!dstStripUiArray) return;
|
|
|
|
auto* xPositionValue = dstStripUiArray->FindValue<AMFDoubleValue>("x");
|
|
auto* yPositionValue = dstStripUiArray->FindValue<AMFDoubleValue>("y");
|
|
if (!xPositionValue || !yPositionValue) return;
|
|
|
|
yPosition = yPositionValue->GetDoubleValue();
|
|
xPosition = xPositionValue->GetDoubleValue();
|
|
|
|
behaviorId = GetBehaviorIDFromArgument(arguments);
|
|
Game::logger->LogDebug("SplitStripMessage", "bhid %i x %f y %f srcStp %i dstStp %i srcStt %i dstStt %i srcActNdx %i", behaviorId, xPosition, yPosition, srcStripId, dstStripId, srcStateId, dstStateId, srcActionIndex);
|
|
}
|