mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-21 11:59:37 -06:00
Compare commits
2 Commits
item-compo
...
fix-crash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b541713c5d | ||
|
|
ce03feb11a |
37
.clang-format
Normal file
37
.clang-format
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: false
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: false
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
AfterExternBlock: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
SplitEmptyFunction: false
|
||||||
|
SplitEmptyRecord: false
|
||||||
|
SplitEmptyNamespace: false
|
||||||
|
BeforeLambdaBody: false
|
||||||
|
BeforeWhile: false
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
ColumnLimit: 0
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '<[[:alnum:].]+\.h>'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '<[[:alnum:].]+>'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '.*/.*'
|
||||||
|
Priority: 3
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 4
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
PointerAlignment: Left
|
||||||
|
...
|
||||||
17
.clang-tidy
Normal file
17
.clang-tidy
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Checks: '-*,readability-*,performance-*,modernize-*,-modernize-use-trailing-return-type,bugprone-*'
|
||||||
|
WarningsAsErrors: true
|
||||||
|
HeaderFilterRegex: ''
|
||||||
|
FormatStyle: none
|
||||||
|
CheckOptions:
|
||||||
|
- key: readability-identifier-naming.ClassCase
|
||||||
|
value: CamelCase
|
||||||
|
- key: readability-identifier-naming.ClassMethodCase
|
||||||
|
value: CamelCase
|
||||||
|
- key: readability-identifier-naming.ClassMemberPrefix
|
||||||
|
value: m_
|
||||||
|
- key: readability-identifier-naming.ClassMemberCase
|
||||||
|
value: CamelCase
|
||||||
|
- key: readability-identifier-naming.ClassConstantCase
|
||||||
|
value: UPPER_CASE
|
||||||
|
- key: readability-identifier-naming.FunctionCase
|
||||||
|
value: CamelCase
|
||||||
@@ -6,6 +6,3 @@
|
|||||||
|
|
||||||
# convert to unix line endings
|
# convert to unix line endings
|
||||||
72477e01e2711e0f61cdb192ee266e5e21b8846f
|
72477e01e2711e0f61cdb192ee266e5e21b8846f
|
||||||
|
|
||||||
# enum cleanup
|
|
||||||
faf42d2f8cf432df2993b031f079b0b8c6d7dbe7
|
|
||||||
|
|||||||
@@ -163,7 +163,6 @@ set(INCLUDED_DIRECTORIES
|
|||||||
"dGame/dMission"
|
"dGame/dMission"
|
||||||
"dGame/dEntity"
|
"dGame/dEntity"
|
||||||
"dGame/dPropertyBehaviors"
|
"dGame/dPropertyBehaviors"
|
||||||
"dGame/dPropertyBehaviors/ControlBehaviorMessages"
|
|
||||||
"dGame/dUtilities"
|
"dGame/dUtilities"
|
||||||
"dPhysics"
|
"dPhysics"
|
||||||
"dNavigation"
|
"dNavigation"
|
||||||
|
|||||||
@@ -172,10 +172,6 @@ You can either run `build.sh` when in the root folder of the repository:
|
|||||||
|
|
||||||
Or manually run the commands used in [build.sh](build.sh).
|
Or manually run the commands used in [build.sh](build.sh).
|
||||||
|
|
||||||
If you would like to build the server faster, append `-j<number>` where number is the number of simultaneous compile jobs to run at once. It is recommended that you have this number always be 1 less than your core count to prevent slowdowns. The command would look like this if you would build with 4 jobs at once:
|
|
||||||
```bash
|
|
||||||
./build.sh -j4
|
|
||||||
```
|
|
||||||
### Notes
|
### Notes
|
||||||
Depending on your operating system, you may need to adjust some pre-processor defines in [CMakeVariables.txt](./CMakeVariables.txt) before building:
|
Depending on your operating system, you may need to adjust some pre-processor defines in [CMakeVariables.txt](./CMakeVariables.txt) before building:
|
||||||
* If you are on MacOS, ensure OPENSSL_ROOT_DIR is pointing to the openssl root directory.
|
* If you are on MacOS, ensure OPENSSL_ROOT_DIR is pointing to the openssl root directory.
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -9,5 +9,5 @@ cd build
|
|||||||
cmake ..
|
cmake ..
|
||||||
|
|
||||||
# To build utilizing multiple cores, append `-j` and the amount of cores to utilize, for example `cmake --build . --config Release -j8'
|
# To build utilizing multiple cores, append `-j` and the amount of cores to utilize, for example `cmake --build . --config Release -j8'
|
||||||
cmake --build . --config Release $1
|
cmake --build . --config Release -j4
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#include "dServer.h"
|
#include "dServer.h"
|
||||||
#include "GeneralUtils.h"
|
#include "GeneralUtils.h"
|
||||||
#include "dLogger.h"
|
#include "dLogger.h"
|
||||||
#include "eAddFriendResponseCode.h"
|
#include "AddFriendResponseCode.h"
|
||||||
#include "eAddFriendResponseType.h"
|
#include "AddFriendResponseType.h"
|
||||||
#include "RakString.h"
|
#include "RakString.h"
|
||||||
#include "dConfig.h"
|
#include "dConfig.h"
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
|||||||
|
|
||||||
auto requestor = playerContainer.GetPlayerData(requestorPlayerID);
|
auto requestor = playerContainer.GetPlayerData(requestorPlayerID);
|
||||||
if (requestor->playerName == playerName) {
|
if (requestor->playerName == playerName) {
|
||||||
SendFriendResponse(requestor, requestor, eAddFriendResponseType::MYTHRAN);
|
SendFriendResponse(requestor, requestor, AddFriendResponseType::MYTHRAN);
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
std::unique_ptr<PlayerData> requestee(playerContainer.GetPlayerData(playerName));
|
std::unique_ptr<PlayerData> requestee(playerContainer.GetPlayerData(playerName));
|
||||||
@@ -153,7 +153,7 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
|||||||
requestee.reset(new PlayerData());
|
requestee.reset(new PlayerData());
|
||||||
requestee->playerName = playerName;
|
requestee->playerName = playerName;
|
||||||
|
|
||||||
SendFriendResponse(requestor, requestee.get(), result->next() ? eAddFriendResponseType::NOTONLINE : eAddFriendResponseType::INVALIDCHARACTER);
|
SendFriendResponse(requestor, requestee.get(), result->next() ? AddFriendResponseType::NOTONLINE : AddFriendResponseType::INVALIDCHARACTER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,10 +197,10 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
|||||||
if (oldBestFriendStatus != bestFriendStatus) {
|
if (oldBestFriendStatus != bestFriendStatus) {
|
||||||
if (requestee->countOfBestFriends >= maxNumberOfBestFriends || requestor->countOfBestFriends >= maxNumberOfBestFriends) {
|
if (requestee->countOfBestFriends >= maxNumberOfBestFriends || requestor->countOfBestFriends >= maxNumberOfBestFriends) {
|
||||||
if (requestee->countOfBestFriends >= maxNumberOfBestFriends) {
|
if (requestee->countOfBestFriends >= maxNumberOfBestFriends) {
|
||||||
SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::THEIRFRIENDLISTFULL, false);
|
SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::THEIRFRIENDLISTFULL, false);
|
||||||
}
|
}
|
||||||
if (requestor->countOfBestFriends >= maxNumberOfBestFriends) {
|
if (requestor->countOfBestFriends >= maxNumberOfBestFriends) {
|
||||||
SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::YOURFRIENDSLISTFULL, false);
|
SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::YOURFRIENDSLISTFULL, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Then update the database with this new info.
|
// Then update the database with this new info.
|
||||||
@@ -215,8 +215,8 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
|||||||
if (bestFriendStatus == 3U) {
|
if (bestFriendStatus == 3U) {
|
||||||
requestee->countOfBestFriends += 1;
|
requestee->countOfBestFriends += 1;
|
||||||
requestor->countOfBestFriends += 1;
|
requestor->countOfBestFriends += 1;
|
||||||
if (requestee->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestee.get(), requestor, eAddFriendResponseType::ACCEPTED, false, true);
|
if (requestee->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestee.get(), requestor, AddFriendResponseType::ACCEPTED, false, true);
|
||||||
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::ACCEPTED, false, true);
|
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::ACCEPTED, false, true);
|
||||||
for (auto& friendData : requestor->friends) {
|
for (auto& friendData : requestor->friends) {
|
||||||
if (friendData.friendID == requestee->playerID) {
|
if (friendData.friendID == requestee->playerID) {
|
||||||
friendData.isBestFriend = true;
|
friendData.isBestFriend = true;
|
||||||
@@ -230,7 +230,7 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::WAITINGAPPROVAL, true, true);
|
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::WAITINGAPPROVAL, true, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Do not send this if we are requesting to be a best friend.
|
// Do not send this if we are requesting to be a best friend.
|
||||||
@@ -247,7 +247,7 @@ void ChatPacketHandler::HandleFriendResponse(Packet* packet) {
|
|||||||
inStream.Read(playerID);
|
inStream.Read(playerID);
|
||||||
inStream.Read(playerID);
|
inStream.Read(playerID);
|
||||||
|
|
||||||
eAddFriendResponseCode clientResponseCode = static_cast<eAddFriendResponseCode>(packet->data[0x14]);
|
AddFriendResponseCode clientResponseCode = static_cast<AddFriendResponseCode>(packet->data[0x14]);
|
||||||
std::string friendName = PacketUtils::ReadString(0x15, packet, true);
|
std::string friendName = PacketUtils::ReadString(0x15, packet, true);
|
||||||
|
|
||||||
//Now to try and find both of these:
|
//Now to try and find both of these:
|
||||||
@@ -255,29 +255,29 @@ void ChatPacketHandler::HandleFriendResponse(Packet* packet) {
|
|||||||
auto requestee = playerContainer.GetPlayerData(friendName);
|
auto requestee = playerContainer.GetPlayerData(friendName);
|
||||||
if (!requestor || !requestee) return;
|
if (!requestor || !requestee) return;
|
||||||
|
|
||||||
eAddFriendResponseType serverResponseCode{};
|
AddFriendResponseType serverResponseCode{};
|
||||||
uint8_t isAlreadyBestFriends = 0U;
|
uint8_t isAlreadyBestFriends = 0U;
|
||||||
// We need to convert this response code to one we can actually send back to the client.
|
// We need to convert this response code to one we can actually send back to the client.
|
||||||
switch (clientResponseCode) {
|
switch (clientResponseCode) {
|
||||||
case eAddFriendResponseCode::ACCEPTED:
|
case AddFriendResponseCode::ACCEPTED:
|
||||||
serverResponseCode = eAddFriendResponseType::ACCEPTED;
|
serverResponseCode = AddFriendResponseType::ACCEPTED;
|
||||||
break;
|
break;
|
||||||
case eAddFriendResponseCode::BUSY:
|
case AddFriendResponseCode::BUSY:
|
||||||
serverResponseCode = eAddFriendResponseType::BUSY;
|
serverResponseCode = AddFriendResponseType::BUSY;
|
||||||
break;
|
break;
|
||||||
case eAddFriendResponseCode::CANCELLED:
|
case AddFriendResponseCode::CANCELLED:
|
||||||
serverResponseCode = eAddFriendResponseType::CANCELLED;
|
serverResponseCode = AddFriendResponseType::CANCELLED;
|
||||||
break;
|
break;
|
||||||
case eAddFriendResponseCode::REJECTED:
|
case AddFriendResponseCode::REJECTED:
|
||||||
serverResponseCode = eAddFriendResponseType::DECLINED;
|
serverResponseCode = AddFriendResponseType::DECLINED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now that we have handled the base cases, we need to check the other cases.
|
// Now that we have handled the base cases, we need to check the other cases.
|
||||||
if (serverResponseCode == eAddFriendResponseType::ACCEPTED) {
|
if (serverResponseCode == AddFriendResponseType::ACCEPTED) {
|
||||||
for (auto friendData : requestor->friends) {
|
for (auto friendData : requestor->friends) {
|
||||||
if (friendData.friendID == requestee->playerID) {
|
if (friendData.friendID == requestee->playerID) {
|
||||||
serverResponseCode = eAddFriendResponseType::ALREADYFRIEND;
|
serverResponseCode = AddFriendResponseType::ALREADYFRIEND;
|
||||||
if (friendData.isBestFriend) {
|
if (friendData.isBestFriend) {
|
||||||
isAlreadyBestFriends = 1U;
|
isAlreadyBestFriends = 1U;
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,7 @@ void ChatPacketHandler::HandleFriendResponse(Packet* packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This message is NOT sent for best friends and is handled differently for those requests.
|
// This message is NOT sent for best friends and is handled differently for those requests.
|
||||||
if (serverResponseCode == eAddFriendResponseType::ACCEPTED) {
|
if (serverResponseCode == AddFriendResponseType::ACCEPTED) {
|
||||||
// Add the each player to the others friend list.
|
// Add the each player to the others friend list.
|
||||||
FriendData requestorData;
|
FriendData requestorData;
|
||||||
requestorData.zoneID = requestor->zoneID;
|
requestorData.zoneID = requestor->zoneID;
|
||||||
@@ -313,8 +313,8 @@ void ChatPacketHandler::HandleFriendResponse(Packet* packet) {
|
|||||||
statement->execute();
|
statement->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serverResponseCode != eAddFriendResponseType::DECLINED) SendFriendResponse(requestor, requestee, serverResponseCode, isAlreadyBestFriends);
|
if (serverResponseCode != AddFriendResponseType::DECLINED) SendFriendResponse(requestor, requestee, serverResponseCode, isAlreadyBestFriends);
|
||||||
if (serverResponseCode != eAddFriendResponseType::ALREADYFRIEND) SendFriendResponse(requestee, requestor, serverResponseCode, isAlreadyBestFriends);
|
if (serverResponseCode != AddFriendResponseType::ALREADYFRIEND) SendFriendResponse(requestee, requestor, serverResponseCode, isAlreadyBestFriends);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatPacketHandler::HandleRemoveFriend(Packet* packet) {
|
void ChatPacketHandler::HandleRemoveFriend(Packet* packet) {
|
||||||
@@ -922,7 +922,7 @@ void ChatPacketHandler::SendFriendRequest(PlayerData* receiver, PlayerData* send
|
|||||||
//Make sure people aren't requesting people that they're already friends with:
|
//Make sure people aren't requesting people that they're already friends with:
|
||||||
for (auto fr : receiver->friends) {
|
for (auto fr : receiver->friends) {
|
||||||
if (fr.friendID == sender->playerID) {
|
if (fr.friendID == sender->playerID) {
|
||||||
SendFriendResponse(sender, receiver, eAddFriendResponseType::ALREADYFRIEND, fr.isBestFriend);
|
SendFriendResponse(sender, receiver, AddFriendResponseType::ALREADYFRIEND, fr.isBestFriend);
|
||||||
return; //we have this player as a friend, yeet this function so it doesn't send another request.
|
return; //we have this player as a friend, yeet this function so it doesn't send another request.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -940,7 +940,7 @@ void ChatPacketHandler::SendFriendRequest(PlayerData* receiver, PlayerData* send
|
|||||||
SEND_PACKET;
|
SEND_PACKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatPacketHandler::SendFriendResponse(PlayerData* receiver, PlayerData* sender, eAddFriendResponseType responseCode, uint8_t isBestFriendsAlready, uint8_t isBestFriendRequest) {
|
void ChatPacketHandler::SendFriendResponse(PlayerData* receiver, PlayerData* sender, AddFriendResponseType responseCode, uint8_t isBestFriendsAlready, uint8_t isBestFriendRequest) {
|
||||||
if (!receiver || !sender) return;
|
if (!receiver || !sender) return;
|
||||||
|
|
||||||
CBITSTREAM;
|
CBITSTREAM;
|
||||||
@@ -951,11 +951,11 @@ void ChatPacketHandler::SendFriendResponse(PlayerData* receiver, PlayerData* sen
|
|||||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_ADD_FRIEND_RESPONSE);
|
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_ADD_FRIEND_RESPONSE);
|
||||||
bitStream.Write(responseCode);
|
bitStream.Write(responseCode);
|
||||||
// For all requests besides accepted, write a flag that says whether or not we are already best friends with the receiver.
|
// For all requests besides accepted, write a flag that says whether or not we are already best friends with the receiver.
|
||||||
bitStream.Write<uint8_t>(responseCode != eAddFriendResponseType::ACCEPTED ? isBestFriendsAlready : sender->sysAddr != UNASSIGNED_SYSTEM_ADDRESS);
|
bitStream.Write<uint8_t>(responseCode != AddFriendResponseType::ACCEPTED ? isBestFriendsAlready : sender->sysAddr != UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
// Then write the player name
|
// Then write the player name
|
||||||
PacketUtils::WritePacketWString(sender->playerName.c_str(), 33, &bitStream);
|
PacketUtils::WritePacketWString(sender->playerName.c_str(), 33, &bitStream);
|
||||||
// Then if this is an acceptance code, write the following extra info.
|
// Then if this is an acceptance code, write the following extra info.
|
||||||
if (responseCode == eAddFriendResponseType::ACCEPTED) {
|
if (responseCode == AddFriendResponseType::ACCEPTED) {
|
||||||
bitStream.Write(sender->playerID);
|
bitStream.Write(sender->playerID);
|
||||||
bitStream.Write(sender->zoneID);
|
bitStream.Write(sender->zoneID);
|
||||||
bitStream.Write(isBestFriendRequest); //isBFF
|
bitStream.Write(isBestFriendRequest); //isBFF
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "BitStream.h"
|
#include "BitStream.h"
|
||||||
|
|
||||||
struct PlayerData;
|
struct PlayerData;
|
||||||
enum class eAddFriendResponseType : uint8_t;
|
enum class AddFriendResponseType : uint8_t;
|
||||||
|
|
||||||
namespace ChatPacketHandler {
|
namespace ChatPacketHandler {
|
||||||
void HandleFriendlistRequest(Packet* packet);
|
void HandleFriendlistRequest(Packet* packet);
|
||||||
@@ -35,6 +35,6 @@ namespace ChatPacketHandler {
|
|||||||
void SendFriendUpdate(PlayerData* friendData, PlayerData* playerData, uint8_t notifyType, uint8_t isBestFriend);
|
void SendFriendUpdate(PlayerData* friendData, PlayerData* playerData, uint8_t notifyType, uint8_t isBestFriend);
|
||||||
|
|
||||||
void SendFriendRequest(PlayerData* receiver, PlayerData* sender);
|
void SendFriendRequest(PlayerData* receiver, PlayerData* sender);
|
||||||
void SendFriendResponse(PlayerData* receiver, PlayerData* sender, eAddFriendResponseType responseCode, uint8_t isBestFriendsAlready = 0U, uint8_t isBestFriendRequest = 0U);
|
void SendFriendResponse(PlayerData* receiver, PlayerData* sender, AddFriendResponseType responseCode, uint8_t isBestFriendsAlready = 0U, uint8_t isBestFriendRequest = 0U);
|
||||||
void SendRemoveFriend(PlayerData* receiver, std::string& personToRemove, bool isSuccessful);
|
void SendRemoveFriend(PlayerData* receiver, std::string& personToRemove, bool isSuccessful);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ private:
|
|||||||
/*!
|
/*!
|
||||||
\return The AMF value type
|
\return The AMF value type
|
||||||
*/
|
*/
|
||||||
AMFValueType GetValueType() override { return ValueType; }
|
AMFValueType GetValueType() { return ValueType; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const AMFValueType ValueType = AMFArray;
|
static const AMFValueType ValueType = AMFArray;
|
||||||
@@ -362,7 +362,7 @@ private:
|
|||||||
/*!
|
/*!
|
||||||
\return The AMF value type
|
\return The AMF value type
|
||||||
*/
|
*/
|
||||||
AMFValueType GetValueType() override { return ValueType; }
|
AMFValueType GetValueType() { return ValueType; }
|
||||||
~AMFObjectValue() override;
|
~AMFObjectValue() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
#include "dLogger.h"
|
#include "dLogger.h"
|
||||||
|
|
||||||
enum eInventoryType : uint32_t;
|
enum eInventoryType : uint32_t;
|
||||||
enum class eReplicaComponentType : uint32_t;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file GeneralUtils.hpp
|
\file GeneralUtils.hpp
|
||||||
@@ -182,11 +181,6 @@ namespace GeneralUtils {
|
|||||||
return static_cast<eInventoryType>(std::stoul(value));
|
return static_cast<eInventoryType>(std::stoul(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
inline eReplicaComponentType Parse(const char* value) {
|
|
||||||
return static_cast<eReplicaComponentType>(std::stoul(value));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool TryParse(const char* value, T& dst) {
|
bool TryParse(const char* value, T& dst) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef __EADDFRIENDRESPONSECODE__H__
|
#ifndef __ADDFRIENDRESPONSECODE__H__
|
||||||
#define __EADDFRIENDRESPONSECODE__H__
|
#define __ADDFRIENDRESPONSECODE__H__
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
enum class eAddFriendResponseCode : uint8_t {
|
enum class AddFriendResponseCode : uint8_t {
|
||||||
ACCEPTED = 0,
|
ACCEPTED = 0,
|
||||||
REJECTED,
|
REJECTED,
|
||||||
BUSY,
|
BUSY,
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef __EADDFRIENDRESPONSETYPE__H__
|
#ifndef __ADDFRIENDRESPONSETYPE__H__
|
||||||
#define __EADDFRIENDRESPONSETYPE__H__
|
#define __ADDFRIENDRESPONSETYPE__H__
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
enum class eAddFriendResponseType : uint8_t {
|
enum class AddFriendResponseType : uint8_t {
|
||||||
ACCEPTED = 0,
|
ACCEPTED = 0,
|
||||||
ALREADYFRIEND,
|
ALREADYFRIEND,
|
||||||
INVALIDCHARACTER,
|
INVALIDCHARACTER,
|
||||||
@@ -21,4 +21,4 @@ enum class eAddFriendResponseType : uint8_t {
|
|||||||
FRIENDISFREETRIAL
|
FRIENDISFREETRIAL
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //!__EADDFRIENDRESPONSETYPE__H__
|
#endif //!__ADDFRIENDRESPONSETYPE__H__
|
||||||
105
dCommon/dEnums/ItemSetPassiveAbilityID.h
Normal file
105
dCommon/dEnums/ItemSetPassiveAbilityID.h
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
2 Engineer (Rank 1) Item Set
|
||||||
|
3 Engineer (Rank 2) Item Set
|
||||||
|
4 Engineer (Rank 3) Item Set
|
||||||
|
7 Knight (Rank 1) Item Set
|
||||||
|
8 Knight (Rank 2) Item Set
|
||||||
|
9 Knight (Rank 3) Item Set
|
||||||
|
10 Space Ranger (Rank 1) Item Set
|
||||||
|
11 Space Ranger (Rank 2) Item Set
|
||||||
|
12 Space Ranger (Rank 3) Item Set
|
||||||
|
13 Samurai (Rank 1) Item Set
|
||||||
|
14 Samurai (Rank 2) Item Set
|
||||||
|
15 Samurai (Rank 3) Item Set
|
||||||
|
16 Sorcerer (Rank 1) Item Set
|
||||||
|
17 Sorcerer (Rank 2) Item Set
|
||||||
|
18 Sorcerer (Rank 3) Item Set
|
||||||
|
19 Space Marauder (Rank 1) Item Set
|
||||||
|
20 Space Marauder (Rank 2) Item Set
|
||||||
|
21 Space Marauder (Rank 3) Item Set
|
||||||
|
22 Shinobi (Rank 1) Item Set
|
||||||
|
23 Shinobi (Rank 2) Item Set
|
||||||
|
24 Shinobi (Rank 3) Item Set
|
||||||
|
25 Inventor (Rank 1) Item Set
|
||||||
|
26 Inventor (Rank 2) Item Set
|
||||||
|
27 Inventor (Rank 3) Item Set
|
||||||
|
28 Summoner (Rank 1) Item Set
|
||||||
|
29 Summoner (Rank 2) Item Set
|
||||||
|
30 Summoner (Rank 3) Item Set
|
||||||
|
31 Adventurer (Rank 1) Item Set
|
||||||
|
32 Adventurer (Rank 2) Item Set
|
||||||
|
33 Adventurer (Rank 3) Item Set
|
||||||
|
34 Daredevil (Rank 1) Item Set
|
||||||
|
35 Daredevil (Rank 2) Item Set
|
||||||
|
36 Daredevil (Rank 3) Item Set
|
||||||
|
37 Buccaneer (Rank 1) Item Set
|
||||||
|
38 Buccaneer (Rank 2) Item Set
|
||||||
|
39 Buccaneer (Rank 3) Item Set
|
||||||
|
40 Bone Suit Item Set
|
||||||
|
41 Imagination Spinjitzu Item Set
|
||||||
|
42 Bat Lord Item Set
|
||||||
|
43 Mosaic Jester Item Set
|
||||||
|
44 Explorien Bot Item Set
|
||||||
|
45 [Unnamed] Item Set
|
||||||
|
46 [Unnamed] Item Set
|
||||||
|
47 [Unnamed] Item Set
|
||||||
|
48 Earth Spinjitzu Item Set
|
||||||
|
49 [Unnamed] Item Set
|
||||||
|
50 Fire Spinjitzu Item Set
|
||||||
|
51 Ice Spinjitzu Item Set
|
||||||
|
52 Lightning Spinjitzu Item Set
|
||||||
|
*/
|
||||||
|
enum class ItemSetPassiveAbilityID
|
||||||
|
{
|
||||||
|
EngineerRank1 = 2,
|
||||||
|
EngineerRank2 = 3,
|
||||||
|
EngineerRank3 = 4,
|
||||||
|
KnightRank1 = 7,
|
||||||
|
KnightRank2 = 8,
|
||||||
|
KnightRank3 = 9,
|
||||||
|
SpaceRangerRank1 = 10,
|
||||||
|
SpaceRangerRank2 = 11,
|
||||||
|
SpaceRangerRank3 = 12,
|
||||||
|
SamuraiRank1 = 13,
|
||||||
|
SamuraiRank2 = 14,
|
||||||
|
SamuraiRank3 = 15,
|
||||||
|
SorcererRank1 = 16,
|
||||||
|
SorcererRank2 = 17,
|
||||||
|
SorcererRank3 = 18,
|
||||||
|
SpaceMarauderRank1 = 19,
|
||||||
|
SpaceMarauderRank2 = 20,
|
||||||
|
SpaceMarauderRank3 = 21,
|
||||||
|
ShinobiRank1 = 22,
|
||||||
|
ShinobiRank2 = 23,
|
||||||
|
ShinobiRank3 = 24,
|
||||||
|
InventorRank1 = 25,
|
||||||
|
InventorRank2 = 26,
|
||||||
|
InventorRank3 = 27,
|
||||||
|
SummonerRank1 = 28,
|
||||||
|
SummonerRank2 = 29,
|
||||||
|
SummonerRank3 = 30,
|
||||||
|
AdventurerRank1 = 31,
|
||||||
|
AdventurerRank2 = 32,
|
||||||
|
AdventurerRank3 = 33,
|
||||||
|
DaredevilRank1 = 34,
|
||||||
|
DaredevilRank2 = 35,
|
||||||
|
DaredevilRank3 = 36,
|
||||||
|
BuccaneerRank1 = 37,
|
||||||
|
BuccaneerRank2 = 38,
|
||||||
|
BuccaneerRank3 = 39,
|
||||||
|
BoneSuit = 40,
|
||||||
|
ImaginationSpinjitzu = 41,
|
||||||
|
BatLord = 42,
|
||||||
|
MosaicJester = 43,
|
||||||
|
ExplorienBot = 44,
|
||||||
|
Unnamed1 = 45,
|
||||||
|
Unnamed2 = 46,
|
||||||
|
Unnamed3 = 47,
|
||||||
|
EarthSpinjitzu = 48,
|
||||||
|
Unnamed4 = 49,
|
||||||
|
FireSpinjitzu = 50,
|
||||||
|
IceSpinjitzu = 51,
|
||||||
|
LightningSpinjitzu = 52
|
||||||
|
};
|
||||||
13
dCommon/dEnums/MissionLockState.h
Normal file
13
dCommon/dEnums/MissionLockState.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef MISSIONLOCKSTATE_H
|
||||||
|
#define MISSIONLOCKSTATE_H
|
||||||
|
|
||||||
|
enum class MissionLockState : int
|
||||||
|
{
|
||||||
|
MISSION_LOCK_LOCKED,
|
||||||
|
MISSION_LOCK_NEW,
|
||||||
|
MISSION_LOCK_UNLOCKED,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
56
dCommon/dEnums/MissionState.h
Normal file
56
dCommon/dEnums/MissionState.h
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef __MISSIONSTATE__H__
|
||||||
|
#define __MISSIONSTATE__H__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the possible states a mission can be in
|
||||||
|
*/
|
||||||
|
enum class MissionState : int32_t {
|
||||||
|
/**
|
||||||
|
* The mission state is unknown
|
||||||
|
*/
|
||||||
|
MISSION_STATE_UNKNOWN = -1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission is yielding rewards
|
||||||
|
*/
|
||||||
|
MISSION_STATE_REWARDING = 0,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission can be accepted
|
||||||
|
*/
|
||||||
|
MISSION_STATE_AVAILABLE = 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission has been accepted but not yet completed
|
||||||
|
*/
|
||||||
|
MISSION_STATE_ACTIVE = 2,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All the tasks for the mission have been completed and the entity can turn the mission in to complete it
|
||||||
|
*/
|
||||||
|
MISSION_STATE_READY_TO_COMPLETE = 4, //!< The mission is ready to complete
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission has been completed
|
||||||
|
*/
|
||||||
|
MISSION_STATE_COMPLETE = 8,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission is available again and has been completed before. Used for daily missions.
|
||||||
|
*/
|
||||||
|
MISSION_STATE_COMPLETE_AVAILABLE = 9,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission is active and has been completed before. Used for daily missions.
|
||||||
|
*/
|
||||||
|
MISSION_STATE_COMPLETE_ACTIVE = 10,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mission has been completed before and has now been completed again. Used for daily missions.
|
||||||
|
*/
|
||||||
|
MISSION_STATE_COMPLETE_READY_TO_COMPLETE = 12
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //!__MISSIONSTATE__H__
|
||||||
31
dCommon/dEnums/MissionTaskType.h
Normal file
31
dCommon/dEnums/MissionTaskType.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef MISSIONTASKTYPE_H
|
||||||
|
#define MISSIONTASKTYPE_H
|
||||||
|
|
||||||
|
//! An enum for mission task types
|
||||||
|
enum class MissionTaskType : int {
|
||||||
|
MISSION_TASK_TYPE_UNKNOWN = -1, //!< The task type is unknown
|
||||||
|
MISSION_TASK_TYPE_SMASH = 0, //!< A task for smashing something
|
||||||
|
MISSION_TASK_TYPE_SCRIPT = 1, //!< A task handled by a server LUA script
|
||||||
|
MISSION_TASK_TYPE_ACTIVITY = 2, //!< A task for completing a quickbuild
|
||||||
|
MISSION_TASK_TYPE_ENVIRONMENT = 3, //!< A task for something in the environment
|
||||||
|
MISSION_TASK_TYPE_MISSION_INTERACTION = 4, //!< A task for interacting with a mission
|
||||||
|
MISSION_TASK_TYPE_EMOTE = 5, //!< A task for playing an emote
|
||||||
|
MISSION_TASK_TYPE_FOOD = 9, //!< A task for eating food
|
||||||
|
MISSION_TASK_TYPE_SKILL = 10, //!< A task for performing a skill
|
||||||
|
MISSION_TASK_TYPE_ITEM_COLLECTION = 11, //!< A task for collecting an item
|
||||||
|
MISSION_TASK_TYPE_LOCATION = 12, //!< A task for finding a location
|
||||||
|
MISSION_TASK_TYPE_MINIGAME = 14, //!< A task for doing something in a minigame
|
||||||
|
MISSION_TASK_TYPE_NON_MISSION_INTERACTION = 15, //!< A task for interacting with a non-mission
|
||||||
|
MISSION_TASK_TYPE_MISSION_COMPLETE = 16, //!< A task for completing a mission
|
||||||
|
MISSION_TASK_TYPE_EARN_REPUTATION = 17, //!< A task for earning reputation
|
||||||
|
MISSION_TASK_TYPE_POWERUP = 21, //!< A task for collecting a powerup
|
||||||
|
MISSION_TASK_TYPE_PET_TAMING = 22, //!< A task for taming a pet
|
||||||
|
MISSION_TASK_TYPE_RACING = 23, //!< A task for racing
|
||||||
|
MISSION_TASK_TYPE_PLAYER_FLAG = 24, //!< A task for setting a player flag
|
||||||
|
MISSION_TASK_TYPE_PLACE_MODEL = 25, //!< A task for picking up a model
|
||||||
|
MISSION_TASK_TYPE_VISIT_PROPERTY = 30 //!< A task for visiting a property
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
42
dCommon/dEnums/PermissionMap.h
Normal file
42
dCommon/dEnums/PermissionMap.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bitmap of permissions and restrictions for characters.
|
||||||
|
*/
|
||||||
|
enum class PermissionMap : uint64_t
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Reserved for future use, bit 0-3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The character has restricted trade acccess, bit 4.
|
||||||
|
*/
|
||||||
|
RestrictedTradeAccess = 0x1 << 4,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The character has restricted mail access, bit 5.
|
||||||
|
*/
|
||||||
|
RestrictedMailAccess = 0x1 << 5,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The character has restricted chat access, bit 6.
|
||||||
|
*/
|
||||||
|
RestrictedChatAccess = 0x1 << 6,
|
||||||
|
|
||||||
|
//
|
||||||
|
// Combined permissions
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The character is marked as 'old', restricted from trade and mail.
|
||||||
|
*/
|
||||||
|
Old = RestrictedTradeAccess | RestrictedMailAccess,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The character is soft banned, restricted from trade, mail, and chat.
|
||||||
|
*/
|
||||||
|
SoftBanned = RestrictedTradeAccess | RestrictedMailAccess | RestrictedChatAccess,
|
||||||
|
};
|
||||||
20
dCommon/dEnums/RacingTaskParam.h
Normal file
20
dCommon/dEnums/RacingTaskParam.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
enum class RacingTaskParam : int32_t {
|
||||||
|
RACING_TASK_PARAM_FINISH_WITH_PLACEMENT = 1, //<! A task param for finishing with a specific placement.
|
||||||
|
RACING_TASK_PARAM_LAP_TIME = 2, //<! A task param for finishing with a specific lap time.
|
||||||
|
RACING_TASK_PARAM_TOTAL_TRACK_TIME = 3, //<! A task param for finishing with a specific track time.
|
||||||
|
RACING_TASK_PARAM_COMPLETE_ANY_RACING_TASK = 4, //<! A task param for completing a racing task.
|
||||||
|
RACING_TASK_PARAM_COMPLETE_TRACK_TASKS = 5, //<! A task param for completing a task for a specific track.
|
||||||
|
RACING_TASK_PARAM_MODULAR_BUILDING = 6, //<! A task param for modular building with racing builds.
|
||||||
|
RACING_TASK_PARAM_SAFE_DRIVER = 10, //<! A task param for completing a race without smashing.
|
||||||
|
RACING_TASK_PARAM_SMASHABLES = 11, //<! A task param for smashing entities during a race.
|
||||||
|
RACING_TASK_PARAM_COLLECT_IMAGINATION = 12, //<! A task param for collecting imagination during a race.
|
||||||
|
RACING_TASK_PARAM_COMPETED_IN_RACE = 13, //<! A task param for competing in a race.
|
||||||
|
RACING_TASK_PARAM_WIN_RACE_IN_WORLD = 14, //<! A task param for winning a race in a specific world.
|
||||||
|
RACING_TASK_PARAM_FIRST_PLACE_MULTIPLE_TRACKS = 15, //<! A task param for finishing in first place on multiple tracks.
|
||||||
|
RACING_TASK_PARAM_LAST_PLACE_FINISH = 16, //<! A task param for finishing in last place.
|
||||||
|
RACING_TASK_PARAM_SMASH_SPECIFIC_SMASHABLE = 17 //<! A task param for smashing dragon eggs during a race.
|
||||||
|
};
|
||||||
@@ -43,7 +43,8 @@ typedef uint32_t LWOCLONEID; //!< Used for Clone IDs
|
|||||||
typedef uint16_t LWOMAPID; //!< Used for Map IDs
|
typedef uint16_t LWOMAPID; //!< Used for Map IDs
|
||||||
typedef uint16_t LWOINSTANCEID; //!< Used for Instance IDs
|
typedef uint16_t LWOINSTANCEID; //!< Used for Instance IDs
|
||||||
typedef uint32_t PROPERTYCLONELIST; //!< Used for Property Clone IDs
|
typedef uint32_t PROPERTYCLONELIST; //!< Used for Property Clone IDs
|
||||||
typedef uint32_t StripId;
|
typedef uint32_t STRIPID;
|
||||||
|
typedef uint32_t BEHAVIORSTATE;
|
||||||
|
|
||||||
typedef int32_t PetTamingPiece; //!< Pet Taming Pieces
|
typedef int32_t PetTamingPiece; //!< Pet Taming Pieces
|
||||||
|
|
||||||
@@ -64,6 +65,11 @@ typedef std::set<LWOOBJID> TSetObjID;
|
|||||||
|
|
||||||
const float PI = 3.14159f;
|
const float PI = 3.14159f;
|
||||||
|
|
||||||
|
#if defined(__unix) || defined(__APPLE__)
|
||||||
|
//For Linux:
|
||||||
|
typedef __int64_t __int64;
|
||||||
|
#endif
|
||||||
|
|
||||||
//============ STRUCTS ==============
|
//============ STRUCTS ==============
|
||||||
|
|
||||||
struct LWOSCENEID {
|
struct LWOSCENEID {
|
||||||
@@ -256,6 +262,20 @@ enum eReplicaPacketType {
|
|||||||
PACKET_TYPE_DESTRUCTION //!< A destruction packet
|
PACKET_TYPE_DESTRUCTION //!< A destruction packet
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ServerDisconnectIdentifiers {
|
||||||
|
SERVER_DISCON_UNKNOWN_SERVER_ERROR = 0, //!< Unknown server error
|
||||||
|
SERVER_DISCON_DUPLICATE_LOGIN = 4, //!< Used when another user with the same username is logged in (duplicate login)
|
||||||
|
SERVER_DISCON_SERVER_SHUTDOWN = 5, //!< Used when the server is shutdown
|
||||||
|
SERVER_DISCON_SERVER_MAP_LOAD_FAILURE = 6, //!< Used when the server cannot load a map
|
||||||
|
SERVER_DISCON_INVALID_SESSION_KEY = 7, //!< Used if the session is invalid
|
||||||
|
SERVER_DISCON_ACCOUNT_NOT_IN_PENDING_LIST = 8, //!< ???
|
||||||
|
SERVER_DISCON_CHARACTER_NOT_FOUND = 9, //!< Used if a character that the server has is not found (i.e, corruption with user-player data)
|
||||||
|
SERVER_DISCON_CHARACTER_CORRUPTED = 10, //!< Similar to abovce
|
||||||
|
SERVER_DISCON_KICK = 11, //!< Used if the user is kicked from the server
|
||||||
|
SERVER_DISCON_FREE_TRIAL_EXPIRED = 12, //!< Used if the user's free trial expired
|
||||||
|
SERVER_DISCON_PLAY_SCHEDULE_TIME_DONE = 13 //!< Used if the user's play time is used up
|
||||||
|
};
|
||||||
|
|
||||||
//! The Behavior Types for use with the AI system
|
//! The Behavior Types for use with the AI system
|
||||||
enum eCombatBehaviorTypes : uint32_t {
|
enum eCombatBehaviorTypes : uint32_t {
|
||||||
PASSIVE = 0, //!< The object is passive
|
PASSIVE = 0, //!< The object is passive
|
||||||
@@ -360,6 +380,56 @@ enum eNotifyType {
|
|||||||
NOTIFY_TYPE_NAMINGPET
|
NOTIFY_TYPE_NAMINGPET
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum eReplicaComponentType : int32_t {
|
||||||
|
COMPONENT_TYPE_CONTROLLABLE_PHYSICS = 1, //!< The ControllablePhysics Component
|
||||||
|
COMPONENT_TYPE_RENDER = 2, //!< The Render Component
|
||||||
|
COMPONENT_TYPE_SIMPLE_PHYSICS = 3, //!< The SimplePhysics Component
|
||||||
|
COMPONENT_TYPE_CHARACTER = 4, //!< The Character Component
|
||||||
|
COMPONENT_TYPE_SCRIPT = 5, //!< The Script Component
|
||||||
|
COMPONENT_TYPE_BOUNCER = 6, //!< The Bouncer Component
|
||||||
|
COMPONENT_TYPE_BUFF = 7, //!< The Buff Component
|
||||||
|
COMPONENT_TYPE_SKILL = 9, //!< The Skill Component
|
||||||
|
COMPONENT_TYPE_ITEM = 11, //!< The Item Component
|
||||||
|
COMPONENT_TYPE_VENDOR = 16, //!< The Vendor Component
|
||||||
|
COMPONENT_TYPE_INVENTORY = 17, //!< The Inventory Component
|
||||||
|
COMPONENT_TYPE_SHOOTING_GALLERY = 19, //!< The Shooting Gallery Component
|
||||||
|
COMPONENT_TYPE_RIGID_BODY_PHANTOM_PHYSICS = 20, //!< The RigidBodyPhantomPhysics Component
|
||||||
|
COMPONENT_TYPE_COLLECTIBLE = 23, //!< The Collectible Component
|
||||||
|
COMPONENT_TYPE_MOVING_PLATFORM = 25, //!< The MovingPlatform Component
|
||||||
|
COMPONENT_TYPE_PET = 26, //!< The Pet Component
|
||||||
|
COMPONENT_TYPE_VEHICLE_PHYSICS = 30, //!< The VehiclePhysics Component
|
||||||
|
COMPONENT_TYPE_MOVEMENT_AI = 31, //!< The MovementAI Component
|
||||||
|
COMPONENT_TYPE_PROPERTY = 36, //!< The Property Component
|
||||||
|
COMPONENT_TYPE_SCRIPTED_ACTIVITY = 39, //!< The ScriptedActivity Component
|
||||||
|
COMPONENT_TYPE_PHANTOM_PHYSICS = 40, //!< The PhantomPhysics Component
|
||||||
|
COMPONENT_TYPE_MODEL = 42, //!< The Model Component
|
||||||
|
COMPONENT_TYPE_PROPERTY_ENTRANCE = 43, //!< The PhantomPhysics Component
|
||||||
|
COMPONENT_TYPE_PROPERTY_MANAGEMENT = 45, //!< The PropertyManagement Component
|
||||||
|
COMPONENT_TYPE_REBUILD = 48, //!< The Rebuild Component
|
||||||
|
COMPONENT_TYPE_SWITCH = 49, //!< The Switch Component
|
||||||
|
COMPONENT_TYPE_ZONE_CONTROL = 50, //!< The ZoneControl Component
|
||||||
|
COMPONENT_TYPE_PACKAGE = 53, //!< The Package Component
|
||||||
|
COMPONENT_TYPE_PLAYER_FLAG = 58, //!< The PlayerFlag Component
|
||||||
|
COMPONENT_TYPE_BASE_COMBAT_AI = 60, //!< The BaseCombatAI Component
|
||||||
|
COMPONENT_TYPE_MODULE_ASSEMBLY = 61, //!< The ModuleAssembly Component
|
||||||
|
COMPONENT_TYPE_PROPERTY_VENDOR = 65, //!< The PropertyVendor Component
|
||||||
|
COMPONENT_TYPE_ROCKET_LAUNCH = 67, //!< The RocketLaunch Component
|
||||||
|
COMPONENT_TYPE_RACING_CONTROL = 71, //!< The RacingControl Component
|
||||||
|
COMPONENT_TYPE_MISSION_OFFER = 73, //!< The MissionOffer Component
|
||||||
|
COMPONENT_TYPE_EXHIBIT = 75, //!< The Exhibit Component
|
||||||
|
COMPONENT_TYPE_RACING_STATS = 74, //!< The Racing Stats Component
|
||||||
|
COMPONENT_TYPE_SOUND_TRIGGER = 77, //!< The Sound Trigger Component
|
||||||
|
COMPONENT_TYPE_PROXIMITY_MONITOR = 78, //!< The Proximity Monitor Component
|
||||||
|
COMPONENT_TYPE_MISSION = 84, //!< The Mission Component
|
||||||
|
COMPONENT_TYPE_ROCKET_LAUNCH_LUP = 97, //!< The LUP Launchpad Componen
|
||||||
|
COMPONENT_TYPE_RAIL_ACTIVATOR = 104, //!< The Rail Activator Component
|
||||||
|
COMPONENT_TYPE_PLAYER_FORCED_MOVEMENT = 106, //!< The Player Forced Movement Component
|
||||||
|
COMPONENT_TYPE_POSSESSABLE = 108, //!< The Possessable Component
|
||||||
|
COMPONENT_TYPE_LEVEL_PROGRESSION = 109, //!< The Level Progression Component
|
||||||
|
COMPONENT_TYPE_POSSESSOR = 110, //!< The Possessor Component
|
||||||
|
COMPONENT_TYPE_BUILD_BORDER = 114, //!< The Build Border Component
|
||||||
|
COMPONENT_TYPE_DESTROYABLE = 1000, //!< The Destroyable Component
|
||||||
|
};
|
||||||
|
|
||||||
enum class UseItemResponse : uint32_t {
|
enum class UseItemResponse : uint32_t {
|
||||||
NoImaginationForPet = 1,
|
NoImaginationForPet = 1,
|
||||||
|
|||||||
@@ -546,8 +546,6 @@ enum GAME_MSG : unsigned short {
|
|||||||
GAME_MSG_REMOVE_RUN_SPEED_MODIFIER = 1506,
|
GAME_MSG_REMOVE_RUN_SPEED_MODIFIER = 1506,
|
||||||
GAME_MSG_UPDATE_PROPERTY_PERFORMANCE_COST = 1547,
|
GAME_MSG_UPDATE_PROPERTY_PERFORMANCE_COST = 1547,
|
||||||
GAME_MSG_PROPERTY_ENTRANCE_BEGIN = 1553,
|
GAME_MSG_PROPERTY_ENTRANCE_BEGIN = 1553,
|
||||||
GAME_MSG_SET_RESURRECT_RESTORE_VALUES = 1591,
|
|
||||||
GAME_MSG_VEHICLE_STOP_BOOST = 1617,
|
|
||||||
GAME_MSG_REMOVE_BUFF = 1648,
|
GAME_MSG_REMOVE_BUFF = 1648,
|
||||||
GAME_MSG_REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES = 1666,
|
GAME_MSG_REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES = 1666,
|
||||||
GAME_MSG_RESPONSE_MOVE_ITEM_BETWEEN_INVENTORY_TYPES = 1667,
|
GAME_MSG_RESPONSE_MOVE_ITEM_BETWEEN_INVENTORY_TYPES = 1667,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
enum class eBubbleType : uint32_t {
|
enum class eBubbleType : uint32_t {
|
||||||
DEFAULT = 0,
|
DEFAULT = 0,
|
||||||
ENERGY,
|
ENERGY = 1,
|
||||||
SKUNK
|
SKUNK = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //!__EBUBBLETYPE__H__
|
#endif //!__EBUBBLETYPE__H__
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
#ifndef __EHELPTYPE__H__
|
|
||||||
#define __EHELPTYPE__H__
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
enum class eHelpType : int32_t {
|
|
||||||
NONE = 0,
|
|
||||||
UNLOCK_MINIMAP = 2,
|
|
||||||
TOGGLETOOLTIP_OUTOFTIME_REBUILD = 3,
|
|
||||||
TOGGLETOOLTIP_LEAVELOSE_REBUILD = 4,
|
|
||||||
TOGGLECONTROLSTUTORIAL_WALKING = 6,
|
|
||||||
DISPLAYTUTORIAL_PASSPORT_1ST_SMASH = 7,
|
|
||||||
TOOLTIP_1ST_IMAGINATION_PICKUP = 8,
|
|
||||||
UNKNOWN9 = 9,
|
|
||||||
PETTAMINGMINIGAME_TUTORIAL_01 = 15,
|
|
||||||
PR_BOUNCER_TUTORIAL_03 = 16,
|
|
||||||
PR_TOOLTIP_1ST_PET_JUMPED_ON_SWITCH = 17,
|
|
||||||
PR_DIG_TUTORIAL_01 = 18,
|
|
||||||
PR_DIG_TUTORIAL_03 = 19,
|
|
||||||
PR_BOUNCER_TUTORIAL_01 = 20,
|
|
||||||
PR_NO_IMAGINATION_HIBERNATE = 21,
|
|
||||||
UNKNOWN22 = 22,
|
|
||||||
TOGGLECONTROLSTUTORIAL_JUMPING = 26,
|
|
||||||
TOGGLECONTROLSTUTORIAL_DOUBLEJUMPING = 27,
|
|
||||||
TOGGLECONTROLSTUTORIAL_CAMERA = 28,
|
|
||||||
TOGGLECONTROLSTUTORIAL_SMASH = 30,
|
|
||||||
UNKNOWN38 = 38,
|
|
||||||
UI_MOD_BUILD_PUT_ON_HAT = 40,
|
|
||||||
UI_MOD_BUILD_EQUIP_FIRST_MODULE = 41,
|
|
||||||
UNKNOWN42 = 42,
|
|
||||||
UNKNOWN43 = 43,
|
|
||||||
UI_MOD_BUILD_GO_LAUNCH_ROCKET = 44,
|
|
||||||
UI_MOD_BUILD_TALK_TO_SKYLANE = 45,
|
|
||||||
UNKNOWN53 = 53,
|
|
||||||
PET_DESPAWN_BY_OWNER_HIBERNATE = 69,
|
|
||||||
PET_DESPAWN_TAMING_NEW_PET = 70,
|
|
||||||
UI_INVENTORY_FULL_CANNOT_PICKUP_ITEM = 86
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EHELPTYPE__H__
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef __EITEMSETPASSIVEABILITYID__H__
|
|
||||||
#define __EITEMSETPASSIVEABILITYID__H__
|
|
||||||
|
|
||||||
enum class eItemSetPassiveAbilityID {
|
|
||||||
EngineerRank1 = 2,
|
|
||||||
EngineerRank2 = 3,
|
|
||||||
EngineerRank3 = 4,
|
|
||||||
KnightRank1 = 7,
|
|
||||||
KnightRank2 = 8,
|
|
||||||
KnightRank3 = 9,
|
|
||||||
SpaceRangerRank1 = 10,
|
|
||||||
SpaceRangerRank2 = 11,
|
|
||||||
SpaceRangerRank3 = 12,
|
|
||||||
SamuraiRank1 = 13,
|
|
||||||
SamuraiRank2 = 14,
|
|
||||||
SamuraiRank3 = 15,
|
|
||||||
SorcererRank1 = 16,
|
|
||||||
SorcererRank2 = 17,
|
|
||||||
SorcererRank3 = 18,
|
|
||||||
SpaceMarauderRank1 = 19,
|
|
||||||
SpaceMarauderRank2 = 20,
|
|
||||||
SpaceMarauderRank3 = 21,
|
|
||||||
ShinobiRank1 = 22,
|
|
||||||
ShinobiRank2 = 23,
|
|
||||||
ShinobiRank3 = 24,
|
|
||||||
InventorRank1 = 25,
|
|
||||||
InventorRank2 = 26,
|
|
||||||
InventorRank3 = 27,
|
|
||||||
SummonerRank1 = 28,
|
|
||||||
SummonerRank2 = 29,
|
|
||||||
SummonerRank3 = 30,
|
|
||||||
AdventurerRank1 = 31,
|
|
||||||
AdventurerRank2 = 32,
|
|
||||||
AdventurerRank3 = 33,
|
|
||||||
DaredevilRank1 = 34,
|
|
||||||
DaredevilRank2 = 35,
|
|
||||||
DaredevilRank3 = 36,
|
|
||||||
BuccaneerRank1 = 37,
|
|
||||||
BuccaneerRank2 = 38,
|
|
||||||
BuccaneerRank3 = 39,
|
|
||||||
BoneSuit = 40,
|
|
||||||
ImaginationSpinjitzu = 41,
|
|
||||||
BatLord = 42,
|
|
||||||
MosaicJester = 43,
|
|
||||||
ExplorienBot = 44,
|
|
||||||
Unnamed1 = 45,
|
|
||||||
Unnamed2 = 46,
|
|
||||||
Unnamed3 = 47,
|
|
||||||
EarthSpinjitzu = 48,
|
|
||||||
Unnamed4 = 49,
|
|
||||||
FireSpinjitzu = 50,
|
|
||||||
IceSpinjitzu = 51,
|
|
||||||
LightningSpinjitzu = 52
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EITEMSETPASSIVEABILITYID__H__
|
|
||||||
@@ -6,31 +6,31 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
enum class eItemType : int32_t {
|
enum class eItemType : int32_t {
|
||||||
UNKNOWN = -1,
|
ITEM_TYPE_UNKNOWN = -1, //!< An unknown item type
|
||||||
BRICK = 1,
|
ITEM_TYPE_BRICK = 1, //!< A brick
|
||||||
HAT,
|
ITEM_TYPE_HAT = 2, //!< A hat / head item
|
||||||
HAIR,
|
ITEM_TYPE_HAIR = 3, //!< A hair item
|
||||||
NECK,
|
ITEM_TYPE_NECK = 4, //!< A neck item
|
||||||
LEFT_HAND,
|
ITEM_TYPE_LEFT_HAND = 5, //!< A left handed item
|
||||||
RIGHT_HAND,
|
ITEM_TYPE_RIGHT_HAND = 6, //!< A right handed item
|
||||||
LEGS,
|
ITEM_TYPE_LEGS = 7, //!< A pants item
|
||||||
LEFT_TRINKET,
|
ITEM_TYPE_LEFT_TRINKET = 8, //!< A left handled trinket item
|
||||||
RIGHT_TRINKET,
|
ITEM_TYPE_RIGHT_TRINKET = 9, //!< A right handed trinket item
|
||||||
BEHAVIOR,
|
ITEM_TYPE_BEHAVIOR = 10, //!< A behavior
|
||||||
PROPERTY,
|
ITEM_TYPE_PROPERTY = 11, //!< A property
|
||||||
MODEL,
|
ITEM_TYPE_MODEL = 12, //!< A model
|
||||||
COLLECTIBLE,
|
ITEM_TYPE_COLLECTIBLE = 13, //!< A collectible item
|
||||||
CONSUMABLE,
|
ITEM_TYPE_CONSUMABLE = 14, //!< A consumable item
|
||||||
CHEST,
|
ITEM_TYPE_CHEST = 15, //!< A chest item
|
||||||
EGG,
|
ITEM_TYPE_EGG = 16, //!< An egg
|
||||||
PET_FOOD,
|
ITEM_TYPE_PET_FOOD = 17, //!< A pet food item
|
||||||
QUEST_OBJECT,
|
ITEM_TYPE_QUEST_OBJECT = 18, //!< A quest item
|
||||||
PET_INVENTORY_ITEM,
|
ITEM_TYPE_PET_INVENTORY_ITEM = 19, //!< A pet inventory item
|
||||||
PACKAGE,
|
ITEM_TYPE_PACKAGE = 20, //!< A package
|
||||||
LOOT_MODEL,
|
ITEM_TYPE_LOOT_MODEL = 21, //!< A loot model
|
||||||
VEHICLE,
|
ITEM_TYPE_VEHICLE = 22, //!< A vehicle
|
||||||
LUP_MODEL,
|
ITEM_TYPE_CURRENCY = 23, //!< Currency
|
||||||
MOUNT
|
ITEM_TYPE_MOUNT = 24 //!< A Mount
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //!__EITEMTYPE__H__
|
#endif //!__EITEMTYPE__H__
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef __EMISSIONLOCKSTATE__H__
|
|
||||||
#define __EMISSIONLOCKSTATE__H__
|
|
||||||
|
|
||||||
enum class eMissionLockState : int {
|
|
||||||
LOCKED,
|
|
||||||
NEW,
|
|
||||||
UNLOCKED,
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EMISSIONLOCKSTATE__H__
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef __MISSIONSTATE__H__
|
|
||||||
#define __MISSIONSTATE__H__
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the possible states a mission can be in
|
|
||||||
*/
|
|
||||||
enum class eMissionState : int {
|
|
||||||
/**
|
|
||||||
* The mission state is unknown
|
|
||||||
*/
|
|
||||||
UNKNOWN = -1,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission is yielding rewards
|
|
||||||
*/
|
|
||||||
REWARDING = 0,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission can be accepted
|
|
||||||
*/
|
|
||||||
AVAILABLE = 1,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission has been accepted but not yet completed
|
|
||||||
*/
|
|
||||||
ACTIVE = 2,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* All the tasks for the mission have been completed and the entity can turn the mission in to complete it
|
|
||||||
*/
|
|
||||||
READY_TO_COMPLETE = 4, //!< The mission is ready to complete
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission has been completed
|
|
||||||
*/
|
|
||||||
COMPLETE = 8,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission is available again and has been completed before. Used for daily missions.
|
|
||||||
*/
|
|
||||||
COMPLETE_AVAILABLE = 9,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission is active and has been completed before. Used for daily missions.
|
|
||||||
*/
|
|
||||||
COMPLETE_ACTIVE = 10,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The mission has been completed before and has now been completed again. Used for daily missions.
|
|
||||||
*/
|
|
||||||
COMPLETE_READY_TO_COMPLETE = 12
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__MISSIONSTATE__H__
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef __EMISSIONTASKTYPE__H__
|
|
||||||
#define __EMISSIONTASKTYPE__H__
|
|
||||||
|
|
||||||
enum class eMissionTaskType : int {
|
|
||||||
UNKNOWN = -1,
|
|
||||||
SMASH,
|
|
||||||
SCRIPT,
|
|
||||||
ACTIVITY,
|
|
||||||
COLLECTION,
|
|
||||||
TALK_TO_NPC,
|
|
||||||
EMOTE,
|
|
||||||
SHASH_CHAIN,
|
|
||||||
BUY,
|
|
||||||
SELL,
|
|
||||||
USE_ITEM,
|
|
||||||
USE_SKILL,
|
|
||||||
GATHER,
|
|
||||||
EXPLORE,
|
|
||||||
DELIVERY,
|
|
||||||
PERFORM_ACTIVITY,
|
|
||||||
INTERACT,
|
|
||||||
META,
|
|
||||||
EARN_REPUTATION,
|
|
||||||
VOTING,
|
|
||||||
SHOWCASE_DELIVERY,
|
|
||||||
REVIECE_CAST,
|
|
||||||
POWERUP,
|
|
||||||
PET_TAMING,
|
|
||||||
RACING,
|
|
||||||
PLAYER_FLAG,
|
|
||||||
PLACE_MODEL,
|
|
||||||
REMOVE_MODEL,
|
|
||||||
ADD_BEHAVIOR,
|
|
||||||
REMOVE_BEHAVIOR,
|
|
||||||
CLAIM_PROPERTY,
|
|
||||||
VISIT_PROPERTY,
|
|
||||||
TIME_PLAYED,
|
|
||||||
DONATION
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EMISSIONTASKTYPE__H__
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#ifndef __EPACKAGETYPE__H__
|
|
||||||
#define __EPACKAGETYPE__H__
|
|
||||||
|
|
||||||
enum class ePackageType {
|
|
||||||
INVALID = -1,
|
|
||||||
ITEM,
|
|
||||||
BRICKS,
|
|
||||||
MODELS,
|
|
||||||
CAR_MODELS
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif //!__EPACKAGETYPE__H__
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
#ifndef __EPERMISSIONMAP__H__
|
|
||||||
#define __EPERMISSIONMAP__H__
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bitmap of permissions and restrictions for characters.
|
|
||||||
*/
|
|
||||||
enum class ePermissionMap : uint64_t {
|
|
||||||
/**
|
|
||||||
* Reserved for future use, bit 0-3.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character has restricted trade acccess, bit 4.
|
|
||||||
*/
|
|
||||||
RestrictedTradeAccess = 0x1 << 4,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character has restricted mail access, bit 5.
|
|
||||||
*/
|
|
||||||
RestrictedMailAccess = 0x1 << 5,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character has restricted chat access, bit 6.
|
|
||||||
*/
|
|
||||||
RestrictedChatAccess = 0x1 << 6,
|
|
||||||
|
|
||||||
//
|
|
||||||
// Combined permissions
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character is marked as 'old', restricted from trade and mail.
|
|
||||||
*/
|
|
||||||
Old = RestrictedTradeAccess | RestrictedMailAccess,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character is soft banned, restricted from trade, mail, and chat.
|
|
||||||
*/
|
|
||||||
SoftBanned = RestrictedTradeAccess | RestrictedMailAccess | RestrictedChatAccess,
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EPERMISSIONMAP__H__
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#ifndef __EPHYSICSBEHAVIORTYPE__H__
|
|
||||||
#define __EPHYSICSBEHAVIORTYPE__H__
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
enum class ePhysicsBehaviorType : int32_t {
|
|
||||||
INVALID = -1,
|
|
||||||
GROUND,
|
|
||||||
FLYING,
|
|
||||||
STANDARD,
|
|
||||||
DYNAMIC
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EPHYSICSBEHAVIORTYPE__H__
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef __ERACINGTASKPARAM__H__
|
|
||||||
#define __ERACINGTASKPARAM__H__
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
enum class eRacingTaskParam : int32_t {
|
|
||||||
FINISH_WITH_PLACEMENT = 1,
|
|
||||||
LAP_TIME,
|
|
||||||
TOTAL_TRACK_TIME,
|
|
||||||
COMPLETE_ANY_RACING_TASK,
|
|
||||||
COMPLETE_TRACK_TASKS,
|
|
||||||
MODULAR_BUILDING,
|
|
||||||
SAFE_DRIVER = 10,
|
|
||||||
SMASHABLES,
|
|
||||||
COLLECT_IMAGINATION,
|
|
||||||
COMPETED_IN_RACE,
|
|
||||||
WIN_RACE_IN_WORLD,
|
|
||||||
FIRST_PLACE_MULTIPLE_TRACKS,
|
|
||||||
LAST_PLACE_FINISH,
|
|
||||||
SMASH_SPECIFIC_SMASHABLE
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__ERACINGTASKPARAM__H__
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
#ifndef __EREPLICACOMPONENTTYPE__H__
|
|
||||||
#define __EREPLICACOMPONENTTYPE__H__
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
enum class eReplicaComponentType : uint32_t {
|
|
||||||
INVALID = 0,
|
|
||||||
CONTROLLABLE_PHYSICS,
|
|
||||||
RENDER,
|
|
||||||
SIMPLE_PHYSICS,
|
|
||||||
CHARACTER,
|
|
||||||
SCRIPT,
|
|
||||||
BOUNCER,
|
|
||||||
BUFF, // buff is really 98, this is DESTROYABLE
|
|
||||||
GHOST,
|
|
||||||
SKILL,
|
|
||||||
SPAWNER,
|
|
||||||
ITEM,
|
|
||||||
REBUILD,
|
|
||||||
REBUILD_START,
|
|
||||||
REBUILD_ACTIVATOR,
|
|
||||||
ICON_ONLY,
|
|
||||||
VENDOR,
|
|
||||||
INVENTORY,
|
|
||||||
PROJECTILE_PHYSICS,
|
|
||||||
SHOOTING_GALLERY,
|
|
||||||
RIGID_BODY_PHANTOM_PHYSICS,
|
|
||||||
DROP_EFFECT,
|
|
||||||
CHEST,
|
|
||||||
COLLECTIBLE,
|
|
||||||
BLUEPRINT,
|
|
||||||
MOVING_PLATFORM,
|
|
||||||
PET,
|
|
||||||
PLATFORM_BOUNDARY,
|
|
||||||
MODULE,
|
|
||||||
ARCADE,
|
|
||||||
VEHICLE_PHYSICS, // Havok demo based
|
|
||||||
MOVEMENT_AI,
|
|
||||||
EXHIBIT,
|
|
||||||
OVERHEAD_ICON,
|
|
||||||
PET_CONTROL,
|
|
||||||
MINIFIG,
|
|
||||||
PROPERTY,
|
|
||||||
PET_CREATOR,
|
|
||||||
MODEL_BUILDER,
|
|
||||||
SCRIPTED_ACTIVITY,
|
|
||||||
PHANTOM_PHYSICS,
|
|
||||||
SPRINGPAD,
|
|
||||||
MODEL,
|
|
||||||
PROPERTY_ENTRANCE,
|
|
||||||
FX,
|
|
||||||
PROPERTY_MANAGEMENT,
|
|
||||||
VEHICLE_PHYSICS_NEW, // internal physics based on havok
|
|
||||||
PHYSICS_SYSTEM,
|
|
||||||
QUICK_BUILD,
|
|
||||||
SWITCH,
|
|
||||||
ZONE_CONTROL, // Minigame
|
|
||||||
CHANGLING,
|
|
||||||
CHOICE_BUILD,
|
|
||||||
PACKAGE,
|
|
||||||
SOUND_REPEATER,
|
|
||||||
SOUND_AMBIENT_2D,
|
|
||||||
SOUND_AMBIENT_3D,
|
|
||||||
PRECONDITION,
|
|
||||||
PLAYER_FLAG,
|
|
||||||
CUSTOM_BUILD_ASSEMBLY,
|
|
||||||
BASE_COMBAT_AI,
|
|
||||||
MODULE_ASSEMBLY,
|
|
||||||
SHOWCASE_MODEL_HANDLER,
|
|
||||||
RACING_MODULE,
|
|
||||||
GENERIC_ACTIVATOR,
|
|
||||||
PROPERTY_VENDOR,
|
|
||||||
HF_LIGHT_DIRECTION_GADGET,
|
|
||||||
ROCKET_LAUNCH,
|
|
||||||
ROCKET_LANDING,
|
|
||||||
TRIGGER,
|
|
||||||
DROPPED_LOOT,
|
|
||||||
RACING_CONTROL,
|
|
||||||
FACTION_TRIGGER,
|
|
||||||
MISSION_OFFER,
|
|
||||||
RACING_STATS,
|
|
||||||
LUP_EXHIBIT,
|
|
||||||
BBB,
|
|
||||||
SOUND_TRIGGER,
|
|
||||||
PROXIMITY_MONITOR,
|
|
||||||
RACING_SOUND_TRIGGER,
|
|
||||||
CHAT,
|
|
||||||
FRIENDS_LIST,
|
|
||||||
GUILD,
|
|
||||||
LOCAL_SYSTEM,
|
|
||||||
MISSION,
|
|
||||||
MUTABLE_MODEL_BEHAVIORS,
|
|
||||||
PATHFINDING,
|
|
||||||
PET_TAMING_CONTROL,
|
|
||||||
PROPERTY_EDITOR,
|
|
||||||
SKINNED_RENDER,
|
|
||||||
SLASH_COMMAND,
|
|
||||||
STATUS_EFFECT,
|
|
||||||
TEAMS,
|
|
||||||
TEXT_EFFECT,
|
|
||||||
TRADE,
|
|
||||||
USER_CONTROL,
|
|
||||||
IGNORE_LIST,
|
|
||||||
ROCKET_LAUNCH_LUP,
|
|
||||||
BUFF_REAL, // the real buff component, should just be name BUFF
|
|
||||||
INTERACTION_MANAGER,
|
|
||||||
DONATION_VENDOR,
|
|
||||||
COMBAT_MEDIATOR,
|
|
||||||
COMMENDATION_VENDOR,
|
|
||||||
UNKNOWN_103,
|
|
||||||
RAIL_ACTIVATOR,
|
|
||||||
ROLLER,
|
|
||||||
PLAYER_FORCED_MOVEMENT,
|
|
||||||
CRAFTING,
|
|
||||||
POSSESSABLE,
|
|
||||||
LEVEL_PROGRESSION,
|
|
||||||
POSSESSOR,
|
|
||||||
MOUNT_CONTROL,
|
|
||||||
UNKNOWN_112,
|
|
||||||
PROPERTY_PLAQUE,
|
|
||||||
BUILD_BORDER,
|
|
||||||
UNKOWN_115,
|
|
||||||
CULLING_PLANE,
|
|
||||||
DESTROYABLE = 1000 // Actually 7
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EREPLICACOMPONENTTYPE__H__
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#ifndef __ESERVERDISCONNECTIDENTIFIERS__H__
|
|
||||||
#define __ESERVERDISCONNECTIDENTIFIERS__H__
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
enum class eServerDisconnectIdentifiers : uint32_t {
|
|
||||||
UNKNOWN_SERVER_ERROR = 0,
|
|
||||||
WRONG_GAME_VERSION,
|
|
||||||
WRONG_SERVER_VERSION,
|
|
||||||
CONNECTION_ON_INVALID_PORT,
|
|
||||||
DUPLICATE_LOGIN,
|
|
||||||
SERVER_SHUTDOWN,
|
|
||||||
SERVER_MAP_LOAD_FAILURE,
|
|
||||||
INVALID_SESSION_KEY,
|
|
||||||
ACCOUNT_NOT_IN_PENDING_LIST,
|
|
||||||
CHARACTER_NOT_FOUND,
|
|
||||||
CHARACTER_CORRUPTED,
|
|
||||||
KICK,
|
|
||||||
SAVE_FAILURE,
|
|
||||||
FREE_TRIAL_EXPIRED,
|
|
||||||
PLAY_SCHEDULE_TIME_DONE
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__ESERVERDISCONNECTIDENTIFIERS__H__
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
#ifndef __ETRIGGERCOMMANDTYPE__H__
|
|
||||||
#define __ETRIGGERCOMMANDTYPE__H__
|
|
||||||
|
|
||||||
// For info about Trigger Command see:
|
|
||||||
// https://docs.lu-dev.net/en/latest/file-structures/lutriggers.html?highlight=trigger#possible-values-commands
|
|
||||||
|
|
||||||
enum class eTriggerCommandType {
|
|
||||||
INVALID,
|
|
||||||
ZONE_PLAYER,
|
|
||||||
FIRE_EVENT,
|
|
||||||
DESTROY_OBJ,
|
|
||||||
TOGGLE_TRIGGER,
|
|
||||||
RESET_REBUILD,
|
|
||||||
SET_PATH,
|
|
||||||
SET_PICK_TYPE,
|
|
||||||
MOVE_OBJECT,
|
|
||||||
ROTATE_OBJECT,
|
|
||||||
PUSH_OBJECT,
|
|
||||||
REPEL_OBJECT,
|
|
||||||
SET_TIMER,
|
|
||||||
CANCEL_TIMER,
|
|
||||||
PLAY_CINEMATIC,
|
|
||||||
TOGGLE_BBB,
|
|
||||||
UPDATE_MISSION,
|
|
||||||
SET_BOUNCER_STATE,
|
|
||||||
BOUNCE_ALL_ON_BOUNCER,
|
|
||||||
TURN_AROUND_ON_PATH,
|
|
||||||
GO_FORWARD_ON_PATH,
|
|
||||||
GO_BACKWARD_ON_PATH,
|
|
||||||
STOP_PATHING,
|
|
||||||
START_PATHING,
|
|
||||||
LOCK_OR_UNLOCK_CONTROLS,
|
|
||||||
PLAY_EFFECT,
|
|
||||||
STOP_EFFECT,
|
|
||||||
ACTIVATE_MUSIC_CUE,
|
|
||||||
DEACTIVATE_MUSIC_CUE,
|
|
||||||
FLASH_MUSIC_CUE,
|
|
||||||
SET_MUSIC_PARAMETER,
|
|
||||||
PLAY_2D_AMBIENT_SOUND,
|
|
||||||
STOP_2D_AMBIENT_SOUND,
|
|
||||||
PLAY_3D_AMBIENT_SOUND,
|
|
||||||
STOP_3D_AMBIENT_SOUND,
|
|
||||||
ACTIVATE_MIXER_PROGRAM,
|
|
||||||
DEACTIVATE_MIXER_PROGRAM,
|
|
||||||
CAST_SKILL,
|
|
||||||
DISPLAY_ZONE_SUMMARY,
|
|
||||||
SET_PHYSICS_VOLUME_EFFECT,
|
|
||||||
SET_PHYSICS_VOLUME_STATUS,
|
|
||||||
SET_MODEL_TO_BUILD,
|
|
||||||
SPAWN_MODEL_BRICKS,
|
|
||||||
ACTIVATE_SPAWNER_NETWORK,
|
|
||||||
DEACTIVATE_SPAWNER_NETWORK,
|
|
||||||
RESET_SPAWNER_NETWORK,
|
|
||||||
DESTROY_SPAWNER_NETWORK_OBJECTS,
|
|
||||||
GO_TO_WAYPOINT,
|
|
||||||
ACTIVATE_PHYSICS
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class TriggerCommandType {
|
|
||||||
public:
|
|
||||||
static eTriggerCommandType StringToTriggerCommandType(std::string commandString) {
|
|
||||||
const std::map<std::string, eTriggerCommandType> TriggerCommandMap = {
|
|
||||||
{ "zonePlayer", eTriggerCommandType::ZONE_PLAYER},
|
|
||||||
{ "fireEvent", eTriggerCommandType::FIRE_EVENT},
|
|
||||||
{ "destroyObj", eTriggerCommandType::DESTROY_OBJ},
|
|
||||||
{ "toggleTrigger", eTriggerCommandType::TOGGLE_TRIGGER},
|
|
||||||
{ "resetRebuild", eTriggerCommandType::RESET_REBUILD},
|
|
||||||
{ "setPath", eTriggerCommandType::SET_PATH},
|
|
||||||
{ "setPickType", eTriggerCommandType::SET_PICK_TYPE},
|
|
||||||
{ "moveObject", eTriggerCommandType::MOVE_OBJECT},
|
|
||||||
{ "rotateObject", eTriggerCommandType::ROTATE_OBJECT},
|
|
||||||
{ "pushObject", eTriggerCommandType::PUSH_OBJECT},
|
|
||||||
{ "repelObject", eTriggerCommandType::REPEL_OBJECT},
|
|
||||||
{ "setTimer", eTriggerCommandType::SET_TIMER},
|
|
||||||
{ "cancelTimer", eTriggerCommandType::CANCEL_TIMER},
|
|
||||||
{ "playCinematic", eTriggerCommandType::PLAY_CINEMATIC},
|
|
||||||
{ "toggleBBB", eTriggerCommandType::TOGGLE_BBB},
|
|
||||||
{ "updateMission", eTriggerCommandType::UPDATE_MISSION},
|
|
||||||
{ "setBouncerState", eTriggerCommandType::SET_BOUNCER_STATE},
|
|
||||||
{ "bounceAllOnBouncer", eTriggerCommandType::BOUNCE_ALL_ON_BOUNCER},
|
|
||||||
{ "turnAroundOnPath", eTriggerCommandType::TURN_AROUND_ON_PATH},
|
|
||||||
{ "goForwardOnPath", eTriggerCommandType::GO_FORWARD_ON_PATH},
|
|
||||||
{ "goBackwardOnPath", eTriggerCommandType::GO_BACKWARD_ON_PATH},
|
|
||||||
{ "stopPathing", eTriggerCommandType::STOP_PATHING},
|
|
||||||
{ "startPathing", eTriggerCommandType::START_PATHING},
|
|
||||||
{ "LockOrUnlockControls", eTriggerCommandType::LOCK_OR_UNLOCK_CONTROLS},
|
|
||||||
{ "PlayEffect", eTriggerCommandType::PLAY_EFFECT},
|
|
||||||
{ "StopEffect", eTriggerCommandType::STOP_EFFECT},
|
|
||||||
{ "activateMusicCue", eTriggerCommandType::ACTIVATE_MUSIC_CUE},
|
|
||||||
{ "deactivateMusicCue", eTriggerCommandType::DEACTIVATE_MUSIC_CUE},
|
|
||||||
{ "flashMusicCue", eTriggerCommandType::FLASH_MUSIC_CUE},
|
|
||||||
{ "setMusicParameter", eTriggerCommandType::SET_MUSIC_PARAMETER},
|
|
||||||
{ "play2DAmbientSound", eTriggerCommandType::PLAY_2D_AMBIENT_SOUND},
|
|
||||||
{ "stop2DAmbientSound", eTriggerCommandType::STOP_2D_AMBIENT_SOUND},
|
|
||||||
{ "play3DAmbientSound", eTriggerCommandType::PLAY_3D_AMBIENT_SOUND},
|
|
||||||
{ "stop3DAmbientSound", eTriggerCommandType::STOP_3D_AMBIENT_SOUND},
|
|
||||||
{ "activateMixerProgram", eTriggerCommandType::ACTIVATE_MIXER_PROGRAM},
|
|
||||||
{ "deactivateMixerProgram", eTriggerCommandType::DEACTIVATE_MIXER_PROGRAM},
|
|
||||||
{ "CastSkill", eTriggerCommandType::CAST_SKILL},
|
|
||||||
{ "displayZoneSummary", eTriggerCommandType::DISPLAY_ZONE_SUMMARY},
|
|
||||||
{ "SetPhysicsVolumeEffect", eTriggerCommandType::SET_PHYSICS_VOLUME_EFFECT},
|
|
||||||
{ "SetPhysicsVolumeStatus", eTriggerCommandType::SET_PHYSICS_VOLUME_STATUS},
|
|
||||||
{ "setModelToBuild", eTriggerCommandType::SET_MODEL_TO_BUILD},
|
|
||||||
{ "spawnModelBricks", eTriggerCommandType::SPAWN_MODEL_BRICKS},
|
|
||||||
{ "ActivateSpawnerNetwork", eTriggerCommandType::ACTIVATE_SPAWNER_NETWORK},
|
|
||||||
{ "DeactivateSpawnerNetwork", eTriggerCommandType::DEACTIVATE_SPAWNER_NETWORK},
|
|
||||||
{ "ResetSpawnerNetwork", eTriggerCommandType::RESET_SPAWNER_NETWORK},
|
|
||||||
{ "DestroySpawnerNetworkObjects", eTriggerCommandType::DESTROY_SPAWNER_NETWORK_OBJECTS},
|
|
||||||
{ "Go_To_Waypoint", eTriggerCommandType::GO_TO_WAYPOINT},
|
|
||||||
{ "ActivatePhysics", eTriggerCommandType::ACTIVATE_PHYSICS}
|
|
||||||
};
|
|
||||||
|
|
||||||
auto intermed = TriggerCommandMap.find(commandString);
|
|
||||||
return (intermed != TriggerCommandMap.end()) ? intermed->second : eTriggerCommandType::INVALID;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__ETRIGGERCOMMANDTYPE__H__
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
#ifndef __ETRIGGEREVENTTYPE__H__
|
|
||||||
#define __ETRIGGEREVENTTYPE__H__
|
|
||||||
|
|
||||||
enum class eTriggerEventType {
|
|
||||||
INVALID,
|
|
||||||
DESTROY,
|
|
||||||
CUSTOM_EVENT,
|
|
||||||
ENTER,
|
|
||||||
EXIT,
|
|
||||||
CREATE,
|
|
||||||
HIT,
|
|
||||||
TIMER_DONE,
|
|
||||||
REBUILD_COMPLETE,
|
|
||||||
ACTIVATED,
|
|
||||||
DEACTIVATED,
|
|
||||||
ARRIVED,
|
|
||||||
ARRIVED_AT_END_OF_PATH,
|
|
||||||
ZONE_SUMMARY_DISMISSED,
|
|
||||||
ARRIVED_AT_DESIRED_WAYPOINT,
|
|
||||||
PET_ON_SWITCH,
|
|
||||||
PET_OFF_SWITCH,
|
|
||||||
INTERACT
|
|
||||||
};
|
|
||||||
|
|
||||||
class TriggerEventType {
|
|
||||||
public:
|
|
||||||
static eTriggerEventType StringToTriggerEventType(std::string commandString) {
|
|
||||||
const std::map<std::string, eTriggerEventType> TriggerEventMap = {
|
|
||||||
{"OnDestroy", eTriggerEventType::DESTROY},
|
|
||||||
{"OnCustomEvent", eTriggerEventType::CUSTOM_EVENT},
|
|
||||||
{"OnEnter", eTriggerEventType::ENTER},
|
|
||||||
{"OnExit", eTriggerEventType::EXIT},
|
|
||||||
{"OnCreate", eTriggerEventType::CREATE},
|
|
||||||
{"OnHit", eTriggerEventType::HIT},
|
|
||||||
{"OnTimerDone", eTriggerEventType::TIMER_DONE},
|
|
||||||
{"OnRebuildComplete", eTriggerEventType::REBUILD_COMPLETE},
|
|
||||||
{"OnActivated", eTriggerEventType::ACTIVATED},
|
|
||||||
{"OnDeactivated", eTriggerEventType::DEACTIVATED},
|
|
||||||
{"OnArrived", eTriggerEventType::ARRIVED},
|
|
||||||
{"OnArrivedAtEndOfPath", eTriggerEventType::ARRIVED_AT_END_OF_PATH},
|
|
||||||
{"OnZoneSummaryDismissed", eTriggerEventType::ZONE_SUMMARY_DISMISSED},
|
|
||||||
{"OnArrivedAtDesiredWaypoint", eTriggerEventType::ARRIVED_AT_DESIRED_WAYPOINT},
|
|
||||||
{"OnPetOnSwitch", eTriggerEventType::PET_ON_SWITCH},
|
|
||||||
{"OnPetOffSwitch", eTriggerEventType::PET_OFF_SWITCH},
|
|
||||||
{"OnInteract", eTriggerEventType::INTERACT},
|
|
||||||
};
|
|
||||||
|
|
||||||
auto intermed = TriggerEventMap.find(commandString);
|
|
||||||
return (intermed != TriggerEventMap.end()) ? intermed->second : eTriggerEventType::INVALID;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__ETRIGGEREVENTTYPE__H__
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
#ifndef __EUGCMODERATIONSTATUS__H__
|
|
||||||
#define __EUGCMODERATIONSTATUS__H__
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
enum class eUgcModerationStatus : uint32_t {
|
|
||||||
NoStatus,
|
|
||||||
Approved,
|
|
||||||
Rejected,
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //!__EUGCMODERATIONSTATUS__H__
|
|
||||||
@@ -1,80 +1,46 @@
|
|||||||
#include "CDClientManager.h"
|
#include "CDClientManager.h"
|
||||||
#include "CDActivityRewardsTable.h"
|
|
||||||
#include "CDAnimationsTable.h"
|
|
||||||
#include "CDBehaviorParameterTable.h"
|
|
||||||
#include "CDBehaviorTemplateTable.h"
|
|
||||||
#include "CDComponentsRegistryTable.h"
|
|
||||||
#include "CDCurrencyTableTable.h"
|
|
||||||
#include "CDDestructibleComponentTable.h"
|
|
||||||
#include "CDEmoteTable.h"
|
|
||||||
#include "CDInventoryComponentTable.h"
|
|
||||||
#include "CDItemComponentTable.h"
|
|
||||||
#include "CDItemSetsTable.h"
|
|
||||||
#include "CDItemSetSkillsTable.h"
|
|
||||||
#include "CDLevelProgressionLookupTable.h"
|
|
||||||
#include "CDLootMatrixTable.h"
|
|
||||||
#include "CDLootTableTable.h"
|
|
||||||
#include "CDMissionNPCComponentTable.h"
|
|
||||||
#include "CDMissionTasksTable.h"
|
|
||||||
#include "CDMissionsTable.h"
|
|
||||||
#include "CDObjectSkillsTable.h"
|
|
||||||
#include "CDObjectsTable.h"
|
|
||||||
#include "CDPhysicsComponentTable.h"
|
|
||||||
#include "CDRebuildComponentTable.h"
|
|
||||||
#include "CDScriptComponentTable.h"
|
|
||||||
#include "CDSkillBehaviorTable.h"
|
|
||||||
#include "CDZoneTableTable.h"
|
|
||||||
#include "CDVendorComponentTable.h"
|
|
||||||
#include "CDActivitiesTable.h"
|
|
||||||
#include "CDPackageComponentTable.h"
|
|
||||||
#include "CDProximityMonitorComponentTable.h"
|
|
||||||
#include "CDMovementAIComponentTable.h"
|
|
||||||
#include "CDBrickIDTableTable.h"
|
|
||||||
#include "CDRarityTableTable.h"
|
|
||||||
#include "CDMissionEmailTable.h"
|
|
||||||
#include "CDRewardsTable.h"
|
|
||||||
#include "CDPropertyEntranceComponentTable.h"
|
|
||||||
#include "CDPropertyTemplateTable.h"
|
|
||||||
#include "CDFeatureGatingTable.h"
|
|
||||||
#include "CDRailActivatorComponent.h"
|
|
||||||
|
|
||||||
CDClientManager::CDClientManager() {
|
// Static Variables
|
||||||
CDActivityRewardsTable::Instance();
|
CDClientManager* CDClientManager::m_Address = nullptr;
|
||||||
UNUSED(CDAnimationsTable::Instance());
|
|
||||||
CDBehaviorParameterTable::Instance();
|
//! Initializes the manager
|
||||||
CDBehaviorTemplateTable::Instance();
|
void CDClientManager::Initialize(void) {
|
||||||
CDComponentsRegistryTable::Instance();
|
tables.insert(std::make_pair("ActivityRewards", new CDActivityRewardsTable()));
|
||||||
CDCurrencyTableTable::Instance();
|
UNUSED(tables.insert(std::make_pair("Animations", new CDAnimationsTable())));
|
||||||
CDDestructibleComponentTable::Instance();
|
tables.insert(std::make_pair("BehaviorParameter", new CDBehaviorParameterTable()));
|
||||||
CDEmoteTableTable::Instance();
|
tables.insert(std::make_pair("BehaviorTemplate", new CDBehaviorTemplateTable()));
|
||||||
CDInventoryComponentTable::Instance();
|
tables.insert(std::make_pair("ComponentsRegistry", new CDComponentsRegistryTable()));
|
||||||
CDItemComponentTable::Instance();
|
tables.insert(std::make_pair("CurrencyTable", new CDCurrencyTableTable()));
|
||||||
CDItemSetsTable::Instance();
|
tables.insert(std::make_pair("DestructibleComponent", new CDDestructibleComponentTable()));
|
||||||
CDItemSetSkillsTable::Instance();
|
tables.insert(std::make_pair("EmoteTable", new CDEmoteTableTable()));
|
||||||
CDLevelProgressionLookupTable::Instance();
|
tables.insert(std::make_pair("InventoryComponent", new CDInventoryComponentTable()));
|
||||||
CDLootMatrixTable::Instance();
|
tables.insert(std::make_pair("ItemComponent", new CDItemComponentTable()));
|
||||||
CDLootTableTable::Instance();
|
tables.insert(std::make_pair("ItemSets", new CDItemSetsTable()));
|
||||||
CDMissionNPCComponentTable::Instance();
|
tables.insert(std::make_pair("ItemSetSkills", new CDItemSetSkillsTable()));
|
||||||
CDMissionTasksTable::Instance();
|
tables.insert(std::make_pair("LevelProgressionLookup", new CDLevelProgressionLookupTable()));
|
||||||
CDMissionsTable::Instance();
|
tables.insert(std::make_pair("LootMatrix", new CDLootMatrixTable()));
|
||||||
CDObjectSkillsTable::Instance();
|
tables.insert(std::make_pair("LootTable", new CDLootTableTable()));
|
||||||
CDObjectsTable::Instance();
|
tables.insert(std::make_pair("MissionNPCComponent", new CDMissionNPCComponentTable()));
|
||||||
CDPhysicsComponentTable::Instance();
|
tables.insert(std::make_pair("MissionTasks", new CDMissionTasksTable()));
|
||||||
CDRebuildComponentTable::Instance();
|
tables.insert(std::make_pair("Missions", new CDMissionsTable()));
|
||||||
CDScriptComponentTable::Instance();
|
tables.insert(std::make_pair("ObjectSkills", new CDObjectSkillsTable()));
|
||||||
CDSkillBehaviorTable::Instance();
|
tables.insert(std::make_pair("Objects", new CDObjectsTable()));
|
||||||
CDZoneTableTable::Instance();
|
tables.insert(std::make_pair("PhysicsComponent", new CDPhysicsComponentTable()));
|
||||||
CDVendorComponentTable::Instance();
|
tables.insert(std::make_pair("RebuildComponent", new CDRebuildComponentTable()));
|
||||||
CDActivitiesTable::Instance();
|
tables.insert(std::make_pair("ScriptComponent", new CDScriptComponentTable()));
|
||||||
CDPackageComponentTable::Instance();
|
tables.insert(std::make_pair("SkillBehavior", new CDSkillBehaviorTable()));
|
||||||
CDProximityMonitorComponentTable::Instance();
|
tables.insert(std::make_pair("ZoneTable", new CDZoneTableTable()));
|
||||||
CDMovementAIComponentTable::Instance();
|
tables.insert(std::make_pair("VendorComponent", new CDVendorComponentTable()));
|
||||||
CDBrickIDTableTable::Instance();
|
tables.insert(std::make_pair("Activities", new CDActivitiesTable()));
|
||||||
CDRarityTableTable::Instance();
|
tables.insert(std::make_pair("PackageComponent", new CDPackageComponentTable()));
|
||||||
CDMissionEmailTable::Instance();
|
tables.insert(std::make_pair("ProximityMonitorComponent", new CDProximityMonitorComponentTable()));
|
||||||
CDRewardsTable::Instance();
|
tables.insert(std::make_pair("MovementAIComponent", new CDMovementAIComponentTable()));
|
||||||
CDPropertyEntranceComponentTable::Instance();
|
tables.insert(std::make_pair("BrickIDTable", new CDBrickIDTableTable()));
|
||||||
CDPropertyTemplateTable::Instance();
|
tables.insert(std::make_pair("RarityTable", new CDRarityTableTable()));
|
||||||
CDFeatureGatingTable::Instance();
|
tables.insert(std::make_pair("MissionEmail", new CDMissionEmailTable()));
|
||||||
CDRailActivatorComponentTable::Instance();
|
tables.insert(std::make_pair("Rewards", new CDRewardsTable()));
|
||||||
|
tables.insert(std::make_pair("PropertyEntranceComponent", new CDPropertyEntranceComponentTable()));
|
||||||
|
tables.insert(std::make_pair("PropertyTemplate", new CDPropertyTemplateTable()));
|
||||||
|
tables.insert(std::make_pair("FeatureGating", new CDFeatureGatingTable()));
|
||||||
|
tables.insert(std::make_pair("RailActivatorComponent", new CDRailActivatorComponentTable()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,96 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
#include "Singleton.h"
|
// Tables
|
||||||
|
#include "CDActivityRewardsTable.h"
|
||||||
|
#include "CDAnimationsTable.h"
|
||||||
|
#include "CDBehaviorParameterTable.h"
|
||||||
|
#include "CDBehaviorTemplateTable.h"
|
||||||
|
#include "CDComponentsRegistryTable.h"
|
||||||
|
#include "CDCurrencyTableTable.h"
|
||||||
|
#include "CDDestructibleComponentTable.h"
|
||||||
|
#include "CDEmoteTable.h"
|
||||||
|
#include "CDInventoryComponentTable.h"
|
||||||
|
#include "CDItemComponentTable.h"
|
||||||
|
#include "CDItemSetsTable.h"
|
||||||
|
#include "CDItemSetSkillsTable.h"
|
||||||
|
#include "CDLevelProgressionLookupTable.h"
|
||||||
|
#include "CDLootMatrixTable.h"
|
||||||
|
#include "CDLootTableTable.h"
|
||||||
|
#include "CDMissionNPCComponentTable.h"
|
||||||
|
#include "CDMissionTasksTable.h"
|
||||||
|
#include "CDMissionsTable.h"
|
||||||
|
#include "CDObjectSkillsTable.h"
|
||||||
|
#include "CDObjectsTable.h"
|
||||||
|
#include "CDPhysicsComponentTable.h"
|
||||||
|
#include "CDRebuildComponentTable.h"
|
||||||
|
#include "CDScriptComponentTable.h"
|
||||||
|
#include "CDSkillBehaviorTable.h"
|
||||||
|
#include "CDZoneTableTable.h"
|
||||||
|
#include "CDVendorComponentTable.h"
|
||||||
|
#include "CDActivitiesTable.h"
|
||||||
|
#include "CDPackageComponentTable.h"
|
||||||
|
#include "CDProximityMonitorComponentTable.h"
|
||||||
|
#include "CDMovementAIComponentTable.h"
|
||||||
|
#include "CDBrickIDTableTable.h"
|
||||||
|
#include "CDRarityTableTable.h"
|
||||||
|
#include "CDMissionEmailTable.h"
|
||||||
|
#include "CDRewardsTable.h"
|
||||||
|
#include "CDPropertyEntranceComponentTable.h"
|
||||||
|
#include "CDPropertyTemplateTable.h"
|
||||||
|
#include "CDFeatureGatingTable.h"
|
||||||
|
#include "CDRailActivatorComponent.h"
|
||||||
|
|
||||||
/**
|
// C++
|
||||||
* Initialize the CDClient tables so they are all loaded into memory.
|
#include <type_traits>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDClientManager.hpp
|
||||||
|
\brief A manager for the CDClient tables
|
||||||
*/
|
*/
|
||||||
class CDClientManager : public Singleton<CDClientManager> {
|
|
||||||
public:
|
|
||||||
CDClientManager();
|
|
||||||
|
|
||||||
/**
|
//! Manages all data from the CDClient
|
||||||
* Fetch a table from CDClient
|
class CDClientManager {
|
||||||
*
|
private:
|
||||||
* @tparam Table type to fetch
|
static CDClientManager* m_Address; //!< The singleton address
|
||||||
* @return A pointer to the requested table.
|
|
||||||
|
std::unordered_map<std::string, CDTable*> tables; //!< The tables
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! The singleton method
|
||||||
|
static CDClientManager* Instance() {
|
||||||
|
if (m_Address == 0) {
|
||||||
|
m_Address = new CDClientManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_Address;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Initializes the manager
|
||||||
|
void Initialize(void);
|
||||||
|
|
||||||
|
//! Fetches a CDClient table
|
||||||
|
/*!
|
||||||
|
This function uses typename T which must be a subclass of CDTable.
|
||||||
|
It returns the class that conforms to the class name
|
||||||
|
|
||||||
|
\param tableName The table name
|
||||||
|
\return The class or nullptr
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T* GetTable() {
|
T* GetTable(const std::string& tableName) {
|
||||||
return &T::Instance();
|
static_assert(std::is_base_of<CDTable, T>::value, "T should inherit from CDTable!");
|
||||||
|
|
||||||
|
for (auto itr = this->tables.begin(); itr != this->tables.end(); ++itr) {
|
||||||
|
if (itr->first == tableName) {
|
||||||
|
return dynamic_cast<T*>(itr->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "CDActivitiesTable.h"
|
#include "CDActivitiesTable.h"
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDActivitiesTable::CDActivitiesTable(void) {
|
CDActivitiesTable::CDActivitiesTable(void) {
|
||||||
|
|
||||||
// First, get the size of the table
|
// First, get the size of the table
|
||||||
@@ -47,6 +48,15 @@ CDActivitiesTable::CDActivitiesTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDActivitiesTable::~CDActivitiesTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDActivitiesTable::GetName(void) const {
|
||||||
|
return "Activities";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDActivities> CDActivitiesTable::Query(std::function<bool(CDActivities)> predicate) {
|
std::vector<CDActivities> CDActivitiesTable::Query(std::function<bool(CDActivities)> predicate) {
|
||||||
|
|
||||||
std::vector<CDActivities> data = cpplinq::from(this->entries)
|
std::vector<CDActivities> data = cpplinq::from(this->entries)
|
||||||
@@ -56,6 +66,7 @@ std::vector<CDActivities> CDActivitiesTable::Query(std::function<bool(CDActiviti
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDActivities> CDActivitiesTable::GetEntries(void) const {
|
std::vector<CDActivities> CDActivitiesTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDActivitiesTable.hpp
|
||||||
|
\brief Contains data for the Activities table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! Activities Entry Struct
|
||||||
struct CDActivities {
|
struct CDActivities {
|
||||||
unsigned int ActivityID;
|
unsigned int ActivityID;
|
||||||
unsigned int locStatus;
|
unsigned int locStatus;
|
||||||
@@ -25,14 +31,36 @@ struct CDActivities {
|
|||||||
float optionalPercentage;
|
float optionalPercentage;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDActivitiesTable : public CDTable<CDActivitiesTable> {
|
|
||||||
|
//! Activities table
|
||||||
|
class CDActivitiesTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDActivities> entries;
|
std::vector<CDActivities> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDActivitiesTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDActivitiesTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDActivitiesTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDActivities> Query(std::function<bool(CDActivities)> predicate);
|
std::vector<CDActivities> Query(std::function<bool(CDActivities)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDActivities> GetEntries(void) const;
|
std::vector<CDActivities> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "CDActivityRewardsTable.h"
|
#include "CDActivityRewardsTable.h"
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDActivityRewardsTable::CDActivityRewardsTable(void) {
|
CDActivityRewardsTable::CDActivityRewardsTable(void) {
|
||||||
|
|
||||||
// First, get the size of the table
|
// First, get the size of the table
|
||||||
@@ -35,6 +36,15 @@ CDActivityRewardsTable::CDActivityRewardsTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDActivityRewardsTable::~CDActivityRewardsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDActivityRewardsTable::GetName(void) const {
|
||||||
|
return "ActivityRewards";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDActivityRewards> CDActivityRewardsTable::Query(std::function<bool(CDActivityRewards)> predicate) {
|
std::vector<CDActivityRewards> CDActivityRewardsTable::Query(std::function<bool(CDActivityRewards)> predicate) {
|
||||||
|
|
||||||
std::vector<CDActivityRewards> data = cpplinq::from(this->entries)
|
std::vector<CDActivityRewards> data = cpplinq::from(this->entries)
|
||||||
@@ -44,6 +54,7 @@ std::vector<CDActivityRewards> CDActivityRewardsTable::Query(std::function<bool(
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDActivityRewards> CDActivityRewardsTable::GetEntries(void) const {
|
std::vector<CDActivityRewards> CDActivityRewardsTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDActivityRewardsTable.hpp
|
||||||
|
\brief Contains data for the ActivityRewards table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ActivityRewards Entry Struct
|
||||||
struct CDActivityRewards {
|
struct CDActivityRewards {
|
||||||
unsigned int objectTemplate; //!< The object template (?)
|
unsigned int objectTemplate; //!< The object template (?)
|
||||||
unsigned int ActivityRewardIndex; //!< The activity reward index
|
unsigned int ActivityRewardIndex; //!< The activity reward index
|
||||||
@@ -13,15 +19,36 @@ struct CDActivityRewards {
|
|||||||
std::string description; //!< The description
|
std::string description; //!< The description
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDActivityRewardsTable : public CDTable<CDActivityRewardsTable> {
|
|
||||||
|
//! ActivityRewards table
|
||||||
|
class CDActivityRewardsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDActivityRewards> entries;
|
std::vector<CDActivityRewards> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDActivityRewardsTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDActivityRewardsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDActivityRewardsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDActivityRewards> Query(std::function<bool(CDActivityRewards)> predicate);
|
std::vector<CDActivityRewards> Query(std::function<bool(CDActivityRewards)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDActivityRewards> GetEntries(void) const;
|
std::vector<CDActivityRewards> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "CDAnimationsTable.h"
|
#include "CDAnimationsTable.h"
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDAnimationsTable::CDAnimationsTable(void) {
|
CDAnimationsTable::CDAnimationsTable(void) {
|
||||||
|
|
||||||
// First, get the size of the table
|
// First, get the size of the table
|
||||||
@@ -41,6 +42,15 @@ CDAnimationsTable::CDAnimationsTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDAnimationsTable::~CDAnimationsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDAnimationsTable::GetName(void) const {
|
||||||
|
return "Animations";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDAnimations> CDAnimationsTable::Query(std::function<bool(CDAnimations)> predicate) {
|
std::vector<CDAnimations> CDAnimationsTable::Query(std::function<bool(CDAnimations)> predicate) {
|
||||||
|
|
||||||
std::vector<CDAnimations> data = cpplinq::from(this->entries)
|
std::vector<CDAnimations> data = cpplinq::from(this->entries)
|
||||||
@@ -50,6 +60,7 @@ std::vector<CDAnimations> CDAnimationsTable::Query(std::function<bool(CDAnimatio
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDAnimations> CDAnimationsTable::GetEntries(void) const {
|
std::vector<CDAnimations> CDAnimationsTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDAnimationsTable.hpp
|
||||||
|
\brief Contains data for the Animations table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! Animations Entry Struct
|
||||||
struct CDAnimations {
|
struct CDAnimations {
|
||||||
unsigned int animationGroupID; //!< The animation group ID
|
unsigned int animationGroupID; //!< The animation group ID
|
||||||
std::string animation_type; //!< The animation type
|
std::string animation_type; //!< The animation type
|
||||||
@@ -20,14 +26,35 @@ struct CDAnimations {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDAnimationsTable : public CDTable<CDAnimationsTable> {
|
//! Animations table
|
||||||
|
class CDAnimationsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDAnimations> entries;
|
std::vector<CDAnimations> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDAnimationsTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDAnimationsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDAnimationsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDAnimations> Query(std::function<bool(CDAnimations)> predicate);
|
std::vector<CDAnimations> Query(std::function<bool(CDAnimations)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDAnimations> GetEntries(void) const;
|
std::vector<CDAnimations> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "CDBehaviorParameterTable.h"
|
#include "CDBehaviorParameterTable.h"
|
||||||
#include "GeneralUtils.h"
|
#include "GeneralUtils.h"
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDBehaviorParameterTable::CDBehaviorParameterTable(void) {
|
CDBehaviorParameterTable::CDBehaviorParameterTable(void) {
|
||||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorParameter");
|
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorParameter");
|
||||||
uint32_t uniqueParameterId = 0;
|
uint32_t uniqueParameterId = 0;
|
||||||
@@ -27,6 +28,14 @@ CDBehaviorParameterTable::CDBehaviorParameterTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDBehaviorParameterTable::~CDBehaviorParameterTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDBehaviorParameterTable::GetName(void) const {
|
||||||
|
return "BehaviorParameter";
|
||||||
|
}
|
||||||
|
|
||||||
float CDBehaviorParameterTable::GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue) {
|
float CDBehaviorParameterTable::GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue) {
|
||||||
auto parameterID = this->m_ParametersList.find(name);
|
auto parameterID = this->m_ParametersList.find(name);
|
||||||
if (parameterID == this->m_ParametersList.end()) return defaultValue;
|
if (parameterID == this->m_ParametersList.end()) return defaultValue;
|
||||||
|
|||||||
@@ -5,18 +5,37 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDBehaviorParameterTable.hpp
|
||||||
|
\brief Contains data for the BehaviorParameter table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! BehaviorParameter Entry Struct
|
||||||
struct CDBehaviorParameter {
|
struct CDBehaviorParameter {
|
||||||
unsigned int behaviorID; //!< The Behavior ID
|
unsigned int behaviorID; //!< The Behavior ID
|
||||||
std::unordered_map<std::string, uint32_t>::iterator parameterID; //!< The Parameter ID
|
std::unordered_map<std::string, uint32_t>::iterator parameterID; //!< The Parameter ID
|
||||||
float value; //!< The value of the behavior template
|
float value; //!< The value of the behavior template
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDBehaviorParameterTable : public CDTable<CDBehaviorParameterTable> {
|
//! BehaviorParameter table
|
||||||
|
class CDBehaviorParameterTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::unordered_map<uint64_t, CDBehaviorParameter> m_Entries;
|
std::unordered_map<uint64_t, CDBehaviorParameter> m_Entries;
|
||||||
std::unordered_map<std::string, uint32_t> m_ParametersList;
|
std::unordered_map<std::string, uint32_t> m_ParametersList;
|
||||||
public:
|
public:
|
||||||
CDBehaviorParameterTable();
|
|
||||||
|
//! Constructor
|
||||||
|
CDBehaviorParameterTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDBehaviorParameterTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
float GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
|
float GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
|
||||||
|
|
||||||
std::map<std::string, float> GetParametersByBehaviorID(uint32_t behaviorID);
|
std::map<std::string, float> GetParametersByBehaviorID(uint32_t behaviorID);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "CDBehaviorTemplateTable.h"
|
#include "CDBehaviorTemplateTable.h"
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) {
|
CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) {
|
||||||
|
|
||||||
// First, get the size of the table
|
// First, get the size of the table
|
||||||
@@ -39,6 +40,15 @@ CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDBehaviorTemplateTable::~CDBehaviorTemplateTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDBehaviorTemplateTable::GetName(void) const {
|
||||||
|
return "BehaviorTemplate";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::Query(std::function<bool(CDBehaviorTemplate)> predicate) {
|
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::Query(std::function<bool(CDBehaviorTemplate)> predicate) {
|
||||||
|
|
||||||
std::vector<CDBehaviorTemplate> data = cpplinq::from(this->entries)
|
std::vector<CDBehaviorTemplate> data = cpplinq::from(this->entries)
|
||||||
@@ -48,6 +58,7 @@ std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::Query(std::function<boo
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::GetEntries(void) const {
|
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDBehaviorTemplateTable.hpp
|
||||||
|
\brief Contains data for the BehaviorTemplate table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! BehaviorTemplate Entry Struct
|
||||||
struct CDBehaviorTemplate {
|
struct CDBehaviorTemplate {
|
||||||
unsigned int behaviorID; //!< The Behavior ID
|
unsigned int behaviorID; //!< The Behavior ID
|
||||||
unsigned int templateID; //!< The Template ID (LOT)
|
unsigned int templateID; //!< The Template ID (LOT)
|
||||||
@@ -13,16 +19,36 @@ struct CDBehaviorTemplate {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDBehaviorTemplateTable : public CDTable<CDBehaviorTemplateTable> {
|
//! BehaviorTemplate table
|
||||||
|
class CDBehaviorTemplateTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDBehaviorTemplate> entries;
|
std::vector<CDBehaviorTemplate> entries;
|
||||||
std::unordered_map<uint32_t, CDBehaviorTemplate> entriesMappedByBehaviorID;
|
std::unordered_map<uint32_t, CDBehaviorTemplate> entriesMappedByBehaviorID;
|
||||||
std::unordered_set<std::string> m_EffectHandles;
|
std::unordered_set<std::string> m_EffectHandles;
|
||||||
public:
|
public:
|
||||||
CDBehaviorTemplateTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDBehaviorTemplateTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDBehaviorTemplateTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDBehaviorTemplate> Query(std::function<bool(CDBehaviorTemplate)> predicate);
|
std::vector<CDBehaviorTemplate> Query(std::function<bool(CDBehaviorTemplate)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDBehaviorTemplate> GetEntries(void) const;
|
std::vector<CDBehaviorTemplate> GetEntries(void) const;
|
||||||
|
|
||||||
const CDBehaviorTemplate GetByBehaviorID(uint32_t behaviorID);
|
const CDBehaviorTemplate GetByBehaviorID(uint32_t behaviorID);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "CDBrickIDTableTable.h"
|
#include "CDBrickIDTableTable.h"
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDBrickIDTableTable::CDBrickIDTableTable(void) {
|
CDBrickIDTableTable::CDBrickIDTableTable(void) {
|
||||||
|
|
||||||
// First, get the size of the table
|
// First, get the size of the table
|
||||||
@@ -30,6 +31,15 @@ CDBrickIDTableTable::CDBrickIDTableTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDBrickIDTableTable::~CDBrickIDTableTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDBrickIDTableTable::GetName(void) const {
|
||||||
|
return "BrickIDTable";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDBrickIDTable> CDBrickIDTableTable::Query(std::function<bool(CDBrickIDTable)> predicate) {
|
std::vector<CDBrickIDTable> CDBrickIDTableTable::Query(std::function<bool(CDBrickIDTable)> predicate) {
|
||||||
|
|
||||||
std::vector<CDBrickIDTable> data = cpplinq::from(this->entries)
|
std::vector<CDBrickIDTable> data = cpplinq::from(this->entries)
|
||||||
@@ -39,6 +49,7 @@ std::vector<CDBrickIDTable> CDBrickIDTableTable::Query(std::function<bool(CDBric
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDBrickIDTable> CDBrickIDTableTable::GetEntries(void) const {
|
std::vector<CDBrickIDTable> CDBrickIDTableTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,34 @@ struct CDBrickIDTable {
|
|||||||
|
|
||||||
|
|
||||||
//! BrickIDTable table
|
//! BrickIDTable table
|
||||||
class CDBrickIDTableTable : public CDTable<CDBrickIDTableTable> {
|
class CDBrickIDTableTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDBrickIDTable> entries;
|
std::vector<CDBrickIDTable> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDBrickIDTableTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDBrickIDTableTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDBrickIDTableTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDBrickIDTable> Query(std::function<bool(CDBrickIDTable)> predicate);
|
std::vector<CDBrickIDTable> Query(std::function<bool(CDBrickIDTable)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDBrickIDTable> GetEntries(void) const;
|
std::vector<CDBrickIDTable> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "CDComponentsRegistryTable.h"
|
#include "CDComponentsRegistryTable.h"
|
||||||
#include "eReplicaComponentType.h"
|
|
||||||
|
|
||||||
#define CDCLIENT_CACHE_ALL
|
#define CDCLIENT_CACHE_ALL
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
||||||
|
|
||||||
#ifdef CDCLIENT_CACHE_ALL
|
#ifdef CDCLIENT_CACHE_ALL
|
||||||
@@ -25,11 +25,29 @@ CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
|||||||
while (!tableData.eof()) {
|
while (!tableData.eof()) {
|
||||||
CDComponentsRegistry entry;
|
CDComponentsRegistry entry;
|
||||||
entry.id = tableData.getIntField("id", -1);
|
entry.id = tableData.getIntField("id", -1);
|
||||||
entry.component_type = static_cast<eReplicaComponentType>(tableData.getIntField("component_type", 0));
|
entry.component_type = tableData.getIntField("component_type", -1);
|
||||||
entry.component_id = tableData.getIntField("component_id", -1);
|
entry.component_id = tableData.getIntField("component_id", -1);
|
||||||
|
|
||||||
this->mappedEntries.insert_or_assign(((uint64_t)entry.component_type) << 32 | ((uint64_t)entry.id), entry.component_id);
|
this->mappedEntries.insert_or_assign(((uint64_t)entry.component_type) << 32 | ((uint64_t)entry.id), entry.component_id);
|
||||||
|
|
||||||
|
//this->entries.push_back(entry);
|
||||||
|
|
||||||
|
/*
|
||||||
|
//Darwin's stuff:
|
||||||
|
const auto& it = this->mappedEntries.find(entry.id);
|
||||||
|
if (it != mappedEntries.end()) {
|
||||||
|
const auto& iter = it->second.find(entry.component_type);
|
||||||
|
if (iter == it->second.end()) {
|
||||||
|
it->second.insert(std::make_pair(entry.component_type, entry.component_id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
std::map<unsigned int, unsigned int> map;
|
||||||
|
map.insert(std::make_pair(entry.component_type, entry.component_id));
|
||||||
|
this->mappedEntries.insert(std::make_pair(entry.id, map));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
tableData.nextRow();
|
tableData.nextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +55,15 @@ CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, eReplicaComponentType componentType, int32_t defaultValue) {
|
//! Destructor
|
||||||
|
CDComponentsRegistryTable::~CDComponentsRegistryTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDComponentsRegistryTable::GetName(void) const {
|
||||||
|
return "ComponentsRegistry";
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, uint32_t componentType, int32_t defaultValue) {
|
||||||
const auto& iter = this->mappedEntries.find(((uint64_t)componentType) << 32 | ((uint64_t)id));
|
const auto& iter = this->mappedEntries.find(((uint64_t)componentType) << 32 | ((uint64_t)id));
|
||||||
|
|
||||||
if (iter == this->mappedEntries.end()) {
|
if (iter == this->mappedEntries.end()) {
|
||||||
@@ -46,6 +72,16 @@ int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, eReplicaComponent
|
|||||||
|
|
||||||
return iter->second;
|
return iter->second;
|
||||||
|
|
||||||
|
/*
|
||||||
|
const auto& it = this->mappedEntries.find(id);
|
||||||
|
if (it != mappedEntries.end()) {
|
||||||
|
const auto& iter = it->second.find(componentType);
|
||||||
|
if (iter != it->second.end()) {
|
||||||
|
return iter->second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef CDCLIENT_CACHE_ALL
|
#ifndef CDCLIENT_CACHE_ALL
|
||||||
// Now get the data
|
// Now get the data
|
||||||
std::stringstream query;
|
std::stringstream query;
|
||||||
|
|||||||
@@ -3,19 +3,38 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
enum class eReplicaComponentType : uint32_t;
|
/*!
|
||||||
|
\file CDComponentsRegistryTable.hpp
|
||||||
|
\brief Contains data for the ComponentsRegistry table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ComponentsRegistry Entry Struct
|
||||||
struct CDComponentsRegistry {
|
struct CDComponentsRegistry {
|
||||||
unsigned int id; //!< The LOT is used as the ID
|
unsigned int id; //!< The LOT is used as the ID
|
||||||
eReplicaComponentType component_type; //!< See ComponentTypes enum for values
|
unsigned int component_type; //!< See ComponentTypes enum for values
|
||||||
unsigned int component_id; //!< The ID used within the component's table (0 may either mean it's non-networked, or that the ID is actually 0
|
unsigned int component_id; //!< The ID used within the component's table (0 may either mean it's non-networked, or that the ID is actually 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDComponentsRegistryTable : public CDTable<CDComponentsRegistryTable> {
|
//! ComponentsRegistry table
|
||||||
|
class CDComponentsRegistryTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
|
//std::vector<CDComponentsRegistry> entries;
|
||||||
std::map<uint64_t, uint32_t> mappedEntries; //id, component_type, component_id
|
std::map<uint64_t, uint32_t> mappedEntries; //id, component_type, component_id
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDComponentsRegistryTable();
|
|
||||||
int32_t GetByIDAndType(uint32_t id, eReplicaComponentType componentType, int32_t defaultValue = 0);
|
//! Constructor
|
||||||
|
CDComponentsRegistryTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDComponentsRegistryTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
int32_t GetByIDAndType(uint32_t id, uint32_t componentType, int32_t defaultValue = 0);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ CDCurrencyTableTable::CDCurrencyTableTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDCurrencyTableTable::~CDCurrencyTableTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDCurrencyTableTable::GetName(void) const {
|
||||||
|
return "CurrencyTable";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDCurrencyTable> CDCurrencyTableTable::Query(std::function<bool(CDCurrencyTable)> predicate) {
|
std::vector<CDCurrencyTable> CDCurrencyTableTable::Query(std::function<bool(CDCurrencyTable)> predicate) {
|
||||||
|
|
||||||
std::vector<CDCurrencyTable> data = cpplinq::from(this->entries)
|
std::vector<CDCurrencyTable> data = cpplinq::from(this->entries)
|
||||||
@@ -43,6 +52,7 @@ std::vector<CDCurrencyTable> CDCurrencyTableTable::Query(std::function<bool(CDCu
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDCurrencyTable> CDCurrencyTableTable::GetEntries(void) const {
|
std::vector<CDCurrencyTable> CDCurrencyTableTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,34 @@ struct CDCurrencyTable {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! CurrencyTable table
|
//! CurrencyTable table
|
||||||
class CDCurrencyTableTable : public CDTable<CDCurrencyTableTable> {
|
class CDCurrencyTableTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDCurrencyTable> entries;
|
std::vector<CDCurrencyTable> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDCurrencyTableTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDCurrencyTableTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDCurrencyTableTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDCurrencyTable> Query(std::function<bool(CDCurrencyTable)> predicate);
|
std::vector<CDCurrencyTable> Query(std::function<bool(CDCurrencyTable)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDCurrencyTable> GetEntries(void) const;
|
std::vector<CDCurrencyTable> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,6 +43,15 @@ CDDestructibleComponentTable::CDDestructibleComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDDestructibleComponentTable::~CDDestructibleComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDDestructibleComponentTable::GetName(void) const {
|
||||||
|
return "DestructibleComponent";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::Query(std::function<bool(CDDestructibleComponent)> predicate) {
|
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::Query(std::function<bool(CDDestructibleComponent)> predicate) {
|
||||||
|
|
||||||
std::vector<CDDestructibleComponent> data = cpplinq::from(this->entries)
|
std::vector<CDDestructibleComponent> data = cpplinq::from(this->entries)
|
||||||
@@ -52,6 +61,7 @@ std::vector<CDDestructibleComponent> CDDestructibleComponentTable::Query(std::fu
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::GetEntries(void) const {
|
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDDestructibleComponentTable.hpp
|
||||||
|
\brief Contains data for the DestructibleComponent table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ItemComponent Struct
|
||||||
struct CDDestructibleComponent {
|
struct CDDestructibleComponent {
|
||||||
unsigned int id; //!< The component ID from the ComponentsRegistry Table
|
unsigned int id; //!< The component ID from the ComponentsRegistry Table
|
||||||
int faction; //!< The Faction ID of the object
|
int faction; //!< The Faction ID of the object
|
||||||
@@ -20,14 +26,35 @@ struct CDDestructibleComponent {
|
|||||||
int difficultyLevel; //!< ???
|
int difficultyLevel; //!< ???
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDDestructibleComponentTable : public CDTable<CDDestructibleComponentTable> {
|
//! ItemComponent table
|
||||||
|
class CDDestructibleComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDDestructibleComponent> entries;
|
std::vector<CDDestructibleComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDDestructibleComponentTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDDestructibleComponentTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDDestructibleComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDDestructibleComponent> Query(std::function<bool(CDDestructibleComponent)> predicate);
|
std::vector<CDDestructibleComponent> Query(std::function<bool(CDDestructibleComponent)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDDestructibleComponent> GetEntries(void) const;
|
std::vector<CDDestructibleComponent> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ CDEmoteTableTable::~CDEmoteTableTable(void) {
|
|||||||
entries.clear();
|
entries.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDEmoteTableTable::GetName(void) const {
|
||||||
|
return "Emotes";
|
||||||
|
}
|
||||||
|
|
||||||
CDEmoteTable* CDEmoteTableTable::GetEmote(int id) {
|
CDEmoteTable* CDEmoteTableTable::GetEmote(int id) {
|
||||||
for (auto e : entries) {
|
for (auto e : entries) {
|
||||||
if (e.first == id) return e.second;
|
if (e.first == id) return e.second;
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDEmoteTable.hpp
|
||||||
|
\brief Contains data for the CDEmoteTable table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! CDEmoteEntry Struct
|
||||||
struct CDEmoteTable {
|
struct CDEmoteTable {
|
||||||
CDEmoteTable() {
|
CDEmoteTable() {
|
||||||
ID = -1;
|
ID = -1;
|
||||||
@@ -26,13 +32,25 @@ struct CDEmoteTable {
|
|||||||
std::string gateVersion;
|
std::string gateVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDEmoteTableTable : public CDTable<CDEmoteTableTable> {
|
//! CDEmoteTable table
|
||||||
|
class CDEmoteTableTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::map<int, CDEmoteTable*> entries;
|
std::map<int, CDEmoteTable*> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDEmoteTableTable();
|
|
||||||
~CDEmoteTableTable();
|
//! Constructor
|
||||||
// Returns an emote by ID
|
CDEmoteTableTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDEmoteTableTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Returns an emote by ID
|
||||||
CDEmoteTable* GetEmote(int id);
|
CDEmoteTable* GetEmote(int id);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ CDFeatureGatingTable::CDFeatureGatingTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDFeatureGatingTable::~CDFeatureGatingTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDFeatureGatingTable::GetName(void) const {
|
||||||
|
return "FeatureGating";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDFeatureGating> CDFeatureGatingTable::Query(std::function<bool(CDFeatureGating)> predicate) {
|
std::vector<CDFeatureGating> CDFeatureGatingTable::Query(std::function<bool(CDFeatureGating)> predicate) {
|
||||||
|
|
||||||
std::vector<CDFeatureGating> data = cpplinq::from(this->entries)
|
std::vector<CDFeatureGating> data = cpplinq::from(this->entries)
|
||||||
@@ -53,6 +62,7 @@ bool CDFeatureGatingTable::FeatureUnlocked(const std::string& feature) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDFeatureGating> CDFeatureGatingTable::GetEntries(void) const {
|
std::vector<CDFeatureGating> CDFeatureGatingTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDFeatureGatingTable.hpp
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ItemComponent Struct
|
||||||
struct CDFeatureGating {
|
struct CDFeatureGating {
|
||||||
std::string featureName;
|
std::string featureName;
|
||||||
int32_t major;
|
int32_t major;
|
||||||
@@ -11,16 +16,37 @@ struct CDFeatureGating {
|
|||||||
std::string description;
|
std::string description;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDFeatureGatingTable : public CDTable<CDFeatureGatingTable> {
|
//! ItemComponent table
|
||||||
|
class CDFeatureGatingTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDFeatureGating> entries;
|
std::vector<CDFeatureGating> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDFeatureGatingTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDFeatureGatingTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDFeatureGatingTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDFeatureGating> Query(std::function<bool(CDFeatureGating)> predicate);
|
std::vector<CDFeatureGating> Query(std::function<bool(CDFeatureGating)> predicate);
|
||||||
|
|
||||||
bool FeatureUnlocked(const std::string& feature) const;
|
bool FeatureUnlocked(const std::string& feature) const;
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDFeatureGating> GetEntries(void) const;
|
std::vector<CDFeatureGating> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,6 +33,15 @@ CDInventoryComponentTable::CDInventoryComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDInventoryComponentTable::~CDInventoryComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDInventoryComponentTable::GetName(void) const {
|
||||||
|
return "InventoryComponent";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDInventoryComponent> CDInventoryComponentTable::Query(std::function<bool(CDInventoryComponent)> predicate) {
|
std::vector<CDInventoryComponent> CDInventoryComponentTable::Query(std::function<bool(CDInventoryComponent)> predicate) {
|
||||||
|
|
||||||
std::vector<CDInventoryComponent> data = cpplinq::from(this->entries)
|
std::vector<CDInventoryComponent> data = cpplinq::from(this->entries)
|
||||||
@@ -42,6 +51,7 @@ std::vector<CDInventoryComponent> CDInventoryComponentTable::Query(std::function
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDInventoryComponent> CDInventoryComponentTable::GetEntries(void) const {
|
std::vector<CDInventoryComponent> CDInventoryComponentTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDInventoryComponentTable.hpp
|
||||||
|
\brief Contains data for the InventoryComponent table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ItemComponent Struct
|
||||||
struct CDInventoryComponent {
|
struct CDInventoryComponent {
|
||||||
unsigned int id; //!< The component ID for this object
|
unsigned int id; //!< The component ID for this object
|
||||||
unsigned int itemid; //!< The LOT of the object
|
unsigned int itemid; //!< The LOT of the object
|
||||||
@@ -10,14 +16,35 @@ struct CDInventoryComponent {
|
|||||||
bool equip; //!< Whether or not to equip the item
|
bool equip; //!< Whether or not to equip the item
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDInventoryComponentTable : public CDTable<CDInventoryComponentTable> {
|
//! ItemComponent table
|
||||||
|
class CDInventoryComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDInventoryComponent> entries;
|
std::vector<CDInventoryComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDInventoryComponentTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDInventoryComponentTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDInventoryComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDInventoryComponent> Query(std::function<bool(CDInventoryComponent)> predicate);
|
std::vector<CDInventoryComponent> Query(std::function<bool(CDInventoryComponent)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDInventoryComponent> GetEntries(void) const;
|
std::vector<CDInventoryComponent> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -74,6 +74,14 @@ CDItemComponentTable::CDItemComponentTable(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDItemComponentTable::~CDItemComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDItemComponentTable::GetName(void) const {
|
||||||
|
return "ItemComponent";
|
||||||
|
}
|
||||||
|
|
||||||
const CDItemComponent& CDItemComponentTable::GetItemComponentByID(unsigned int skillID) {
|
const CDItemComponent& CDItemComponentTable::GetItemComponentByID(unsigned int skillID) {
|
||||||
const auto& it = this->entries.find(skillID);
|
const auto& it = this->entries.find(skillID);
|
||||||
if (it != this->entries.end()) {
|
if (it != this->entries.end()) {
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
#include "dCommonVars.h"
|
#include "dCommonVars.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDItemComponentTable.hpp
|
||||||
|
\brief Contains data for the ItemComponent table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ItemComponent Struct
|
||||||
struct CDItemComponent {
|
struct CDItemComponent {
|
||||||
unsigned int id; //!< The Component ID
|
unsigned int id; //!< The Component ID
|
||||||
std::string equipLocation; //!< The equip location
|
std::string equipLocation; //!< The equip location
|
||||||
@@ -49,15 +55,28 @@ struct CDItemComponent {
|
|||||||
float SellMultiplier; //!< Something to do with early vendors perhaps (but replaced)
|
float SellMultiplier; //!< Something to do with early vendors perhaps (but replaced)
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDItemComponentTable : public CDTable<CDItemComponentTable> {
|
//! ItemComponent table
|
||||||
|
class CDItemComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::map<unsigned int, CDItemComponent> entries;
|
std::map<unsigned int, CDItemComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDItemComponentTable();
|
|
||||||
|
//! Constructor
|
||||||
|
CDItemComponentTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDItemComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
static std::map<LOT, uint32_t> ParseCraftingCurrencies(const CDItemComponent& itemComponent);
|
static std::map<LOT, uint32_t> ParseCraftingCurrencies(const CDItemComponent& itemComponent);
|
||||||
|
|
||||||
// Gets an entry by ID
|
//! Gets an entry by ID
|
||||||
const CDItemComponent& GetItemComponentByID(unsigned int skillID);
|
const CDItemComponent& GetItemComponentByID(unsigned int skillID);
|
||||||
|
|
||||||
static CDItemComponent Default;
|
static CDItemComponent Default;
|
||||||
|
|||||||
@@ -32,6 +32,15 @@ CDItemSetSkillsTable::CDItemSetSkillsTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDItemSetSkillsTable::~CDItemSetSkillsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDItemSetSkillsTable::GetName(void) const {
|
||||||
|
return "ItemSetSkills";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDItemSetSkills> CDItemSetSkillsTable::Query(std::function<bool(CDItemSetSkills)> predicate) {
|
std::vector<CDItemSetSkills> CDItemSetSkillsTable::Query(std::function<bool(CDItemSetSkills)> predicate) {
|
||||||
|
|
||||||
std::vector<CDItemSetSkills> data = cpplinq::from(this->entries)
|
std::vector<CDItemSetSkills> data = cpplinq::from(this->entries)
|
||||||
@@ -41,6 +50,7 @@ std::vector<CDItemSetSkills> CDItemSetSkillsTable::Query(std::function<bool(CDIt
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetEntries(void) const {
|
std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
@@ -55,3 +65,4 @@ std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetBySkillID(unsigned int Ski
|
|||||||
|
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,22 +3,50 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDItemSetSkillsTable.hpp
|
||||||
|
\brief Contains data for the ItemSetSkills table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ZoneTable Struct
|
||||||
struct CDItemSetSkills {
|
struct CDItemSetSkills {
|
||||||
unsigned int SkillSetID; //!< The skill set ID
|
unsigned int SkillSetID; //!< The skill set ID
|
||||||
unsigned int SkillID; //!< The skill ID
|
unsigned int SkillID; //!< The skill ID
|
||||||
unsigned int SkillCastType; //!< The skill cast type
|
unsigned int SkillCastType; //!< The skill cast type
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDItemSetSkillsTable : public CDTable<CDItemSetSkillsTable> {
|
//! ItemSets table
|
||||||
|
class CDItemSetSkillsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDItemSetSkills> entries;
|
std::vector<CDItemSetSkills> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDItemSetSkillsTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDItemSetSkillsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDItemSetSkillsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDItemSetSkills> Query(std::function<bool(CDItemSetSkills)> predicate);
|
std::vector<CDItemSetSkills> Query(std::function<bool(CDItemSetSkills)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDItemSetSkills> GetEntries(void) const;
|
std::vector<CDItemSetSkills> GetEntries(void) const;
|
||||||
|
|
||||||
std::vector<CDItemSetSkills> GetBySkillID(unsigned int SkillSetID);
|
std::vector<CDItemSetSkills> GetBySkillID(unsigned int SkillSetID);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,15 @@ CDItemSetsTable::CDItemSetsTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDItemSetsTable::~CDItemSetsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDItemSetsTable::GetName(void) const {
|
||||||
|
return "ItemSets";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDItemSets> CDItemSetsTable::Query(std::function<bool(CDItemSets)> predicate) {
|
std::vector<CDItemSets> CDItemSetsTable::Query(std::function<bool(CDItemSets)> predicate) {
|
||||||
|
|
||||||
std::vector<CDItemSets> data = cpplinq::from(this->entries)
|
std::vector<CDItemSets> data = cpplinq::from(this->entries)
|
||||||
@@ -53,6 +62,7 @@ std::vector<CDItemSets> CDItemSetsTable::Query(std::function<bool(CDItemSets)> p
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
std::vector<CDItemSets> CDItemSetsTable::GetEntries(void) const {
|
std::vector<CDItemSets> CDItemSetsTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDItemSetsTable.hpp
|
||||||
|
\brief Contains data for the ItemSets table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ZoneTable Struct
|
||||||
struct CDItemSets {
|
struct CDItemSets {
|
||||||
unsigned int setID; //!< The item set ID
|
unsigned int setID; //!< The item set ID
|
||||||
unsigned int locStatus; //!< The loc status
|
unsigned int locStatus; //!< The loc status
|
||||||
@@ -21,15 +27,36 @@ struct CDItemSets {
|
|||||||
float priority; //!< The priority
|
float priority; //!< The priority
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDItemSetsTable : public CDTable<CDItemSetsTable> {
|
//! ItemSets table
|
||||||
|
class CDItemSetsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDItemSets> entries;
|
std::vector<CDItemSets> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDItemSetsTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDItemSetsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDItemSetsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDItemSets> Query(std::function<bool(CDItemSets)> predicate);
|
std::vector<CDItemSets> Query(std::function<bool(CDItemSets)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDItemSets> GetEntries(void) const;
|
std::vector<CDItemSets> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ CDLevelProgressionLookupTable::CDLevelProgressionLookupTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDLevelProgressionLookupTable::~CDLevelProgressionLookupTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDLevelProgressionLookupTable::GetName(void) const {
|
||||||
|
return "LevelProgressionLookup";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDLevelProgressionLookup> CDLevelProgressionLookupTable::Query(std::function<bool(CDLevelProgressionLookup)> predicate) {
|
std::vector<CDLevelProgressionLookup> CDLevelProgressionLookupTable::Query(std::function<bool(CDLevelProgressionLookup)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,21 +3,47 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDLevelProgressionLookupTable.hpp
|
||||||
|
\brief Contains data for the LevelProgressionLookup table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! LevelProgressionLookup Entry Struct
|
||||||
struct CDLevelProgressionLookup {
|
struct CDLevelProgressionLookup {
|
||||||
unsigned int id; //!< The Level ID
|
unsigned int id; //!< The Level ID
|
||||||
unsigned int requiredUScore; //!< The required LEGO Score
|
unsigned int requiredUScore; //!< The required LEGO Score
|
||||||
std::string BehaviorEffect; //!< The behavior effect attached to this
|
std::string BehaviorEffect; //!< The behavior effect attached to this
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDLevelProgressionLookupTable : public CDTable<CDLevelProgressionLookupTable> {
|
//! LevelProgressionLookup table
|
||||||
|
class CDLevelProgressionLookupTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDLevelProgressionLookup> entries;
|
std::vector<CDLevelProgressionLookup> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDLevelProgressionLookupTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDLevelProgressionLookupTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDLevelProgressionLookupTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDLevelProgressionLookup> Query(std::function<bool(CDLevelProgressionLookup)> predicate);
|
std::vector<CDLevelProgressionLookup> Query(std::function<bool(CDLevelProgressionLookup)> predicate);
|
||||||
|
|
||||||
// Gets all the entries in the table
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDLevelProgressionLookup> GetEntries(void) const;
|
std::vector<CDLevelProgressionLookup> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,6 +38,15 @@ CDLootMatrixTable::CDLootMatrixTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDLootMatrixTable::~CDLootMatrixTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDLootMatrixTable::GetName(void) const {
|
||||||
|
return "LootMatrix";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDLootMatrix> CDLootMatrixTable::Query(std::function<bool(CDLootMatrix)> predicate) {
|
std::vector<CDLootMatrix> CDLootMatrixTable::Query(std::function<bool(CDLootMatrix)> predicate) {
|
||||||
|
|
||||||
std::vector<CDLootMatrix> data = cpplinq::from(this->entries)
|
std::vector<CDLootMatrix> data = cpplinq::from(this->entries)
|
||||||
@@ -47,6 +56,7 @@ std::vector<CDLootMatrix> CDLootMatrixTable::Query(std::function<bool(CDLootMatr
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
const std::vector<CDLootMatrix>& CDLootMatrixTable::GetEntries(void) const {
|
const std::vector<CDLootMatrix>& CDLootMatrixTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDLootMatrixTable.hpp
|
||||||
|
\brief Contains data for the ObjectSkills table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! LootMatrix Struct
|
||||||
struct CDLootMatrix {
|
struct CDLootMatrix {
|
||||||
unsigned int LootMatrixIndex; //!< The Loot Matrix Index
|
unsigned int LootMatrixIndex; //!< The Loot Matrix Index
|
||||||
unsigned int LootTableIndex; //!< The Loot Table Index
|
unsigned int LootTableIndex; //!< The Loot Table Index
|
||||||
@@ -15,15 +21,36 @@ struct CDLootMatrix {
|
|||||||
UNUSED(std::string gate_version); //!< The Gate Version
|
UNUSED(std::string gate_version); //!< The Gate Version
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDLootMatrixTable : public CDTable<CDLootMatrixTable> {
|
//! MissionNPCComponent table
|
||||||
|
class CDLootMatrixTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDLootMatrix> entries;
|
std::vector<CDLootMatrix> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDLootMatrixTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDLootMatrixTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDLootMatrixTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDLootMatrix> Query(std::function<bool(CDLootMatrix)> predicate);
|
std::vector<CDLootMatrix> Query(std::function<bool(CDLootMatrix)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
const std::vector<CDLootMatrix>& GetEntries(void) const;
|
const std::vector<CDLootMatrix>& GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ CDLootTableTable::CDLootTableTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDLootTableTable::~CDLootTableTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDLootTableTable::GetName(void) const {
|
||||||
|
return "LootTable";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDLootTable> CDLootTableTable::Query(std::function<bool(CDLootTable)> predicate) {
|
std::vector<CDLootTable> CDLootTableTable::Query(std::function<bool(CDLootTable)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDLootTableTable.hpp
|
||||||
|
\brief Contains data for the LootTable table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! LootTable Struct
|
||||||
struct CDLootTable {
|
struct CDLootTable {
|
||||||
unsigned int itemid; //!< The LOT of the item
|
unsigned int itemid; //!< The LOT of the item
|
||||||
unsigned int LootTableIndex; //!< The Loot Table Index
|
unsigned int LootTableIndex; //!< The Loot Table Index
|
||||||
@@ -11,15 +17,36 @@ struct CDLootTable {
|
|||||||
unsigned int sortPriority; //!< The sorting priority
|
unsigned int sortPriority; //!< The sorting priority
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDLootTableTable : public CDTable<CDLootTableTable> {
|
//! LootTable table
|
||||||
|
class CDLootTableTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDLootTable> entries;
|
std::vector<CDLootTable> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDLootTableTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDLootTableTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDLootTableTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDLootTable> Query(std::function<bool(CDLootTable)> predicate);
|
std::vector<CDLootTable> Query(std::function<bool(CDLootTable)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
const std::vector<CDLootTable>& GetEntries(void) const;
|
const std::vector<CDLootTable>& GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,14 @@ CDMissionEmailTable::CDMissionEmailTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDMissionEmailTable::~CDMissionEmailTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDMissionEmailTable::GetName(void) const {
|
||||||
|
return "MissionEmail";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDMissionEmail> CDMissionEmailTable::Query(std::function<bool(CDMissionEmail)> predicate) {
|
std::vector<CDMissionEmail> CDMissionEmailTable::Query(std::function<bool(CDMissionEmail)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDMissionEmailTable.hpp
|
||||||
|
\brief Contains data for the MissionEmail table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! MissionEmail Entry Struct
|
||||||
struct CDMissionEmail {
|
struct CDMissionEmail {
|
||||||
unsigned int ID;
|
unsigned int ID;
|
||||||
unsigned int messageType;
|
unsigned int messageType;
|
||||||
@@ -15,14 +21,35 @@ struct CDMissionEmail {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CDMissionEmailTable : public CDTable<CDMissionEmailTable> {
|
//! MissionEmail table
|
||||||
|
class CDMissionEmailTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDMissionEmail> entries;
|
std::vector<CDMissionEmail> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDMissionEmailTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDMissionEmailTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDMissionEmailTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDMissionEmail> Query(std::function<bool(CDMissionEmail)> predicate);
|
std::vector<CDMissionEmail> Query(std::function<bool(CDMissionEmail)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDMissionEmail> GetEntries(void) const;
|
std::vector<CDMissionEmail> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,6 +34,14 @@ CDMissionNPCComponentTable::CDMissionNPCComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDMissionNPCComponentTable::~CDMissionNPCComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDMissionNPCComponentTable::GetName(void) const {
|
||||||
|
return "MissionNPCComponent";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDMissionNPCComponent> CDMissionNPCComponentTable::Query(std::function<bool(CDMissionNPCComponent)> predicate) {
|
std::vector<CDMissionNPCComponent> CDMissionNPCComponentTable::Query(std::function<bool(CDMissionNPCComponent)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDMissionNPCComponentTable.hpp
|
||||||
|
\brief Contains data for the ObjectSkills table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! MissionNPCComponent Struct
|
||||||
struct CDMissionNPCComponent {
|
struct CDMissionNPCComponent {
|
||||||
unsigned int id; //!< The ID
|
unsigned int id; //!< The ID
|
||||||
unsigned int missionID; //!< The Mission ID
|
unsigned int missionID; //!< The Mission ID
|
||||||
@@ -11,16 +17,35 @@ struct CDMissionNPCComponent {
|
|||||||
std::string gate_version; //!< The gate version
|
std::string gate_version; //!< The gate version
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDMissionNPCComponentTable : public CDTable<CDMissionNPCComponentTable> {
|
//! MissionNPCComponent table
|
||||||
|
class CDMissionNPCComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDMissionNPCComponent> entries;
|
std::vector<CDMissionNPCComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDMissionNPCComponentTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDMissionNPCComponentTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDMissionNPCComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDMissionNPCComponent> Query(std::function<bool(CDMissionNPCComponent)> predicate);
|
std::vector<CDMissionNPCComponent> Query(std::function<bool(CDMissionNPCComponent)> predicate);
|
||||||
|
|
||||||
// Gets all the entries in the table
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDMissionNPCComponent> GetEntries(void) const;
|
std::vector<CDMissionNPCComponent> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,6 +42,15 @@ CDMissionTasksTable::CDMissionTasksTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDMissionTasksTable::~CDMissionTasksTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDMissionTasksTable::GetName(void) const {
|
||||||
|
return "MissionTasks";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDMissionTasks> CDMissionTasksTable::Query(std::function<bool(CDMissionTasks)> predicate) {
|
std::vector<CDMissionTasks> CDMissionTasksTable::Query(std::function<bool(CDMissionTasks)> predicate) {
|
||||||
|
|
||||||
std::vector<CDMissionTasks> data = cpplinq::from(this->entries)
|
std::vector<CDMissionTasks> data = cpplinq::from(this->entries)
|
||||||
@@ -65,6 +74,7 @@ std::vector<CDMissionTasks*> CDMissionTasksTable::GetByMissionID(uint32_t missio
|
|||||||
return tasks;
|
return tasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
const std::vector<CDMissionTasks>& CDMissionTasksTable::GetEntries(void) const {
|
const std::vector<CDMissionTasks>& CDMissionTasksTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDMissionTasksTable.hpp
|
||||||
|
\brief Contains data for the MissionTasks table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ObjectSkills Struct
|
||||||
struct CDMissionTasks {
|
struct CDMissionTasks {
|
||||||
unsigned int id; //!< The Mission ID that the task belongs to
|
unsigned int id; //!< The Mission ID that the task belongs to
|
||||||
UNUSED(unsigned int locStatus); //!< ???
|
UNUSED(unsigned int locStatus); //!< ???
|
||||||
@@ -19,17 +25,37 @@ struct CDMissionTasks {
|
|||||||
UNUSED(std::string gate_version); //!< ???
|
UNUSED(std::string gate_version); //!< ???
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDMissionTasksTable : public CDTable<CDMissionTasksTable> {
|
//! ObjectSkills table
|
||||||
|
class CDMissionTasksTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDMissionTasks> entries;
|
std::vector<CDMissionTasks> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDMissionTasksTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDMissionTasksTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDMissionTasksTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDMissionTasks> Query(std::function<bool(CDMissionTasks)> predicate);
|
std::vector<CDMissionTasks> Query(std::function<bool(CDMissionTasks)> predicate);
|
||||||
|
|
||||||
std::vector<CDMissionTasks*> GetByMissionID(uint32_t missionID);
|
std::vector<CDMissionTasks*> GetByMissionID(uint32_t missionID);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
const std::vector<CDMissionTasks>& GetEntries(void) const;
|
const std::vector<CDMissionTasks>& GetEntries(void) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,15 @@ CDMissionsTable::CDMissionsTable(void) {
|
|||||||
Default.id = -1;
|
Default.id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDMissionsTable::~CDMissionsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDMissionsTable::GetName(void) const {
|
||||||
|
return "Missions";
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDMissions> CDMissionsTable::Query(std::function<bool(CDMissions)> predicate) {
|
std::vector<CDMissions> CDMissionsTable::Query(std::function<bool(CDMissions)> predicate) {
|
||||||
|
|
||||||
std::vector<CDMissions> data = cpplinq::from(this->entries)
|
std::vector<CDMissions> data = cpplinq::from(this->entries)
|
||||||
@@ -94,6 +103,7 @@ std::vector<CDMissions> CDMissionsTable::Query(std::function<bool(CDMissions)> p
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
const std::vector<CDMissions>& CDMissionsTable::GetEntries(void) const {
|
const std::vector<CDMissions>& CDMissionsTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDMissionsTable.hpp
|
||||||
|
\brief Contains data for the Missions table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! Missions Struct
|
||||||
struct CDMissions {
|
struct CDMissions {
|
||||||
int id; //!< The Mission ID
|
int id; //!< The Mission ID
|
||||||
std::string defined_type; //!< The type of mission
|
std::string defined_type; //!< The type of mission
|
||||||
@@ -60,16 +66,35 @@ struct CDMissions {
|
|||||||
int reward_bankinventory; //!< The amount of bank space this mission rewards
|
int reward_bankinventory; //!< The amount of bank space this mission rewards
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDMissionsTable : public CDTable<CDMissionsTable> {
|
//! Missions table
|
||||||
|
class CDMissionsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDMissions> entries;
|
std::vector<CDMissions> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDMissionsTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDMissionsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDMissionsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDMissions> Query(std::function<bool(CDMissions)> predicate);
|
std::vector<CDMissions> Query(std::function<bool(CDMissions)> predicate);
|
||||||
|
|
||||||
// Gets all the entries in the table
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
const std::vector<CDMissions>& GetEntries(void) const;
|
const std::vector<CDMissions>& GetEntries(void) const;
|
||||||
|
|
||||||
const CDMissions* GetPtrByMissionID(uint32_t missionID) const;
|
const CDMissions* GetPtrByMissionID(uint32_t missionID) const;
|
||||||
|
|||||||
@@ -37,6 +37,14 @@ CDMovementAIComponentTable::CDMovementAIComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDMovementAIComponentTable::~CDMovementAIComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDMovementAIComponentTable::GetName(void) const {
|
||||||
|
return "MovementAIComponent";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDMovementAIComponent> CDMovementAIComponentTable::Query(std::function<bool(CDMovementAIComponent)> predicate) {
|
std::vector<CDMovementAIComponent> CDMovementAIComponentTable::Query(std::function<bool(CDMovementAIComponent)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDMovementAIComponentTable.hpp
|
||||||
|
\brief Contains data for the MovementAIComponent table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! MovementAIComponent Struct
|
||||||
struct CDMovementAIComponent {
|
struct CDMovementAIComponent {
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
std::string MovementType;
|
std::string MovementType;
|
||||||
@@ -14,15 +20,36 @@ struct CDMovementAIComponent {
|
|||||||
std::string attachedPath;
|
std::string attachedPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDMovementAIComponentTable : public CDTable<CDMovementAIComponentTable> {
|
//! MovementAIComponent table
|
||||||
|
class CDMovementAIComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDMovementAIComponent> entries;
|
std::vector<CDMovementAIComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDMovementAIComponentTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDMovementAIComponentTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDMovementAIComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDMovementAIComponent> Query(std::function<bool(CDMovementAIComponent)> predicate);
|
std::vector<CDMovementAIComponent> Query(std::function<bool(CDMovementAIComponent)> predicate);
|
||||||
|
|
||||||
// Gets all the entries in the table
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDMovementAIComponent> GetEntries(void) const;
|
std::vector<CDMovementAIComponent> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ CDObjectSkillsTable::CDObjectSkillsTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDObjectSkillsTable::~CDObjectSkillsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDObjectSkillsTable::GetName(void) const {
|
||||||
|
return "ObjectSkills";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDObjectSkills> CDObjectSkillsTable::Query(std::function<bool(CDObjectSkills)> predicate) {
|
std::vector<CDObjectSkills> CDObjectSkillsTable::Query(std::function<bool(CDObjectSkills)> predicate) {
|
||||||
|
|
||||||
@@ -47,3 +55,4 @@ std::vector<CDObjectSkills> CDObjectSkillsTable::Query(std::function<bool(CDObje
|
|||||||
std::vector<CDObjectSkills> CDObjectSkillsTable::GetEntries(void) const {
|
std::vector<CDObjectSkills> CDObjectSkillsTable::GetEntries(void) const {
|
||||||
return this->entries;
|
return this->entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDObjectSkillsTable.hpp
|
||||||
|
\brief Contains data for the ObjectSkills table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ObjectSkills Struct
|
||||||
struct CDObjectSkills {
|
struct CDObjectSkills {
|
||||||
unsigned int objectTemplate; //!< The LOT of the item
|
unsigned int objectTemplate; //!< The LOT of the item
|
||||||
unsigned int skillID; //!< The Skill ID of the object
|
unsigned int skillID; //!< The Skill ID of the object
|
||||||
@@ -10,16 +16,35 @@ struct CDObjectSkills {
|
|||||||
unsigned int AICombatWeight; //!< ???
|
unsigned int AICombatWeight; //!< ???
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDObjectSkillsTable : public CDTable<CDObjectSkillsTable> {
|
//! ObjectSkills table
|
||||||
|
class CDObjectSkillsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDObjectSkills> entries;
|
std::vector<CDObjectSkills> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDObjectSkillsTable();
|
|
||||||
// Queries the table with a custom "where" clause
|
//! Constructor
|
||||||
|
CDObjectSkillsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDObjectSkillsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDObjectSkills> Query(std::function<bool(CDObjectSkills)> predicate);
|
std::vector<CDObjectSkills> Query(std::function<bool(CDObjectSkills)> predicate);
|
||||||
|
|
||||||
// Gets all the entries in the table
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDObjectSkills> GetEntries(void) const;
|
std::vector<CDObjectSkills> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,6 +43,14 @@ CDObjectsTable::CDObjectsTable(void) {
|
|||||||
m_default.id = 0;
|
m_default.id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDObjectsTable::~CDObjectsTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDObjectsTable::GetName(void) const {
|
||||||
|
return "Objects";
|
||||||
|
}
|
||||||
|
|
||||||
const CDObjects& CDObjectsTable::GetByID(unsigned int LOT) {
|
const CDObjects& CDObjectsTable::GetByID(unsigned int LOT) {
|
||||||
const auto& it = this->entries.find(LOT);
|
const auto& it = this->entries.find(LOT);
|
||||||
if (it != this->entries.end()) {
|
if (it != this->entries.end()) {
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDObjectsTable.hpp
|
||||||
|
\brief Contains data for the Objects table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! RebuildComponent Struct
|
||||||
struct CDObjects {
|
struct CDObjects {
|
||||||
unsigned int id; //!< The LOT of the object
|
unsigned int id; //!< The LOT of the object
|
||||||
std::string name; //!< The internal name of the object
|
std::string name; //!< The internal name of the object
|
||||||
@@ -20,14 +26,29 @@ struct CDObjects {
|
|||||||
UNUSED(unsigned int HQ_valid); //!< Probably used for the Nexus HQ database on LEGOUniverse.com
|
UNUSED(unsigned int HQ_valid); //!< Probably used for the Nexus HQ database on LEGOUniverse.com
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDObjectsTable : public CDTable<CDObjectsTable> {
|
//! ObjectSkills table
|
||||||
|
class CDObjectsTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
|
//std::vector<CDObjects> entries;
|
||||||
std::map<unsigned int, CDObjects> entries;
|
std::map<unsigned int, CDObjects> entries;
|
||||||
CDObjects m_default;
|
CDObjects m_default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CDObjectsTable();
|
|
||||||
// Gets an entry by ID
|
//! Constructor
|
||||||
|
CDObjectsTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDObjectsTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Gets an entry by ID
|
||||||
const CDObjects& GetByID(unsigned int LOT);
|
const CDObjects& GetByID(unsigned int LOT);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ CDPackageComponentTable::CDPackageComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDPackageComponentTable::~CDPackageComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDPackageComponentTable::GetName(void) const {
|
||||||
|
return "PackageComponent";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDPackageComponent> CDPackageComponentTable::Query(std::function<bool(CDPackageComponent)> predicate) {
|
std::vector<CDPackageComponent> CDPackageComponentTable::Query(std::function<bool(CDPackageComponent)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,20 +3,48 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDPackageComponentTable.hpp
|
||||||
|
\brief Contains data for the PackageComponent table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! PackageComponent Entry Struct
|
||||||
struct CDPackageComponent {
|
struct CDPackageComponent {
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
unsigned int LootMatrixIndex;
|
unsigned int LootMatrixIndex;
|
||||||
unsigned int packageType;
|
unsigned int packageType;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDPackageComponentTable : public CDTable<CDPackageComponentTable> {
|
|
||||||
|
//! PackageComponent table
|
||||||
|
class CDPackageComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDPackageComponent> entries;
|
std::vector<CDPackageComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDPackageComponentTable(void);
|
CDPackageComponentTable(void);
|
||||||
// Queries the table with a custom "where" clause
|
|
||||||
|
//! Destructor
|
||||||
|
~CDPackageComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDPackageComponent> Query(std::function<bool(CDPackageComponent)> predicate);
|
std::vector<CDPackageComponent> Query(std::function<bool(CDPackageComponent)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDPackageComponent> GetEntries(void) const;
|
std::vector<CDPackageComponent> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ CDPhysicsComponentTable::CDPhysicsComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
CDPhysicsComponentTable::~CDPhysicsComponentTable() {
|
CDPhysicsComponentTable::~CDPhysicsComponentTable(void) {
|
||||||
for (auto e : m_entries) {
|
for (auto e : m_entries) {
|
||||||
if (e.second) delete e.second;
|
if (e.second) delete e.second;
|
||||||
}
|
}
|
||||||
@@ -36,6 +36,10 @@ CDPhysicsComponentTable::~CDPhysicsComponentTable() {
|
|||||||
m_entries.clear();
|
m_entries.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CDPhysicsComponentTable::GetName(void) const {
|
||||||
|
return "PhysicsComponent";
|
||||||
|
}
|
||||||
|
|
||||||
CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) {
|
CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) {
|
||||||
for (auto e : m_entries) {
|
for (auto e : m_entries) {
|
||||||
if (e.first == componentID) return e.second;
|
if (e.first == componentID) return e.second;
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ struct CDPhysicsComponent {
|
|||||||
UNUSED(std::string gravityVolumeAsset);
|
UNUSED(std::string gravityVolumeAsset);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDPhysicsComponentTable : public CDTable<CDPhysicsComponentTable> {
|
class CDPhysicsComponentTable : public CDTable {
|
||||||
public:
|
public:
|
||||||
CDPhysicsComponentTable();
|
CDPhysicsComponentTable(void);
|
||||||
~CDPhysicsComponentTable();
|
~CDPhysicsComponentTable(void);
|
||||||
|
|
||||||
static const std::string GetTableName() { return "PhysicsComponent"; };
|
std::string GetName(void) const override;
|
||||||
CDPhysicsComponent* GetByID(unsigned int componentID);
|
CDPhysicsComponent* GetByID(unsigned int componentID);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ CDPropertyEntranceComponentTable::CDPropertyEntranceComponentTable() {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CDPropertyEntranceComponentTable::~CDPropertyEntranceComponentTable(void) = default;
|
||||||
|
|
||||||
|
std::string CDPropertyEntranceComponentTable::GetName() const {
|
||||||
|
return "PropertyEntranceComponent";
|
||||||
|
}
|
||||||
|
|
||||||
CDPropertyEntranceComponent CDPropertyEntranceComponentTable::GetByID(uint32_t id) {
|
CDPropertyEntranceComponent CDPropertyEntranceComponentTable::GetByID(uint32_t id) {
|
||||||
for (const auto& entry : entries) {
|
for (const auto& entry : entries) {
|
||||||
if (entry.id == id)
|
if (entry.id == id)
|
||||||
|
|||||||
@@ -9,13 +9,31 @@ struct CDPropertyEntranceComponent {
|
|||||||
std::string groupType;
|
std::string groupType;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDPropertyEntranceComponentTable : public CDTable<CDPropertyEntranceComponentTable> {
|
class CDPropertyEntranceComponentTable : public CDTable {
|
||||||
public:
|
public:
|
||||||
|
//! Constructor
|
||||||
CDPropertyEntranceComponentTable();
|
CDPropertyEntranceComponentTable();
|
||||||
// Queries the table with a custom "where" clause
|
|
||||||
|
//! Destructor
|
||||||
|
~CDPropertyEntranceComponentTable();
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
[[nodiscard]] std::string GetName() const override;
|
||||||
|
|
||||||
|
|
||||||
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
CDPropertyEntranceComponent GetByID(uint32_t id);
|
CDPropertyEntranceComponent GetByID(uint32_t id);
|
||||||
|
|
||||||
// Gets all the entries in the table
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
[[nodiscard]] std::vector<CDPropertyEntranceComponent> GetEntries() const { return entries; }
|
[[nodiscard]] std::vector<CDPropertyEntranceComponent> GetEntries() const { return entries; }
|
||||||
private:
|
private:
|
||||||
std::vector<CDPropertyEntranceComponent> entries{};
|
std::vector<CDPropertyEntranceComponent> entries{};
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ CDPropertyTemplateTable::CDPropertyTemplateTable() {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CDPropertyTemplateTable::~CDPropertyTemplateTable() = default;
|
||||||
|
|
||||||
|
std::string CDPropertyTemplateTable::GetName() const {
|
||||||
|
return "PropertyTemplate";
|
||||||
|
}
|
||||||
|
|
||||||
CDPropertyTemplate CDPropertyTemplateTable::GetByMapID(uint32_t mapID) {
|
CDPropertyTemplate CDPropertyTemplateTable::GetByMapID(uint32_t mapID) {
|
||||||
for (const auto& entry : entries) {
|
for (const auto& entry : entries) {
|
||||||
if (entry.mapID == mapID)
|
if (entry.mapID == mapID)
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ struct CDPropertyTemplate {
|
|||||||
std::string spawnName;
|
std::string spawnName;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDPropertyTemplateTable : public CDTable<CDPropertyTemplateTable> {
|
class CDPropertyTemplateTable : public CDTable {
|
||||||
public:
|
public:
|
||||||
CDPropertyTemplateTable();
|
CDPropertyTemplateTable();
|
||||||
|
~CDPropertyTemplateTable();
|
||||||
|
|
||||||
static const std::string GetTableName() { return "PropertyTemplate"; };
|
[[nodiscard]] std::string GetName() const override;
|
||||||
CDPropertyTemplate GetByMapID(uint32_t mapID);
|
CDPropertyTemplate GetByMapID(uint32_t mapID);
|
||||||
private:
|
private:
|
||||||
std::vector<CDPropertyTemplate> entries{};
|
std::vector<CDPropertyTemplate> entries{};
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ CDProximityMonitorComponentTable::CDProximityMonitorComponentTable(void) {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
CDProximityMonitorComponentTable::~CDProximityMonitorComponentTable(void) {}
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
std::string CDProximityMonitorComponentTable::GetName(void) const {
|
||||||
|
return "ProximityMonitorComponent";
|
||||||
|
}
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
std::vector<CDProximityMonitorComponent> CDProximityMonitorComponentTable::Query(std::function<bool(CDProximityMonitorComponent)> predicate) {
|
std::vector<CDProximityMonitorComponent> CDProximityMonitorComponentTable::Query(std::function<bool(CDProximityMonitorComponent)> predicate) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
// Custom Classes
|
// Custom Classes
|
||||||
#include "CDTable.h"
|
#include "CDTable.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file CDProximityMonitorComponentTable.hpp
|
||||||
|
\brief Contains data for the ProximityMonitorComponent table
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! ProximityMonitorComponent Entry Struct
|
||||||
struct CDProximityMonitorComponent {
|
struct CDProximityMonitorComponent {
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
std::string Proximities;
|
std::string Proximities;
|
||||||
@@ -10,14 +16,36 @@ struct CDProximityMonitorComponent {
|
|||||||
bool LoadOnServer;
|
bool LoadOnServer;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDProximityMonitorComponentTable : public CDTable<CDProximityMonitorComponentTable> {
|
|
||||||
|
//! ProximityMonitorComponent table
|
||||||
|
class CDProximityMonitorComponentTable : public CDTable {
|
||||||
private:
|
private:
|
||||||
std::vector<CDProximityMonitorComponent> entries;
|
std::vector<CDProximityMonitorComponent> entries;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
CDProximityMonitorComponentTable(void);
|
CDProximityMonitorComponentTable(void);
|
||||||
|
|
||||||
|
//! Destructor
|
||||||
|
~CDProximityMonitorComponentTable(void);
|
||||||
|
|
||||||
|
//! Returns the table's name
|
||||||
|
/*!
|
||||||
|
\return The table name
|
||||||
|
*/
|
||||||
|
std::string GetName(void) const override;
|
||||||
|
|
||||||
//! Queries the table with a custom "where" clause
|
//! Queries the table with a custom "where" clause
|
||||||
|
/*!
|
||||||
|
\param predicate The predicate
|
||||||
|
*/
|
||||||
std::vector<CDProximityMonitorComponent> Query(std::function<bool(CDProximityMonitorComponent)> predicate);
|
std::vector<CDProximityMonitorComponent> Query(std::function<bool(CDProximityMonitorComponent)> predicate);
|
||||||
|
|
||||||
|
//! Gets all the entries in the table
|
||||||
|
/*!
|
||||||
|
\return The entries
|
||||||
|
*/
|
||||||
std::vector<CDProximityMonitorComponent> GetEntries(void) const;
|
std::vector<CDProximityMonitorComponent> GetEntries(void) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,6 +43,12 @@ CDRailActivatorComponentTable::CDRailActivatorComponentTable() {
|
|||||||
tableData.finalize();
|
tableData.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CDRailActivatorComponentTable::~CDRailActivatorComponentTable() = default;
|
||||||
|
|
||||||
|
std::string CDRailActivatorComponentTable::GetName() const {
|
||||||
|
return "RailActivatorComponent";
|
||||||
|
}
|
||||||
|
|
||||||
CDRailActivatorComponent CDRailActivatorComponentTable::GetEntryByID(int32_t id) const {
|
CDRailActivatorComponent CDRailActivatorComponentTable::GetEntryByID(int32_t id) const {
|
||||||
for (const auto& entry : m_Entries) {
|
for (const auto& entry : m_Entries) {
|
||||||
if (entry.id == id)
|
if (entry.id == id)
|
||||||
|
|||||||
@@ -20,10 +20,12 @@ struct CDRailActivatorComponent {
|
|||||||
bool showNameBillboard;
|
bool showNameBillboard;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDRailActivatorComponentTable : public CDTable<CDRailActivatorComponentTable> {
|
class CDRailActivatorComponentTable : public CDTable {
|
||||||
public:
|
public:
|
||||||
CDRailActivatorComponentTable();
|
CDRailActivatorComponentTable();
|
||||||
static const std::string GetTableName() { return "RailActivatorComponent"; };
|
~CDRailActivatorComponentTable();
|
||||||
|
|
||||||
|
std::string GetName() const override;
|
||||||
[[nodiscard]] CDRailActivatorComponent GetEntryByID(int32_t id) const;
|
[[nodiscard]] CDRailActivatorComponent GetEntryByID(int32_t id) const;
|
||||||
[[nodiscard]] std::vector<CDRailActivatorComponent> GetEntries() const;
|
[[nodiscard]] std::vector<CDRailActivatorComponent> GetEntries() const;
|
||||||
private:
|
private:
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user