mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Implement some more trigger event calls and command handlers (#989)
* Implement some trigger event calls and command handlers * add zone summary dimissed GM * break and remove log * some cleanup in Gather Targets and blocking out * fix default value of unlock for play cinematic * Log on errors add enum for physics effect type simplify nipoint3 logic check arg count add enum for End behavior * tryparse for nipoint3 * totally didn't forget to include it * bleh c++ is blah * ??? * address feedback * Fix for #1028
This commit is contained in:
@@ -319,3 +319,7 @@ std::vector<std::string> GeneralUtils::GetSqlFileNamesFromFolder(const std::stri
|
||||
|
||||
return sortedFiles;
|
||||
}
|
||||
|
||||
bool GeneralUtils::TryParse(const std::string& x, const std::string& y, const std::string& z, NiPoint3& dst) {
|
||||
return TryParse<float>(x.c_str(), dst.x) && TryParse<float>(y.c_str(), dst.y) && TryParse<float>(z.c_str(), dst.z);
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
#include <BitStream.h>
|
||||
#include "NiPoint3.h"
|
||||
|
||||
#include "Game.h"
|
||||
#include "dLogger.h"
|
||||
@@ -208,6 +209,8 @@ namespace GeneralUtils {
|
||||
return TryParse<T>(value.c_str(), dst);
|
||||
}
|
||||
|
||||
bool TryParse(const std::string& x, const std::string& y, const std::string& z, NiPoint3& dst);
|
||||
|
||||
template<typename T>
|
||||
std::u16string to_u16string(T value) {
|
||||
return GeneralUtils::ASCIIToUTF16(std::to_string(value));
|
||||
|
@@ -128,6 +128,12 @@ NiPoint3 NiPoint3::operator+(const NiPoint3& point) const {
|
||||
return NiPoint3(this->x + point.x, this->y + point.y, this->z + point.z);
|
||||
}
|
||||
|
||||
//! Operator for addition of vectors
|
||||
NiPoint3 NiPoint3::operator+=(const NiPoint3& point) const {
|
||||
return NiPoint3(this->x + point.x, this->y + point.y, this->z + point.z);
|
||||
}
|
||||
|
||||
|
||||
//! Operator for subtraction of vectors
|
||||
NiPoint3 NiPoint3::operator-(const NiPoint3& point) const {
|
||||
return NiPoint3(this->x - point.x, this->y - point.y, this->z - point.z);
|
||||
|
@@ -135,6 +135,9 @@ public:
|
||||
//! Operator for addition of vectors
|
||||
NiPoint3 operator+(const NiPoint3& point) const;
|
||||
|
||||
//! Operator for addition of vectors
|
||||
NiPoint3 operator+=(const NiPoint3& point) const;
|
||||
|
||||
//! Operator for subtraction of vectors
|
||||
NiPoint3 operator-(const NiPoint3& point) const;
|
||||
|
||||
|
@@ -445,6 +445,7 @@ enum GAME_MSG : unsigned short {
|
||||
GAME_MSG_BBB_SAVE_RESPONSE = 1006,
|
||||
GAME_MSG_NOTIFY_CLIENT_OBJECT = 1042,
|
||||
GAME_MSG_DISPLAY_ZONE_SUMMARY = 1043,
|
||||
GAME_MSG_ZONE_SUMMARY_DISMISSED = 1044,
|
||||
GAME_MSG_ACTIVITY_STATE_CHANGE_REQUEST = 1053,
|
||||
GAME_MSG_MODIFY_PLAYER_ZONE_STATISTIC = 1046,
|
||||
GAME_MSG_START_BUILDING_WITH_ITEM = 1057,
|
||||
|
11
dCommon/dEnums/eEndBehavior.h
Normal file
11
dCommon/dEnums/eEndBehavior.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef __EENDBEHAVIOR__H__
|
||||
#define __EENDBEHAVIOR__H__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class eEndBehavior : uint32_t {
|
||||
RETURN,
|
||||
WAIT
|
||||
};
|
||||
|
||||
#endif //!__EENDBEHAVIOR__H__
|
15
dCommon/dEnums/ePhysicsEffectType.h
Normal file
15
dCommon/dEnums/ePhysicsEffectType.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef __EPHYSICSEFFECTTYPE__H__
|
||||
#define __EPHYSICSEFFECTTYPE__H__
|
||||
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class ePhysicsEffectType : uint32_t {
|
||||
PUSH,
|
||||
ATTRACT,
|
||||
REPULSE,
|
||||
GRAVITY_SCALE,
|
||||
FRICTION
|
||||
};
|
||||
|
||||
#endif //!__EPHYSICSEFFECTTYPE__H__
|
@@ -35,7 +35,7 @@ public:
|
||||
{"OnTimerDone", eTriggerEventType::TIMER_DONE},
|
||||
{"OnRebuildComplete", eTriggerEventType::REBUILD_COMPLETE},
|
||||
{"OnActivated", eTriggerEventType::ACTIVATED},
|
||||
{"OnDeactivated", eTriggerEventType::DEACTIVATED},
|
||||
{"OnDectivated", eTriggerEventType::DEACTIVATED}, // Dectivated vs Deactivated
|
||||
{"OnArrived", eTriggerEventType::ARRIVED},
|
||||
{"OnArrivedAtEndOfPath", eTriggerEventType::ARRIVED_AT_END_OF_PATH},
|
||||
{"OnZoneSummaryDismissed", eTriggerEventType::ZONE_SUMMARY_DISMISSED},
|
||||
|
Reference in New Issue
Block a user