mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 13:33:35 +00:00
the consequences of emo's member variable renaming request
This commit is contained in:
parent
27f69d6152
commit
bf318caeda
@ -213,10 +213,15 @@ namespace GeneralUtils {
|
||||
template <typename T>
|
||||
[[nodiscard]] std::optional<NiPoint3> TryParse(const std::string& strX, const std::string& strY, const std::string& strZ) {
|
||||
const auto x = TryParse<float>(strX);
|
||||
const auto y = TryParse<float>(strY);
|
||||
const auto z = TryParse<float>(strZ);
|
||||
if (!x) return std::nullopt;
|
||||
|
||||
return x && y && z ? std::make_optional<NiPoint3>(x.value(), y.value(), z.value()) : std::nullopt;
|
||||
const auto y = TryParse<float>(strY);
|
||||
if (!y) return std::nullopt;
|
||||
|
||||
const auto z = TryParse<float>(strZ);
|
||||
if (!z) return std::nullopt;
|
||||
|
||||
return std::make_optional<NiPoint3>(x.value(), y.value(), z.value());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,5 +9,5 @@ AddActionMessage::AddActionMessage(AMFArrayValue* arguments) : BehaviorMessageBa
|
||||
|
||||
action = Action(actionValue);
|
||||
|
||||
LOG_DEBUG("actionIndex %i stripId %i stateId %i type %s valueParameterName %s valueParameterString %s valueParameterDouble %f behaviorId %i", actionIndex, actionContext.GetStripId(), actionContext.GetStateId(), action.GetType().c_str(), action.GetValueParameterName().c_str(), action.GetValueParameterString().c_str(), action.GetValueParameterDouble(), behaviorId);
|
||||
LOG_DEBUG("actionIndex %i stripId %i stateId %i type %s valueParameterName %s valueParameterString %s valueParameterDouble %f m_BehaviorId %i", actionIndex, actionContext.GetStripId(), actionContext.GetStateId(), action.GetType().c_str(), action.GetValueParameterName().c_str(), action.GetValueParameterString().c_str(), action.GetValueParameterDouble(), m_BehaviorId);
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "AddMessage.h"
|
||||
|
||||
AddMessage::AddMessage(AMFArrayValue* arguments) : BehaviorMessageBase(arguments) {
|
||||
behaviorIndex = 0;
|
||||
m_BehaviorIndex = 0;
|
||||
auto* behaviorIndexValue = arguments->Get<double>("BehaviorIndex");
|
||||
|
||||
if (!behaviorIndexValue) return;
|
||||
|
||||
behaviorIndex = static_cast<uint32_t>(behaviorIndexValue->GetValue());
|
||||
LOG_DEBUG("behaviorId %i index %i", behaviorId, behaviorIndex);
|
||||
m_BehaviorIndex = static_cast<uint32_t>(behaviorIndexValue->GetValue());
|
||||
LOG_DEBUG("m_BehaviorId %i index %i", m_BehaviorId, m_BehaviorIndex);
|
||||
}
|
||||
|
@ -10,9 +10,9 @@
|
||||
class AddMessage : public BehaviorMessageBase {
|
||||
public:
|
||||
AddMessage(AMFArrayValue* arguments);
|
||||
const uint32_t GetBehaviorIndex() const { return behaviorIndex; };
|
||||
const uint32_t GetBehaviorIndex() const { return m_BehaviorIndex; };
|
||||
private:
|
||||
uint32_t behaviorIndex;
|
||||
uint32_t m_BehaviorIndex;
|
||||
};
|
||||
|
||||
#endif //!__ADDMESSAGE__H__
|
||||
|
@ -18,7 +18,7 @@ AddStripMessage::AddStripMessage(AMFArrayValue* arguments) : BehaviorMessageBase
|
||||
|
||||
actionsToAdd.push_back(Action(actionValue));
|
||||
|
||||
LOG_DEBUG("xPosition %f yPosition %f stripId %i stateId %i behaviorId %i t %s valueParameterName %s valueParameterString %s valueParameterDouble %f", position.GetX(), position.GetY(), actionContext.GetStripId(), actionContext.GetStateId(), behaviorId, actionsToAdd.back().GetType().c_str(), actionsToAdd.back().GetValueParameterName().c_str(), actionsToAdd.back().GetValueParameterString().c_str(), actionsToAdd.back().GetValueParameterDouble());
|
||||
LOG_DEBUG("xPosition %f yPosition %f stripId %i stateId %i m_BehaviorId %i t %s valueParameterName %s valueParameterString %s valueParameterDouble %f", position.GetX(), position.GetY(), actionContext.GetStripId(), actionContext.GetStateId(), m_BehaviorId, actionsToAdd.back().GetType().c_str(), actionsToAdd.back().GetValueParameterName().c_str(), actionsToAdd.back().GetValueParameterString().c_str(), actionsToAdd.back().GetValueParameterDouble());
|
||||
}
|
||||
LOG_DEBUG("number of actions %i", actionsToAdd.size());
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ MergeStripsMessage::MergeStripsMessage(AMFArrayValue* arguments) : BehaviorMessa
|
||||
destinationActionContext = ActionContext(arguments, "dstStateID", "dstStripID");
|
||||
dstActionIndex = GetActionIndexFromArgument(arguments, "dstActionIndex");
|
||||
|
||||
LOG_DEBUG("srcstripId %i dststripId %i srcstateId %i dststateId %i dstactionIndex %i behaviorId %i", sourceActionContext.GetStripId(), destinationActionContext.GetStripId(), sourceActionContext.GetStateId(), destinationActionContext.GetStateId(), dstActionIndex, behaviorId);
|
||||
LOG_DEBUG("srcstripId %i dststripId %i srcstateId %i dststateId %i dstactionIndex %i m_BehaviorId %i", sourceActionContext.GetStripId(), destinationActionContext.GetStripId(), sourceActionContext.GetStateId(), destinationActionContext.GetStateId(), dstActionIndex, m_BehaviorId);
|
||||
}
|
||||
|
||||
|
@ -7,5 +7,5 @@ MigrateActionsMessage::MigrateActionsMessage(AMFArrayValue* arguments) : Behavio
|
||||
destinationActionContext = ActionContext(arguments, "dstStateID", "dstStripID");
|
||||
dstActionIndex = GetActionIndexFromArgument(arguments, "dstActionIndex");
|
||||
|
||||
LOG_DEBUG("srcactionIndex %i dstactionIndex %i srcstripId %i dststripId %i srcstateId %i dststateId %i behaviorId %i", srcActionIndex, dstActionIndex, sourceActionContext.GetStripId(), destinationActionContext.GetStripId(), sourceActionContext.GetStateId(), destinationActionContext.GetStateId(), behaviorId);
|
||||
LOG_DEBUG("srcactionIndex %i dstactionIndex %i srcstripId %i dststripId %i srcstateId %i dststateId %i m_BehaviorId %i", srcActionIndex, dstActionIndex, sourceActionContext.GetStripId(), destinationActionContext.GetStripId(), sourceActionContext.GetStateId(), destinationActionContext.GetStateId(), m_BehaviorId);
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ MoveToInventoryMessage::MoveToInventoryMessage(AMFArrayValue* arguments) : Behav
|
||||
auto* behaviorIndexValue = arguments->Get<double>("BehaviorIndex");
|
||||
if (!behaviorIndexValue) return;
|
||||
|
||||
behaviorIndex = static_cast<uint32_t>(behaviorIndexValue->GetValue());
|
||||
LOG_DEBUG("behaviorId %i behaviorIndex %i", behaviorId, behaviorIndex);
|
||||
m_BehaviorIndex = static_cast<uint32_t>(behaviorIndexValue->GetValue());
|
||||
LOG_DEBUG("m_BehaviorId %i m_BehaviorIndex %i", m_BehaviorId, m_BehaviorIndex);
|
||||
}
|
||||
|
@ -13,9 +13,9 @@ class AMFArrayValue;
|
||||
class MoveToInventoryMessage : public BehaviorMessageBase {
|
||||
public:
|
||||
MoveToInventoryMessage(AMFArrayValue* arguments);
|
||||
const uint32_t GetBehaviorIndex() const { return behaviorIndex; };
|
||||
const uint32_t GetBehaviorIndex() const { return m_BehaviorIndex; };
|
||||
private:
|
||||
uint32_t behaviorIndex;
|
||||
uint32_t m_BehaviorIndex;
|
||||
};
|
||||
|
||||
#endif //!__MOVETOINVENTORYMESSAGE__H__
|
||||
|
@ -6,5 +6,5 @@ RearrangeStripMessage::RearrangeStripMessage(AMFArrayValue* arguments) : Behavio
|
||||
|
||||
dstActionIndex = GetActionIndexFromArgument(arguments, "dstActionIndex");
|
||||
|
||||
LOG_DEBUG("srcactionIndex %i dstactionIndex %i stripId %i behaviorId %i stateId %i", srcActionIndex, dstActionIndex, actionContext.GetStripId(), behaviorId, actionContext.GetStateId());
|
||||
LOG_DEBUG("srcactionIndex %i dstactionIndex %i stripId %i m_BehaviorId %i stateId %i", srcActionIndex, dstActionIndex, actionContext.GetStripId(), m_BehaviorId, actionContext.GetStateId());
|
||||
}
|
||||
|
@ -4,5 +4,5 @@ RemoveActionsMessage::RemoveActionsMessage(AMFArrayValue* arguments) : BehaviorM
|
||||
actionContext = ActionContext(arguments);
|
||||
actionIndex = GetActionIndexFromArgument(arguments);
|
||||
|
||||
LOG_DEBUG("behaviorId %i actionIndex %i stripId %i stateId %i", behaviorId, actionIndex, actionContext.GetStripId(), actionContext.GetStateId());
|
||||
LOG_DEBUG("m_BehaviorId %i actionIndex %i stripId %i stateId %i", m_BehaviorId, actionIndex, actionContext.GetStripId(), actionContext.GetStateId());
|
||||
}
|
||||
|
@ -3,5 +3,5 @@
|
||||
RemoveStripMessage::RemoveStripMessage(AMFArrayValue* arguments) : BehaviorMessageBase(arguments) {
|
||||
actionContext = ActionContext(arguments);
|
||||
|
||||
LOG_DEBUG("stripId %i stateId %i behaviorId %i", actionContext.GetStripId(), actionContext.GetStateId(), behaviorId);
|
||||
LOG_DEBUG("stripId %i stateId %i m_BehaviorId %i", actionContext.GetStripId(), actionContext.GetStateId(), m_BehaviorId);
|
||||
}
|
||||
|
@ -5,5 +5,5 @@ RenameMessage::RenameMessage(AMFArrayValue* arguments) : BehaviorMessageBase(arg
|
||||
if (!nameAmf) return;
|
||||
|
||||
name = nameAmf->GetValue();
|
||||
LOG_DEBUG("behaviorId %i n %s", behaviorId, name.c_str());
|
||||
LOG_DEBUG("m_BehaviorId %i n %s", m_BehaviorId, name.c_str());
|
||||
}
|
||||
|
@ -7,5 +7,5 @@ SplitStripMessage::SplitStripMessage(AMFArrayValue* arguments) : BehaviorMessage
|
||||
destinationActionContext = ActionContext(arguments, "dstStateID", "dstStripID");
|
||||
destinationPosition = StripUiPosition(arguments, "dstStripUI");
|
||||
|
||||
LOG_DEBUG("behaviorId %i xPosition %f yPosition %f sourceStrip %i destinationStrip %i sourceState %i destinationState %i srcActindex %i", behaviorId, destinationPosition.GetX(), destinationPosition.GetY(), sourceActionContext.GetStripId(), destinationActionContext.GetStripId(), sourceActionContext.GetStateId(), destinationActionContext.GetStateId(), srcActionIndex);
|
||||
LOG_DEBUG("m_BehaviorId %i xPosition %f yPosition %f sourceStrip %i destinationStrip %i sourceState %i destinationState %i srcActindex %i", m_BehaviorId, destinationPosition.GetX(), destinationPosition.GetY(), sourceActionContext.GetStripId(), destinationActionContext.GetStripId(), sourceActionContext.GetStateId(), destinationActionContext.GetStateId(), srcActionIndex);
|
||||
}
|
||||
|
@ -11,5 +11,5 @@ UpdateActionMessage::UpdateActionMessage(AMFArrayValue* arguments) : BehaviorMes
|
||||
action = Action(actionValue);
|
||||
actionIndex = GetActionIndexFromArgument(arguments);
|
||||
|
||||
LOG_DEBUG("type %s valueParameterName %s valueParameterString %s valueParameterDouble %f behaviorId %i actionIndex %i stripId %i stateId %i", action.GetType().c_str(), action.GetValueParameterName().c_str(), action.GetValueParameterString().c_str(), action.GetValueParameterDouble(), behaviorId, actionIndex, actionContext.GetStripId(), actionContext.GetStateId());
|
||||
LOG_DEBUG("type %s valueParameterName %s valueParameterString %s valueParameterDouble %f m_BehaviorId %i actionIndex %i stripId %i stateId %i", action.GetType().c_str(), action.GetValueParameterName().c_str(), action.GetValueParameterString().c_str(), action.GetValueParameterDouble(), m_BehaviorId, actionIndex, actionContext.GetStripId(), actionContext.GetStateId());
|
||||
}
|
||||
|
@ -4,5 +4,5 @@ UpdateStripUiMessage::UpdateStripUiMessage(AMFArrayValue* arguments) : BehaviorM
|
||||
position = StripUiPosition(arguments);
|
||||
actionContext = ActionContext(arguments);
|
||||
|
||||
LOG_DEBUG("xPosition %f yPosition %f stripId %i stateId %i behaviorId %i", position.GetX(), position.GetY(), actionContext.GetStripId(), actionContext.GetStateId(), behaviorId);
|
||||
LOG_DEBUG("xPosition %f yPosition %f stripId %i stateId %i m_BehaviorId %i", position.GetX(), position.GetY(), actionContext.GetStripId(), actionContext.GetStateId(), m_BehaviorId);
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ void PropertyBehavior::HandleMsg(AddMessage& msg) {
|
||||
isLoot = m_BehaviorId != 7965;
|
||||
};
|
||||
|
||||
void PropertyBehavior::SetBehaviorId(int32_t behaviorId) {
|
||||
m_BehaviorId = behaviorId;
|
||||
void PropertyBehavior::SetBehaviorId(int32_t m_BehaviorId) {
|
||||
m_BehaviorId = m_BehaviorId;
|
||||
}
|
||||
|
||||
void PropertyBehavior::SendBehaviorListToClient(AMFArrayValue& args) const {
|
||||
|
Loading…
Reference in New Issue
Block a user