mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-17 03:37:08 -06:00
Compare commits
49 Commits
MM12-Testi
...
item-compo
| Author | SHA1 | Date | |
|---|---|---|---|
| 15988afb4c | |||
| 5e9a956bed | |||
| c2d5be0e5d | |||
|
|
7671cc6865 | ||
|
|
bd79e9433c | ||
|
|
2bcf862f93 | ||
|
|
c3723371cf | ||
|
|
137a5e5c3d | ||
|
|
a532bc15d8 | ||
| ff0336793c | |||
|
|
49047a267b | ||
| 9d65d871d0 | |||
| e524b86e12 | |||
|
|
2837f68f44 | ||
|
|
a0c0a87956 | ||
|
|
3e482602d4 | ||
|
|
b6fc959433 | ||
| 6d989f37f1 | |||
|
|
d138b7b878 | ||
| 484488e47d | |||
|
|
72c93c8913 | ||
| 2ae9a92b55 | |||
| 50978620d8 | |||
| c168f6c970 | |||
| 3cd0d1ec3d | |||
| 91c0c1fcfb | |||
|
|
d17f51183e | ||
|
|
6aa69de4fd | ||
|
|
cdffd5ff30 | ||
| ac5f08f601 | |||
|
|
90d184ba93 | ||
| bff14fd391 | |||
| faf42d2f8c | |||
|
|
cff94b6c22 | ||
|
|
c8cd51ef63 | ||
| 6fd80e3117 | |||
|
|
14085d09bd | ||
|
|
7418e02365 | ||
|
|
fbaf1cbb25 | ||
| 872270704c | |||
|
|
7bca43ffc1 | ||
|
|
7aacfc1bf0 | ||
| 5557a98129 | |||
|
|
45d739499a | ||
|
|
5b30f4a5ae | ||
|
|
bfa4fbd5a9 | ||
|
|
e7bc4ef773 | ||
| ce39e3ad6b | |||
|
|
e67f310632 |
@@ -1,37 +0,0 @@
|
||||
---
|
||||
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
17
.clang-tidy
@@ -1,17 +0,0 @@
|
||||
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,3 +6,6 @@
|
||||
|
||||
# convert to unix line endings
|
||||
72477e01e2711e0f61cdb192ee266e5e21b8846f
|
||||
|
||||
# enum cleanup
|
||||
faf42d2f8cf432df2993b031f079b0b8c6d7dbe7
|
||||
|
||||
@@ -163,6 +163,7 @@ set(INCLUDED_DIRECTORIES
|
||||
"dGame/dMission"
|
||||
"dGame/dEntity"
|
||||
"dGame/dPropertyBehaviors"
|
||||
"dGame/dPropertyBehaviors/ControlBehaviorMessages"
|
||||
"dGame/dUtilities"
|
||||
"dPhysics"
|
||||
"dNavigation"
|
||||
|
||||
@@ -172,6 +172,10 @@ 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).
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
2
build.sh
2
build.sh
@@ -9,5 +9,5 @@ cd build
|
||||
cmake ..
|
||||
|
||||
# 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
|
||||
cmake --build . --config Release $1
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "dServer.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "dLogger.h"
|
||||
#include "AddFriendResponseCode.h"
|
||||
#include "AddFriendResponseType.h"
|
||||
#include "eAddFriendResponseCode.h"
|
||||
#include "eAddFriendResponseType.h"
|
||||
#include "RakString.h"
|
||||
#include "dConfig.h"
|
||||
|
||||
@@ -115,7 +115,7 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
||||
|
||||
auto requestor = playerContainer.GetPlayerData(requestorPlayerID);
|
||||
if (requestor->playerName == playerName) {
|
||||
SendFriendResponse(requestor, requestor, AddFriendResponseType::MYTHRAN);
|
||||
SendFriendResponse(requestor, requestor, eAddFriendResponseType::MYTHRAN);
|
||||
return;
|
||||
};
|
||||
std::unique_ptr<PlayerData> requestee(playerContainer.GetPlayerData(playerName));
|
||||
@@ -153,7 +153,7 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
||||
requestee.reset(new PlayerData());
|
||||
requestee->playerName = playerName;
|
||||
|
||||
SendFriendResponse(requestor, requestee.get(), result->next() ? AddFriendResponseType::NOTONLINE : AddFriendResponseType::INVALIDCHARACTER);
|
||||
SendFriendResponse(requestor, requestee.get(), result->next() ? eAddFriendResponseType::NOTONLINE : eAddFriendResponseType::INVALIDCHARACTER);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -197,10 +197,10 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
||||
if (oldBestFriendStatus != bestFriendStatus) {
|
||||
if (requestee->countOfBestFriends >= maxNumberOfBestFriends || requestor->countOfBestFriends >= maxNumberOfBestFriends) {
|
||||
if (requestee->countOfBestFriends >= maxNumberOfBestFriends) {
|
||||
SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::THEIRFRIENDLISTFULL, false);
|
||||
SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::THEIRFRIENDLISTFULL, false);
|
||||
}
|
||||
if (requestor->countOfBestFriends >= maxNumberOfBestFriends) {
|
||||
SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::YOURFRIENDSLISTFULL, false);
|
||||
SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::YOURFRIENDSLISTFULL, false);
|
||||
}
|
||||
} else {
|
||||
// Then update the database with this new info.
|
||||
@@ -215,8 +215,8 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
||||
if (bestFriendStatus == 3U) {
|
||||
requestee->countOfBestFriends += 1;
|
||||
requestor->countOfBestFriends += 1;
|
||||
if (requestee->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestee.get(), requestor, AddFriendResponseType::ACCEPTED, false, true);
|
||||
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::ACCEPTED, false, true);
|
||||
if (requestee->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestee.get(), requestor, eAddFriendResponseType::ACCEPTED, false, true);
|
||||
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::ACCEPTED, false, true);
|
||||
for (auto& friendData : requestor->friends) {
|
||||
if (friendData.friendID == requestee->playerID) {
|
||||
friendData.isBestFriend = true;
|
||||
@@ -230,7 +230,7 @@ void ChatPacketHandler::HandleFriendRequest(Packet* packet) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), AddFriendResponseType::WAITINGAPPROVAL, true, true);
|
||||
if (requestor->sysAddr != UNASSIGNED_SYSTEM_ADDRESS) SendFriendResponse(requestor, requestee.get(), eAddFriendResponseType::WAITINGAPPROVAL, true, true);
|
||||
}
|
||||
} else {
|
||||
// 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);
|
||||
|
||||
AddFriendResponseCode clientResponseCode = static_cast<AddFriendResponseCode>(packet->data[0x14]);
|
||||
eAddFriendResponseCode clientResponseCode = static_cast<eAddFriendResponseCode>(packet->data[0x14]);
|
||||
std::string friendName = PacketUtils::ReadString(0x15, packet, true);
|
||||
|
||||
//Now to try and find both of these:
|
||||
@@ -255,29 +255,29 @@ void ChatPacketHandler::HandleFriendResponse(Packet* packet) {
|
||||
auto requestee = playerContainer.GetPlayerData(friendName);
|
||||
if (!requestor || !requestee) return;
|
||||
|
||||
AddFriendResponseType serverResponseCode{};
|
||||
eAddFriendResponseType serverResponseCode{};
|
||||
uint8_t isAlreadyBestFriends = 0U;
|
||||
// We need to convert this response code to one we can actually send back to the client.
|
||||
switch (clientResponseCode) {
|
||||
case AddFriendResponseCode::ACCEPTED:
|
||||
serverResponseCode = AddFriendResponseType::ACCEPTED;
|
||||
case eAddFriendResponseCode::ACCEPTED:
|
||||
serverResponseCode = eAddFriendResponseType::ACCEPTED;
|
||||
break;
|
||||
case AddFriendResponseCode::BUSY:
|
||||
serverResponseCode = AddFriendResponseType::BUSY;
|
||||
case eAddFriendResponseCode::BUSY:
|
||||
serverResponseCode = eAddFriendResponseType::BUSY;
|
||||
break;
|
||||
case AddFriendResponseCode::CANCELLED:
|
||||
serverResponseCode = AddFriendResponseType::CANCELLED;
|
||||
case eAddFriendResponseCode::CANCELLED:
|
||||
serverResponseCode = eAddFriendResponseType::CANCELLED;
|
||||
break;
|
||||
case AddFriendResponseCode::REJECTED:
|
||||
serverResponseCode = AddFriendResponseType::DECLINED;
|
||||
case eAddFriendResponseCode::REJECTED:
|
||||
serverResponseCode = eAddFriendResponseType::DECLINED;
|
||||
break;
|
||||
}
|
||||
|
||||
// Now that we have handled the base cases, we need to check the other cases.
|
||||
if (serverResponseCode == AddFriendResponseType::ACCEPTED) {
|
||||
if (serverResponseCode == eAddFriendResponseType::ACCEPTED) {
|
||||
for (auto friendData : requestor->friends) {
|
||||
if (friendData.friendID == requestee->playerID) {
|
||||
serverResponseCode = AddFriendResponseType::ALREADYFRIEND;
|
||||
serverResponseCode = eAddFriendResponseType::ALREADYFRIEND;
|
||||
if (friendData.isBestFriend) {
|
||||
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.
|
||||
if (serverResponseCode == AddFriendResponseType::ACCEPTED) {
|
||||
if (serverResponseCode == eAddFriendResponseType::ACCEPTED) {
|
||||
// Add the each player to the others friend list.
|
||||
FriendData requestorData;
|
||||
requestorData.zoneID = requestor->zoneID;
|
||||
@@ -313,8 +313,8 @@ void ChatPacketHandler::HandleFriendResponse(Packet* packet) {
|
||||
statement->execute();
|
||||
}
|
||||
|
||||
if (serverResponseCode != AddFriendResponseType::DECLINED) SendFriendResponse(requestor, requestee, serverResponseCode, isAlreadyBestFriends);
|
||||
if (serverResponseCode != AddFriendResponseType::ALREADYFRIEND) SendFriendResponse(requestee, requestor, serverResponseCode, isAlreadyBestFriends);
|
||||
if (serverResponseCode != eAddFriendResponseType::DECLINED) SendFriendResponse(requestor, requestee, serverResponseCode, isAlreadyBestFriends);
|
||||
if (serverResponseCode != eAddFriendResponseType::ALREADYFRIEND) SendFriendResponse(requestee, requestor, serverResponseCode, isAlreadyBestFriends);
|
||||
}
|
||||
|
||||
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:
|
||||
for (auto fr : receiver->friends) {
|
||||
if (fr.friendID == sender->playerID) {
|
||||
SendFriendResponse(sender, receiver, AddFriendResponseType::ALREADYFRIEND, fr.isBestFriend);
|
||||
SendFriendResponse(sender, receiver, eAddFriendResponseType::ALREADYFRIEND, fr.isBestFriend);
|
||||
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;
|
||||
}
|
||||
|
||||
void ChatPacketHandler::SendFriendResponse(PlayerData* receiver, PlayerData* sender, AddFriendResponseType responseCode, uint8_t isBestFriendsAlready, uint8_t isBestFriendRequest) {
|
||||
void ChatPacketHandler::SendFriendResponse(PlayerData* receiver, PlayerData* sender, eAddFriendResponseType responseCode, uint8_t isBestFriendsAlready, uint8_t isBestFriendRequest) {
|
||||
if (!receiver || !sender) return;
|
||||
|
||||
CBITSTREAM;
|
||||
@@ -951,11 +951,11 @@ void ChatPacketHandler::SendFriendResponse(PlayerData* receiver, PlayerData* sen
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_ADD_FRIEND_RESPONSE);
|
||||
bitStream.Write(responseCode);
|
||||
// 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 != AddFriendResponseType::ACCEPTED ? isBestFriendsAlready : sender->sysAddr != UNASSIGNED_SYSTEM_ADDRESS);
|
||||
bitStream.Write<uint8_t>(responseCode != eAddFriendResponseType::ACCEPTED ? isBestFriendsAlready : sender->sysAddr != UNASSIGNED_SYSTEM_ADDRESS);
|
||||
// Then write the player name
|
||||
PacketUtils::WritePacketWString(sender->playerName.c_str(), 33, &bitStream);
|
||||
// Then if this is an acceptance code, write the following extra info.
|
||||
if (responseCode == AddFriendResponseType::ACCEPTED) {
|
||||
if (responseCode == eAddFriendResponseType::ACCEPTED) {
|
||||
bitStream.Write(sender->playerID);
|
||||
bitStream.Write(sender->zoneID);
|
||||
bitStream.Write(isBestFriendRequest); //isBFF
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "BitStream.h"
|
||||
|
||||
struct PlayerData;
|
||||
enum class AddFriendResponseType : uint8_t;
|
||||
enum class eAddFriendResponseType : uint8_t;
|
||||
|
||||
namespace ChatPacketHandler {
|
||||
void HandleFriendlistRequest(Packet* packet);
|
||||
@@ -35,6 +35,6 @@ namespace ChatPacketHandler {
|
||||
void SendFriendUpdate(PlayerData* friendData, PlayerData* playerData, uint8_t notifyType, uint8_t isBestFriend);
|
||||
|
||||
void SendFriendRequest(PlayerData* receiver, PlayerData* sender);
|
||||
void SendFriendResponse(PlayerData* receiver, PlayerData* sender, AddFriendResponseType responseCode, uint8_t isBestFriendsAlready = 0U, uint8_t isBestFriendRequest = 0U);
|
||||
void SendFriendResponse(PlayerData* receiver, PlayerData* sender, eAddFriendResponseType responseCode, uint8_t isBestFriendsAlready = 0U, uint8_t isBestFriendRequest = 0U);
|
||||
void SendRemoveFriend(PlayerData* receiver, std::string& personToRemove, bool isSuccessful);
|
||||
};
|
||||
|
||||
@@ -257,7 +257,7 @@ private:
|
||||
/*!
|
||||
\return The AMF value type
|
||||
*/
|
||||
AMFValueType GetValueType() { return ValueType; }
|
||||
AMFValueType GetValueType() override { return ValueType; }
|
||||
|
||||
public:
|
||||
static const AMFValueType ValueType = AMFArray;
|
||||
@@ -362,7 +362,7 @@ private:
|
||||
/*!
|
||||
\return The AMF value type
|
||||
*/
|
||||
AMFValueType GetValueType() { return ValueType; }
|
||||
AMFValueType GetValueType() override { return ValueType; }
|
||||
~AMFObjectValue() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "dLogger.h"
|
||||
|
||||
enum eInventoryType : uint32_t;
|
||||
enum class eReplicaComponentType : uint32_t;
|
||||
|
||||
/*!
|
||||
\file GeneralUtils.hpp
|
||||
@@ -181,6 +182,11 @@ namespace GeneralUtils {
|
||||
return static_cast<eInventoryType>(std::stoul(value));
|
||||
}
|
||||
|
||||
template <>
|
||||
inline eReplicaComponentType Parse(const char* value) {
|
||||
return static_cast<eReplicaComponentType>(std::stoul(value));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool TryParse(const char* value, T& dst) {
|
||||
try {
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
#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
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef MISSIONLOCKSTATE_H
|
||||
#define MISSIONLOCKSTATE_H
|
||||
|
||||
enum class MissionLockState : int
|
||||
{
|
||||
MISSION_LOCK_LOCKED,
|
||||
MISSION_LOCK_NEW,
|
||||
MISSION_LOCK_UNLOCKED,
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,56 +0,0 @@
|
||||
#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__
|
||||
@@ -1,31 +0,0 @@
|
||||
#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
|
||||
@@ -1,42 +0,0 @@
|
||||
#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,
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
#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,8 +43,7 @@ typedef uint32_t LWOCLONEID; //!< Used for Clone IDs
|
||||
typedef uint16_t LWOMAPID; //!< Used for Map IDs
|
||||
typedef uint16_t LWOINSTANCEID; //!< Used for Instance IDs
|
||||
typedef uint32_t PROPERTYCLONELIST; //!< Used for Property Clone IDs
|
||||
typedef uint32_t STRIPID;
|
||||
typedef uint32_t BEHAVIORSTATE;
|
||||
typedef uint32_t StripId;
|
||||
|
||||
typedef int32_t PetTamingPiece; //!< Pet Taming Pieces
|
||||
|
||||
@@ -65,11 +64,6 @@ typedef std::set<LWOOBJID> TSetObjID;
|
||||
|
||||
const float PI = 3.14159f;
|
||||
|
||||
#if defined(__unix) || defined(__APPLE__)
|
||||
//For Linux:
|
||||
typedef __int64_t __int64;
|
||||
#endif
|
||||
|
||||
//============ STRUCTS ==============
|
||||
|
||||
struct LWOSCENEID {
|
||||
@@ -262,20 +256,6 @@ enum eReplicaPacketType {
|
||||
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
|
||||
enum eCombatBehaviorTypes : uint32_t {
|
||||
PASSIVE = 0, //!< The object is passive
|
||||
@@ -380,56 +360,6 @@ enum eNotifyType {
|
||||
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 {
|
||||
NoImaginationForPet = 1,
|
||||
|
||||
@@ -546,6 +546,8 @@ enum GAME_MSG : unsigned short {
|
||||
GAME_MSG_REMOVE_RUN_SPEED_MODIFIER = 1506,
|
||||
GAME_MSG_UPDATE_PROPERTY_PERFORMANCE_COST = 1547,
|
||||
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_REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES = 1666,
|
||||
GAME_MSG_RESPONSE_MOVE_ITEM_BETWEEN_INVENTORY_TYPES = 1667,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __ADDFRIENDRESPONSECODE__H__
|
||||
#define __ADDFRIENDRESPONSECODE__H__
|
||||
#ifndef __EADDFRIENDRESPONSECODE__H__
|
||||
#define __EADDFRIENDRESPONSECODE__H__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class AddFriendResponseCode : uint8_t {
|
||||
enum class eAddFriendResponseCode : uint8_t {
|
||||
ACCEPTED = 0,
|
||||
REJECTED,
|
||||
BUSY,
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __ADDFRIENDRESPONSETYPE__H__
|
||||
#define __ADDFRIENDRESPONSETYPE__H__
|
||||
#ifndef __EADDFRIENDRESPONSETYPE__H__
|
||||
#define __EADDFRIENDRESPONSETYPE__H__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class AddFriendResponseType : uint8_t {
|
||||
enum class eAddFriendResponseType : uint8_t {
|
||||
ACCEPTED = 0,
|
||||
ALREADYFRIEND,
|
||||
INVALIDCHARACTER,
|
||||
@@ -21,4 +21,4 @@ enum class AddFriendResponseType : uint8_t {
|
||||
FRIENDISFREETRIAL
|
||||
};
|
||||
|
||||
#endif //!__ADDFRIENDRESPONSETYPE__H__
|
||||
#endif //!__EADDFRIENDRESPONSETYPE__H__
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
enum class eBubbleType : uint32_t {
|
||||
DEFAULT = 0,
|
||||
ENERGY = 1,
|
||||
SKUNK = 2,
|
||||
ENERGY,
|
||||
SKUNK
|
||||
};
|
||||
|
||||
#endif //!__EBUBBLETYPE__H__
|
||||
|
||||
41
dCommon/dEnums/eHelpType.h
Normal file
41
dCommon/dEnums/eHelpType.h
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
#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__
|
||||
58
dCommon/dEnums/eItemSetPassiveAbilityID.h
Normal file
58
dCommon/dEnums/eItemSetPassiveAbilityID.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#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>
|
||||
|
||||
enum class eItemType : int32_t {
|
||||
ITEM_TYPE_UNKNOWN = -1, //!< An unknown item type
|
||||
ITEM_TYPE_BRICK = 1, //!< A brick
|
||||
ITEM_TYPE_HAT = 2, //!< A hat / head item
|
||||
ITEM_TYPE_HAIR = 3, //!< A hair item
|
||||
ITEM_TYPE_NECK = 4, //!< A neck item
|
||||
ITEM_TYPE_LEFT_HAND = 5, //!< A left handed item
|
||||
ITEM_TYPE_RIGHT_HAND = 6, //!< A right handed item
|
||||
ITEM_TYPE_LEGS = 7, //!< A pants item
|
||||
ITEM_TYPE_LEFT_TRINKET = 8, //!< A left handled trinket item
|
||||
ITEM_TYPE_RIGHT_TRINKET = 9, //!< A right handed trinket item
|
||||
ITEM_TYPE_BEHAVIOR = 10, //!< A behavior
|
||||
ITEM_TYPE_PROPERTY = 11, //!< A property
|
||||
ITEM_TYPE_MODEL = 12, //!< A model
|
||||
ITEM_TYPE_COLLECTIBLE = 13, //!< A collectible item
|
||||
ITEM_TYPE_CONSUMABLE = 14, //!< A consumable item
|
||||
ITEM_TYPE_CHEST = 15, //!< A chest item
|
||||
ITEM_TYPE_EGG = 16, //!< An egg
|
||||
ITEM_TYPE_PET_FOOD = 17, //!< A pet food item
|
||||
ITEM_TYPE_QUEST_OBJECT = 18, //!< A quest item
|
||||
ITEM_TYPE_PET_INVENTORY_ITEM = 19, //!< A pet inventory item
|
||||
ITEM_TYPE_PACKAGE = 20, //!< A package
|
||||
ITEM_TYPE_LOOT_MODEL = 21, //!< A loot model
|
||||
ITEM_TYPE_VEHICLE = 22, //!< A vehicle
|
||||
ITEM_TYPE_CURRENCY = 23, //!< Currency
|
||||
ITEM_TYPE_MOUNT = 24 //!< A Mount
|
||||
UNKNOWN = -1,
|
||||
BRICK = 1,
|
||||
HAT,
|
||||
HAIR,
|
||||
NECK,
|
||||
LEFT_HAND,
|
||||
RIGHT_HAND,
|
||||
LEGS,
|
||||
LEFT_TRINKET,
|
||||
RIGHT_TRINKET,
|
||||
BEHAVIOR,
|
||||
PROPERTY,
|
||||
MODEL,
|
||||
COLLECTIBLE,
|
||||
CONSUMABLE,
|
||||
CHEST,
|
||||
EGG,
|
||||
PET_FOOD,
|
||||
QUEST_OBJECT,
|
||||
PET_INVENTORY_ITEM,
|
||||
PACKAGE,
|
||||
LOOT_MODEL,
|
||||
VEHICLE,
|
||||
LUP_MODEL,
|
||||
MOUNT
|
||||
};
|
||||
|
||||
#endif //!__EITEMTYPE__H__
|
||||
|
||||
12
dCommon/dEnums/eMissionLockState.h
Normal file
12
dCommon/dEnums/eMissionLockState.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __EMISSIONLOCKSTATE__H__
|
||||
#define __EMISSIONLOCKSTATE__H__
|
||||
|
||||
enum class eMissionLockState : int {
|
||||
LOCKED,
|
||||
NEW,
|
||||
UNLOCKED,
|
||||
};
|
||||
|
||||
#endif //!__EMISSIONLOCKSTATE__H__
|
||||
56
dCommon/dEnums/eMissionState.h
Normal file
56
dCommon/dEnums/eMissionState.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 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__
|
||||
43
dCommon/dEnums/eMissionTaskType.h
Normal file
43
dCommon/dEnums/eMissionTaskType.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#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__
|
||||
13
dCommon/dEnums/ePackageType.h
Normal file
13
dCommon/dEnums/ePackageType.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef __EPACKAGETYPE__H__
|
||||
#define __EPACKAGETYPE__H__
|
||||
|
||||
enum class ePackageType {
|
||||
INVALID = -1,
|
||||
ITEM,
|
||||
BRICKS,
|
||||
MODELS,
|
||||
CAR_MODELS
|
||||
};
|
||||
|
||||
|
||||
#endif //!__EPACKAGETYPE__H__
|
||||
46
dCommon/dEnums/ePermissionMap.h
Normal file
46
dCommon/dEnums/ePermissionMap.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#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__
|
||||
14
dCommon/dEnums/ePhysicsBehaviorType.h
Normal file
14
dCommon/dEnums/ePhysicsBehaviorType.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef __EPHYSICSBEHAVIORTYPE__H__
|
||||
#define __EPHYSICSBEHAVIORTYPE__H__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class ePhysicsBehaviorType : int32_t {
|
||||
INVALID = -1,
|
||||
GROUND,
|
||||
FLYING,
|
||||
STANDARD,
|
||||
DYNAMIC
|
||||
};
|
||||
|
||||
#endif //!__EPHYSICSBEHAVIORTYPE__H__
|
||||
25
dCommon/dEnums/eRacingTaskParam.h
Normal file
25
dCommon/dEnums/eRacingTaskParam.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#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__
|
||||
127
dCommon/dEnums/eReplicaComponentType.h
Normal file
127
dCommon/dEnums/eReplicaComponentType.h
Normal file
@@ -0,0 +1,127 @@
|
||||
#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__
|
||||
24
dCommon/dEnums/eServerDisconnectIdentifiers.h
Normal file
24
dCommon/dEnums/eServerDisconnectIdentifiers.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#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__
|
||||
119
dCommon/dEnums/eTriggerCommandType.h
Normal file
119
dCommon/dEnums/eTriggerCommandType.h
Normal file
@@ -0,0 +1,119 @@
|
||||
#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__
|
||||
53
dCommon/dEnums/eTriggerEventType.h
Normal file
53
dCommon/dEnums/eTriggerEventType.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#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__
|
||||
13
dCommon/dEnums/eUgcModerationStatus.h
Normal file
13
dCommon/dEnums/eUgcModerationStatus.h
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
#ifndef __EUGCMODERATIONSTATUS__H__
|
||||
#define __EUGCMODERATIONSTATUS__H__
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum class eUgcModerationStatus : uint32_t {
|
||||
NoStatus,
|
||||
Approved,
|
||||
Rejected,
|
||||
};
|
||||
|
||||
#endif //!__EUGCMODERATIONSTATUS__H__
|
||||
@@ -1,46 +1,80 @@
|
||||
#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"
|
||||
|
||||
// Static Variables
|
||||
CDClientManager* CDClientManager::m_Address = nullptr;
|
||||
|
||||
//! Initializes the manager
|
||||
void CDClientManager::Initialize(void) {
|
||||
tables.insert(std::make_pair("ActivityRewards", new CDActivityRewardsTable()));
|
||||
UNUSED(tables.insert(std::make_pair("Animations", new CDAnimationsTable())));
|
||||
tables.insert(std::make_pair("BehaviorParameter", new CDBehaviorParameterTable()));
|
||||
tables.insert(std::make_pair("BehaviorTemplate", new CDBehaviorTemplateTable()));
|
||||
tables.insert(std::make_pair("ComponentsRegistry", new CDComponentsRegistryTable()));
|
||||
tables.insert(std::make_pair("CurrencyTable", new CDCurrencyTableTable()));
|
||||
tables.insert(std::make_pair("DestructibleComponent", new CDDestructibleComponentTable()));
|
||||
tables.insert(std::make_pair("EmoteTable", new CDEmoteTableTable()));
|
||||
tables.insert(std::make_pair("InventoryComponent", new CDInventoryComponentTable()));
|
||||
tables.insert(std::make_pair("ItemComponent", new CDItemComponentTable()));
|
||||
tables.insert(std::make_pair("ItemSets", new CDItemSetsTable()));
|
||||
tables.insert(std::make_pair("ItemSetSkills", new CDItemSetSkillsTable()));
|
||||
tables.insert(std::make_pair("LevelProgressionLookup", new CDLevelProgressionLookupTable()));
|
||||
tables.insert(std::make_pair("LootMatrix", new CDLootMatrixTable()));
|
||||
tables.insert(std::make_pair("LootTable", new CDLootTableTable()));
|
||||
tables.insert(std::make_pair("MissionNPCComponent", new CDMissionNPCComponentTable()));
|
||||
tables.insert(std::make_pair("MissionTasks", new CDMissionTasksTable()));
|
||||
tables.insert(std::make_pair("Missions", new CDMissionsTable()));
|
||||
tables.insert(std::make_pair("ObjectSkills", new CDObjectSkillsTable()));
|
||||
tables.insert(std::make_pair("Objects", new CDObjectsTable()));
|
||||
tables.insert(std::make_pair("PhysicsComponent", new CDPhysicsComponentTable()));
|
||||
tables.insert(std::make_pair("RebuildComponent", new CDRebuildComponentTable()));
|
||||
tables.insert(std::make_pair("ScriptComponent", new CDScriptComponentTable()));
|
||||
tables.insert(std::make_pair("SkillBehavior", new CDSkillBehaviorTable()));
|
||||
tables.insert(std::make_pair("ZoneTable", new CDZoneTableTable()));
|
||||
tables.insert(std::make_pair("VendorComponent", new CDVendorComponentTable()));
|
||||
tables.insert(std::make_pair("Activities", new CDActivitiesTable()));
|
||||
tables.insert(std::make_pair("PackageComponent", new CDPackageComponentTable()));
|
||||
tables.insert(std::make_pair("ProximityMonitorComponent", new CDProximityMonitorComponentTable()));
|
||||
tables.insert(std::make_pair("MovementAIComponent", new CDMovementAIComponentTable()));
|
||||
tables.insert(std::make_pair("BrickIDTable", new CDBrickIDTableTable()));
|
||||
tables.insert(std::make_pair("RarityTable", new CDRarityTableTable()));
|
||||
tables.insert(std::make_pair("MissionEmail", new CDMissionEmailTable()));
|
||||
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()));
|
||||
CDClientManager::CDClientManager() {
|
||||
CDActivityRewardsTable::Instance();
|
||||
UNUSED(CDAnimationsTable::Instance());
|
||||
CDBehaviorParameterTable::Instance();
|
||||
CDBehaviorTemplateTable::Instance();
|
||||
CDComponentsRegistryTable::Instance();
|
||||
CDCurrencyTableTable::Instance();
|
||||
CDDestructibleComponentTable::Instance();
|
||||
CDEmoteTableTable::Instance();
|
||||
CDInventoryComponentTable::Instance();
|
||||
CDItemComponentTable::Instance();
|
||||
CDItemSetsTable::Instance();
|
||||
CDItemSetSkillsTable::Instance();
|
||||
CDLevelProgressionLookupTable::Instance();
|
||||
CDLootMatrixTable::Instance();
|
||||
CDLootTableTable::Instance();
|
||||
CDMissionNPCComponentTable::Instance();
|
||||
CDMissionTasksTable::Instance();
|
||||
CDMissionsTable::Instance();
|
||||
CDObjectSkillsTable::Instance();
|
||||
CDObjectsTable::Instance();
|
||||
CDPhysicsComponentTable::Instance();
|
||||
CDRebuildComponentTable::Instance();
|
||||
CDScriptComponentTable::Instance();
|
||||
CDSkillBehaviorTable::Instance();
|
||||
CDZoneTableTable::Instance();
|
||||
CDVendorComponentTable::Instance();
|
||||
CDActivitiesTable::Instance();
|
||||
CDPackageComponentTable::Instance();
|
||||
CDProximityMonitorComponentTable::Instance();
|
||||
CDMovementAIComponentTable::Instance();
|
||||
CDBrickIDTableTable::Instance();
|
||||
CDRarityTableTable::Instance();
|
||||
CDMissionEmailTable::Instance();
|
||||
CDRewardsTable::Instance();
|
||||
CDPropertyEntranceComponentTable::Instance();
|
||||
CDPropertyTemplateTable::Instance();
|
||||
CDFeatureGatingTable::Instance();
|
||||
CDRailActivatorComponentTable::Instance();
|
||||
}
|
||||
|
||||
@@ -1,96 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.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"
|
||||
#include "Singleton.h"
|
||||
|
||||
// C++
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
|
||||
/*!
|
||||
\file CDClientManager.hpp
|
||||
\brief A manager for the CDClient tables
|
||||
/**
|
||||
* Initialize the CDClient tables so they are all loaded into memory.
|
||||
*/
|
||||
|
||||
//! Manages all data from the CDClient
|
||||
class CDClientManager {
|
||||
private:
|
||||
static CDClientManager* m_Address; //!< The singleton address
|
||||
|
||||
std::unordered_map<std::string, CDTable*> tables; //!< The tables
|
||||
|
||||
class CDClientManager : public Singleton<CDClientManager> {
|
||||
public:
|
||||
CDClientManager();
|
||||
|
||||
//! 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
|
||||
/**
|
||||
* Fetch a table from CDClient
|
||||
*
|
||||
* @tparam Table type to fetch
|
||||
* @return A pointer to the requested table.
|
||||
*/
|
||||
template<typename T>
|
||||
T* GetTable(const std::string& tableName) {
|
||||
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;
|
||||
T* GetTable() {
|
||||
return &T::Instance();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CDActivitiesTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDActivitiesTable::CDActivitiesTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
@@ -48,15 +47,6 @@ CDActivitiesTable::CDActivitiesTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -66,7 +56,6 @@ std::vector<CDActivities> CDActivitiesTable::Query(std::function<bool(CDActiviti
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDActivities> CDActivitiesTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDActivitiesTable.hpp
|
||||
\brief Contains data for the Activities table
|
||||
*/
|
||||
|
||||
//! Activities Entry Struct
|
||||
struct CDActivities {
|
||||
unsigned int ActivityID;
|
||||
unsigned int locStatus;
|
||||
@@ -31,36 +25,14 @@ struct CDActivities {
|
||||
float optionalPercentage;
|
||||
};
|
||||
|
||||
|
||||
//! Activities table
|
||||
class CDActivitiesTable : public CDTable {
|
||||
class CDActivitiesTable : public CDTable<CDActivitiesTable> {
|
||||
private:
|
||||
std::vector<CDActivities> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDActivitiesTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CDActivityRewardsTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDActivityRewardsTable::CDActivityRewardsTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
@@ -36,15 +35,6 @@ CDActivityRewardsTable::CDActivityRewardsTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -54,7 +44,6 @@ std::vector<CDActivityRewards> CDActivityRewardsTable::Query(std::function<bool(
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDActivityRewards> CDActivityRewardsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDActivityRewardsTable.hpp
|
||||
\brief Contains data for the ActivityRewards table
|
||||
*/
|
||||
|
||||
//! ActivityRewards Entry Struct
|
||||
struct CDActivityRewards {
|
||||
unsigned int objectTemplate; //!< The object template (?)
|
||||
unsigned int ActivityRewardIndex; //!< The activity reward index
|
||||
@@ -19,36 +13,15 @@ struct CDActivityRewards {
|
||||
std::string description; //!< The description
|
||||
};
|
||||
|
||||
|
||||
//! ActivityRewards table
|
||||
class CDActivityRewardsTable : public CDTable {
|
||||
class CDActivityRewardsTable : public CDTable<CDActivityRewardsTable> {
|
||||
private:
|
||||
std::vector<CDActivityRewards> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDActivityRewardsTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CDAnimationsTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDAnimationsTable::CDAnimationsTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
@@ -42,15 +41,6 @@ CDAnimationsTable::CDAnimationsTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -60,7 +50,6 @@ std::vector<CDAnimations> CDAnimationsTable::Query(std::function<bool(CDAnimatio
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDAnimations> CDAnimationsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDAnimationsTable.hpp
|
||||
\brief Contains data for the Animations table
|
||||
*/
|
||||
|
||||
//! Animations Entry Struct
|
||||
struct CDAnimations {
|
||||
unsigned int animationGroupID; //!< The animation group ID
|
||||
std::string animation_type; //!< The animation type
|
||||
@@ -26,35 +20,14 @@ struct CDAnimations {
|
||||
};
|
||||
|
||||
|
||||
//! Animations table
|
||||
class CDAnimationsTable : public CDTable {
|
||||
class CDAnimationsTable : public CDTable<CDAnimationsTable> {
|
||||
private:
|
||||
std::vector<CDAnimations> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDAnimationsTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "CDBehaviorParameterTable.h"
|
||||
#include "GeneralUtils.h"
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorParameterTable::CDBehaviorParameterTable(void) {
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorParameter");
|
||||
uint32_t uniqueParameterId = 0;
|
||||
@@ -28,14 +27,6 @@ CDBehaviorParameterTable::CDBehaviorParameterTable(void) {
|
||||
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) {
|
||||
auto parameterID = this->m_ParametersList.find(name);
|
||||
if (parameterID == this->m_ParametersList.end()) return defaultValue;
|
||||
|
||||
@@ -5,37 +5,18 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
/*!
|
||||
\file CDBehaviorParameterTable.hpp
|
||||
\brief Contains data for the BehaviorParameter table
|
||||
*/
|
||||
|
||||
//! BehaviorParameter Entry Struct
|
||||
struct CDBehaviorParameter {
|
||||
unsigned int behaviorID; //!< The Behavior ID
|
||||
std::unordered_map<std::string, uint32_t>::iterator parameterID; //!< The Parameter ID
|
||||
float value; //!< The value of the behavior template
|
||||
};
|
||||
|
||||
//! BehaviorParameter table
|
||||
class CDBehaviorParameterTable : public CDTable {
|
||||
class CDBehaviorParameterTable : public CDTable<CDBehaviorParameterTable> {
|
||||
private:
|
||||
std::unordered_map<uint64_t, CDBehaviorParameter> m_Entries;
|
||||
std::unordered_map<std::string, uint32_t> m_ParametersList;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorParameterTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDBehaviorParameterTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
CDBehaviorParameterTable();
|
||||
float GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
|
||||
|
||||
std::map<std::string, float> GetParametersByBehaviorID(uint32_t behaviorID);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CDBehaviorTemplateTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
@@ -40,15 +39,6 @@ CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -58,7 +48,6 @@ std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::Query(std::function<boo
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
/*!
|
||||
\file CDBehaviorTemplateTable.hpp
|
||||
\brief Contains data for the BehaviorTemplate table
|
||||
*/
|
||||
|
||||
//! BehaviorTemplate Entry Struct
|
||||
struct CDBehaviorTemplate {
|
||||
unsigned int behaviorID; //!< The Behavior ID
|
||||
unsigned int templateID; //!< The Template ID (LOT)
|
||||
@@ -19,36 +13,16 @@ struct CDBehaviorTemplate {
|
||||
};
|
||||
|
||||
|
||||
//! BehaviorTemplate table
|
||||
class CDBehaviorTemplateTable : public CDTable {
|
||||
class CDBehaviorTemplateTable : public CDTable<CDBehaviorTemplateTable> {
|
||||
private:
|
||||
std::vector<CDBehaviorTemplate> entries;
|
||||
std::unordered_map<uint32_t, CDBehaviorTemplate> entriesMappedByBehaviorID;
|
||||
std::unordered_set<std::string> m_EffectHandles;
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDBehaviorTemplateTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
const CDBehaviorTemplate GetByBehaviorID(uint32_t behaviorID);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CDBrickIDTableTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDBrickIDTableTable::CDBrickIDTableTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
@@ -31,15 +30,6 @@ CDBrickIDTableTable::CDBrickIDTableTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -49,7 +39,6 @@ std::vector<CDBrickIDTable> CDBrickIDTableTable::Query(std::function<bool(CDBric
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDBrickIDTable> CDBrickIDTableTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -16,34 +16,14 @@ struct CDBrickIDTable {
|
||||
|
||||
|
||||
//! BrickIDTable table
|
||||
class CDBrickIDTableTable : public CDTable {
|
||||
class CDBrickIDTableTable : public CDTable<CDBrickIDTableTable> {
|
||||
private:
|
||||
std::vector<CDBrickIDTable> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDBrickIDTableTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "CDComponentsRegistryTable.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
#define CDCLIENT_CACHE_ALL
|
||||
|
||||
//! Constructor
|
||||
CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
||||
|
||||
#ifdef CDCLIENT_CACHE_ALL
|
||||
@@ -25,29 +25,11 @@ CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
||||
while (!tableData.eof()) {
|
||||
CDComponentsRegistry entry;
|
||||
entry.id = tableData.getIntField("id", -1);
|
||||
entry.component_type = tableData.getIntField("component_type", -1);
|
||||
entry.component_type = static_cast<eReplicaComponentType>(tableData.getIntField("component_type", 0));
|
||||
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->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();
|
||||
}
|
||||
|
||||
@@ -55,15 +37,7 @@ CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
//! 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) {
|
||||
int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, eReplicaComponentType componentType, int32_t defaultValue) {
|
||||
const auto& iter = this->mappedEntries.find(((uint64_t)componentType) << 32 | ((uint64_t)id));
|
||||
|
||||
if (iter == this->mappedEntries.end()) {
|
||||
@@ -72,16 +46,6 @@ int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, uint32_t componen
|
||||
|
||||
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
|
||||
// Now get the data
|
||||
std::stringstream query;
|
||||
|
||||
@@ -3,38 +3,19 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDComponentsRegistryTable.hpp
|
||||
\brief Contains data for the ComponentsRegistry table
|
||||
*/
|
||||
|
||||
//! ComponentsRegistry Entry Struct
|
||||
enum class eReplicaComponentType : uint32_t;
|
||||
struct CDComponentsRegistry {
|
||||
unsigned int id; //!< The LOT is used as the ID
|
||||
unsigned int component_type; //!< See ComponentTypes enum for values
|
||||
eReplicaComponentType 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
|
||||
};
|
||||
|
||||
|
||||
//! ComponentsRegistry table
|
||||
class CDComponentsRegistryTable : public CDTable {
|
||||
class CDComponentsRegistryTable : public CDTable<CDComponentsRegistryTable> {
|
||||
private:
|
||||
//std::vector<CDComponentsRegistry> entries;
|
||||
std::map<uint64_t, uint32_t> mappedEntries; //id, component_type, component_id
|
||||
|
||||
public:
|
||||
|
||||
//! 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);
|
||||
CDComponentsRegistryTable();
|
||||
int32_t GetByIDAndType(uint32_t id, eReplicaComponentType componentType, int32_t defaultValue = 0);
|
||||
};
|
||||
|
||||
@@ -34,15 +34,6 @@ CDCurrencyTableTable::CDCurrencyTableTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -52,7 +43,6 @@ std::vector<CDCurrencyTable> CDCurrencyTableTable::Query(std::function<bool(CDCu
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDCurrencyTable> CDCurrencyTableTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -18,34 +18,14 @@ struct CDCurrencyTable {
|
||||
};
|
||||
|
||||
//! CurrencyTable table
|
||||
class CDCurrencyTableTable : public CDTable {
|
||||
class CDCurrencyTableTable : public CDTable<CDCurrencyTableTable> {
|
||||
private:
|
||||
std::vector<CDCurrencyTable> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDCurrencyTableTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -43,15 +43,6 @@ CDDestructibleComponentTable::CDDestructibleComponentTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -61,7 +52,6 @@ std::vector<CDDestructibleComponent> CDDestructibleComponentTable::Query(std::fu
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDDestructibleComponentTable.hpp
|
||||
\brief Contains data for the DestructibleComponent table
|
||||
*/
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDDestructibleComponent {
|
||||
unsigned int id; //!< The component ID from the ComponentsRegistry Table
|
||||
int faction; //!< The Faction ID of the object
|
||||
@@ -26,35 +20,14 @@ struct CDDestructibleComponent {
|
||||
int difficultyLevel; //!< ???
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDDestructibleComponentTable : public CDTable {
|
||||
class CDDestructibleComponentTable : public CDTable<CDDestructibleComponentTable> {
|
||||
private:
|
||||
std::vector<CDDestructibleComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDDestructibleComponentTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -30,11 +30,6 @@ CDEmoteTableTable::~CDEmoteTableTable(void) {
|
||||
entries.clear();
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDEmoteTableTable::GetName(void) const {
|
||||
return "Emotes";
|
||||
}
|
||||
|
||||
CDEmoteTable* CDEmoteTableTable::GetEmote(int id) {
|
||||
for (auto e : entries) {
|
||||
if (e.first == id) return e.second;
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
#include "CDTable.h"
|
||||
#include <map>
|
||||
|
||||
/*!
|
||||
\file CDEmoteTable.hpp
|
||||
\brief Contains data for the CDEmoteTable table
|
||||
*/
|
||||
|
||||
//! CDEmoteEntry Struct
|
||||
struct CDEmoteTable {
|
||||
CDEmoteTable() {
|
||||
ID = -1;
|
||||
@@ -32,25 +26,13 @@ struct CDEmoteTable {
|
||||
std::string gateVersion;
|
||||
};
|
||||
|
||||
//! CDEmoteTable table
|
||||
class CDEmoteTableTable : public CDTable {
|
||||
class CDEmoteTableTable : public CDTable<CDEmoteTableTable> {
|
||||
private:
|
||||
std::map<int, CDEmoteTable*> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
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
|
||||
CDEmoteTableTable();
|
||||
~CDEmoteTableTable();
|
||||
// Returns an emote by ID
|
||||
CDEmoteTable* GetEmote(int id);
|
||||
};
|
||||
|
||||
@@ -34,15 +34,6 @@ CDFeatureGatingTable::CDFeatureGatingTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -62,7 +53,6 @@ bool CDFeatureGatingTable::FeatureUnlocked(const std::string& feature) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDFeatureGating> CDFeatureGatingTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDFeatureGatingTable.hpp
|
||||
*/
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDFeatureGating {
|
||||
std::string featureName;
|
||||
int32_t major;
|
||||
@@ -16,37 +11,16 @@ struct CDFeatureGating {
|
||||
std::string description;
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDFeatureGatingTable : public CDTable {
|
||||
class CDFeatureGatingTable : public CDTable<CDFeatureGatingTable> {
|
||||
private:
|
||||
std::vector<CDFeatureGating> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDFeatureGatingTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDFeatureGating> Query(std::function<bool(CDFeatureGating)> predicate);
|
||||
|
||||
bool FeatureUnlocked(const std::string& feature) const;
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDFeatureGating> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -33,15 +33,6 @@ CDInventoryComponentTable::CDInventoryComponentTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -51,7 +42,6 @@ std::vector<CDInventoryComponent> CDInventoryComponentTable::Query(std::function
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDInventoryComponent> CDInventoryComponentTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDInventoryComponentTable.hpp
|
||||
\brief Contains data for the InventoryComponent table
|
||||
*/
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDInventoryComponent {
|
||||
unsigned int id; //!< The component ID for this object
|
||||
unsigned int itemid; //!< The LOT of the object
|
||||
@@ -16,35 +10,14 @@ struct CDInventoryComponent {
|
||||
bool equip; //!< Whether or not to equip the item
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDInventoryComponentTable : public CDTable {
|
||||
class CDInventoryComponentTable : public CDTable<CDInventoryComponentTable> {
|
||||
private:
|
||||
std::vector<CDInventoryComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDInventoryComponentTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -74,14 +74,6 @@ CDItemComponentTable::CDItemComponentTable(void) {
|
||||
#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 auto& it = this->entries.find(skillID);
|
||||
if (it != this->entries.end()) {
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
#include "CDTable.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
/*!
|
||||
\file CDItemComponentTable.hpp
|
||||
\brief Contains data for the ItemComponent table
|
||||
*/
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDItemComponent {
|
||||
unsigned int id; //!< The Component ID
|
||||
std::string equipLocation; //!< The equip location
|
||||
@@ -55,28 +49,15 @@ struct CDItemComponent {
|
||||
float SellMultiplier; //!< Something to do with early vendors perhaps (but replaced)
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDItemComponentTable : public CDTable {
|
||||
class CDItemComponentTable : public CDTable<CDItemComponentTable> {
|
||||
private:
|
||||
std::map<unsigned int, CDItemComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDItemComponentTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDItemComponentTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
CDItemComponentTable();
|
||||
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);
|
||||
|
||||
static CDItemComponent Default;
|
||||
|
||||
@@ -32,15 +32,6 @@ CDItemSetSkillsTable::CDItemSetSkillsTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -50,7 +41,6 @@ std::vector<CDItemSetSkills> CDItemSetSkillsTable::Query(std::function<bool(CDIt
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
@@ -65,4 +55,3 @@ std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetBySkillID(unsigned int Ski
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,50 +3,22 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDItemSetSkillsTable.hpp
|
||||
\brief Contains data for the ItemSetSkills table
|
||||
*/
|
||||
|
||||
//! ZoneTable Struct
|
||||
struct CDItemSetSkills {
|
||||
unsigned int SkillSetID; //!< The skill set ID
|
||||
unsigned int SkillID; //!< The skill ID
|
||||
unsigned int SkillCastType; //!< The skill cast type
|
||||
};
|
||||
|
||||
//! ItemSets table
|
||||
class CDItemSetSkillsTable : public CDTable {
|
||||
class CDItemSetSkillsTable : public CDTable<CDItemSetSkillsTable> {
|
||||
private:
|
||||
std::vector<CDItemSetSkills> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDItemSetSkillsTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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> GetBySkillID(unsigned int SkillSetID);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -44,15 +44,6 @@ CDItemSetsTable::CDItemSetsTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -62,7 +53,6 @@ std::vector<CDItemSets> CDItemSetsTable::Query(std::function<bool(CDItemSets)> p
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDItemSets> CDItemSetsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDItemSetsTable.hpp
|
||||
\brief Contains data for the ItemSets table
|
||||
*/
|
||||
|
||||
//! ZoneTable Struct
|
||||
struct CDItemSets {
|
||||
unsigned int setID; //!< The item set ID
|
||||
unsigned int locStatus; //!< The loc status
|
||||
@@ -27,36 +21,15 @@ struct CDItemSets {
|
||||
float priority; //!< The priority
|
||||
};
|
||||
|
||||
//! ItemSets table
|
||||
class CDItemSetsTable : public CDTable {
|
||||
class CDItemSetsTable : public CDTable<CDItemSetsTable> {
|
||||
private:
|
||||
std::vector<CDItemSets> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDItemSetsTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -32,14 +32,6 @@ CDLevelProgressionLookupTable::CDLevelProgressionLookupTable(void) {
|
||||
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
|
||||
std::vector<CDLevelProgressionLookup> CDLevelProgressionLookupTable::Query(std::function<bool(CDLevelProgressionLookup)> predicate) {
|
||||
|
||||
|
||||
@@ -3,47 +3,21 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDLevelProgressionLookupTable.hpp
|
||||
\brief Contains data for the LevelProgressionLookup table
|
||||
*/
|
||||
|
||||
//! LevelProgressionLookup Entry Struct
|
||||
struct CDLevelProgressionLookup {
|
||||
unsigned int id; //!< The Level ID
|
||||
unsigned int requiredUScore; //!< The required LEGO Score
|
||||
std::string BehaviorEffect; //!< The behavior effect attached to this
|
||||
};
|
||||
|
||||
//! LevelProgressionLookup table
|
||||
class CDLevelProgressionLookupTable : public CDTable {
|
||||
class CDLevelProgressionLookupTable : public CDTable<CDLevelProgressionLookupTable> {
|
||||
private:
|
||||
std::vector<CDLevelProgressionLookup> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDLevelProgressionLookupTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDLevelProgressionLookup> Query(std::function<bool(CDLevelProgressionLookup)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
// Gets all the entries in the table
|
||||
std::vector<CDLevelProgressionLookup> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -38,15 +38,6 @@ CDLootMatrixTable::CDLootMatrixTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -56,7 +47,6 @@ std::vector<CDLootMatrix> CDLootMatrixTable::Query(std::function<bool(CDLootMatr
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
const std::vector<CDLootMatrix>& CDLootMatrixTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDLootMatrixTable.hpp
|
||||
\brief Contains data for the ObjectSkills table
|
||||
*/
|
||||
|
||||
//! LootMatrix Struct
|
||||
struct CDLootMatrix {
|
||||
unsigned int LootMatrixIndex; //!< The Loot Matrix Index
|
||||
unsigned int LootTableIndex; //!< The Loot Table Index
|
||||
@@ -21,36 +15,15 @@ struct CDLootMatrix {
|
||||
UNUSED(std::string gate_version); //!< The Gate Version
|
||||
};
|
||||
|
||||
//! MissionNPCComponent table
|
||||
class CDLootMatrixTable : public CDTable {
|
||||
class CDLootMatrixTable : public CDTable<CDLootMatrixTable> {
|
||||
private:
|
||||
std::vector<CDLootMatrix> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDLootMatrixTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -35,14 +35,6 @@ CDLootTableTable::CDLootTableTable(void) {
|
||||
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
|
||||
std::vector<CDLootTable> CDLootTableTable::Query(std::function<bool(CDLootTable)> predicate) {
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDLootTableTable.hpp
|
||||
\brief Contains data for the LootTable table
|
||||
*/
|
||||
|
||||
//! LootTable Struct
|
||||
struct CDLootTable {
|
||||
unsigned int itemid; //!< The LOT of the item
|
||||
unsigned int LootTableIndex; //!< The Loot Table Index
|
||||
@@ -17,36 +11,15 @@ struct CDLootTable {
|
||||
unsigned int sortPriority; //!< The sorting priority
|
||||
};
|
||||
|
||||
//! LootTable table
|
||||
class CDLootTableTable : public CDTable {
|
||||
class CDLootTableTable : public CDTable<CDLootTableTable> {
|
||||
private:
|
||||
std::vector<CDLootTable> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDLootTableTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,14 +37,6 @@ CDMissionEmailTable::CDMissionEmailTable(void) {
|
||||
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
|
||||
std::vector<CDMissionEmail> CDMissionEmailTable::Query(std::function<bool(CDMissionEmail)> predicate) {
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDMissionEmailTable.hpp
|
||||
\brief Contains data for the MissionEmail table
|
||||
*/
|
||||
|
||||
//! MissionEmail Entry Struct
|
||||
struct CDMissionEmail {
|
||||
unsigned int ID;
|
||||
unsigned int messageType;
|
||||
@@ -21,35 +15,14 @@ struct CDMissionEmail {
|
||||
};
|
||||
|
||||
|
||||
//! MissionEmail table
|
||||
class CDMissionEmailTable : public CDTable {
|
||||
class CDMissionEmailTable : public CDTable<CDMissionEmailTable> {
|
||||
private:
|
||||
std::vector<CDMissionEmail> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDMissionEmailTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -34,14 +34,6 @@ CDMissionNPCComponentTable::CDMissionNPCComponentTable(void) {
|
||||
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
|
||||
std::vector<CDMissionNPCComponent> CDMissionNPCComponentTable::Query(std::function<bool(CDMissionNPCComponent)> predicate) {
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDMissionNPCComponentTable.hpp
|
||||
\brief Contains data for the ObjectSkills table
|
||||
*/
|
||||
|
||||
//! MissionNPCComponent Struct
|
||||
struct CDMissionNPCComponent {
|
||||
unsigned int id; //!< The ID
|
||||
unsigned int missionID; //!< The Mission ID
|
||||
@@ -17,35 +11,16 @@ struct CDMissionNPCComponent {
|
||||
std::string gate_version; //!< The gate version
|
||||
};
|
||||
|
||||
//! MissionNPCComponent table
|
||||
class CDMissionNPCComponentTable : public CDTable {
|
||||
class CDMissionNPCComponentTable : public CDTable<CDMissionNPCComponentTable> {
|
||||
private:
|
||||
std::vector<CDMissionNPCComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDMissionNPCComponentTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDMissionNPCComponent> Query(std::function<bool(CDMissionNPCComponent)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
// Gets all the entries in the table
|
||||
std::vector<CDMissionNPCComponent> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -42,15 +42,6 @@ CDMissionTasksTable::CDMissionTasksTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -74,7 +65,6 @@ std::vector<CDMissionTasks*> CDMissionTasksTable::GetByMissionID(uint32_t missio
|
||||
return tasks;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
const std::vector<CDMissionTasks>& CDMissionTasksTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDMissionTasksTable.hpp
|
||||
\brief Contains data for the MissionTasks table
|
||||
*/
|
||||
|
||||
//! ObjectSkills Struct
|
||||
struct CDMissionTasks {
|
||||
unsigned int id; //!< The Mission ID that the task belongs to
|
||||
UNUSED(unsigned int locStatus); //!< ???
|
||||
@@ -25,37 +19,17 @@ struct CDMissionTasks {
|
||||
UNUSED(std::string gate_version); //!< ???
|
||||
};
|
||||
|
||||
//! ObjectSkills table
|
||||
class CDMissionTasksTable : public CDTable {
|
||||
class CDMissionTasksTable : public CDTable<CDMissionTasksTable> {
|
||||
private:
|
||||
std::vector<CDMissionTasks> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDMissionTasksTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDMissionTasks> Query(std::function<bool(CDMissionTasks)> predicate);
|
||||
|
||||
std::vector<CDMissionTasks*> GetByMissionID(uint32_t missionID);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
const std::vector<CDMissionTasks>& GetEntries(void) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -85,15 +85,6 @@ CDMissionsTable::CDMissionsTable(void) {
|
||||
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> data = cpplinq::from(this->entries)
|
||||
@@ -103,7 +94,6 @@ std::vector<CDMissions> CDMissionsTable::Query(std::function<bool(CDMissions)> p
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
const std::vector<CDMissions>& CDMissionsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
#include <map>
|
||||
#include <cstdint>
|
||||
|
||||
/*!
|
||||
\file CDMissionsTable.hpp
|
||||
\brief Contains data for the Missions table
|
||||
*/
|
||||
|
||||
//! Missions Struct
|
||||
struct CDMissions {
|
||||
int id; //!< The Mission ID
|
||||
std::string defined_type; //!< The type of mission
|
||||
@@ -66,35 +60,16 @@ struct CDMissions {
|
||||
int reward_bankinventory; //!< The amount of bank space this mission rewards
|
||||
};
|
||||
|
||||
//! Missions table
|
||||
class CDMissionsTable : public CDTable {
|
||||
class CDMissionsTable : public CDTable<CDMissionsTable> {
|
||||
private:
|
||||
std::vector<CDMissions> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDMissionsTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDMissions> Query(std::function<bool(CDMissions)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
// Gets all the entries in the table
|
||||
const std::vector<CDMissions>& GetEntries(void) const;
|
||||
|
||||
const CDMissions* GetPtrByMissionID(uint32_t missionID) const;
|
||||
|
||||
@@ -37,14 +37,6 @@ CDMovementAIComponentTable::CDMovementAIComponentTable(void) {
|
||||
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
|
||||
std::vector<CDMovementAIComponent> CDMovementAIComponentTable::Query(std::function<bool(CDMovementAIComponent)> predicate) {
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDMovementAIComponentTable.hpp
|
||||
\brief Contains data for the MovementAIComponent table
|
||||
*/
|
||||
|
||||
//! MovementAIComponent Struct
|
||||
struct CDMovementAIComponent {
|
||||
unsigned int id;
|
||||
std::string MovementType;
|
||||
@@ -20,36 +14,15 @@ struct CDMovementAIComponent {
|
||||
std::string attachedPath;
|
||||
};
|
||||
|
||||
//! MovementAIComponent table
|
||||
class CDMovementAIComponentTable : public CDTable {
|
||||
class CDMovementAIComponentTable : public CDTable<CDMovementAIComponentTable> {
|
||||
private:
|
||||
std::vector<CDMovementAIComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDMovementAIComponentTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDMovementAIComponent> Query(std::function<bool(CDMovementAIComponent)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
// Gets all the entries in the table
|
||||
std::vector<CDMovementAIComponent> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -33,14 +33,6 @@ CDObjectSkillsTable::CDObjectSkillsTable(void) {
|
||||
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
|
||||
std::vector<CDObjectSkills> CDObjectSkillsTable::Query(std::function<bool(CDObjectSkills)> predicate) {
|
||||
|
||||
@@ -55,4 +47,3 @@ std::vector<CDObjectSkills> CDObjectSkillsTable::Query(std::function<bool(CDObje
|
||||
std::vector<CDObjectSkills> CDObjectSkillsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDObjectSkillsTable.hpp
|
||||
\brief Contains data for the ObjectSkills table
|
||||
*/
|
||||
|
||||
//! ObjectSkills Struct
|
||||
struct CDObjectSkills {
|
||||
unsigned int objectTemplate; //!< The LOT of the item
|
||||
unsigned int skillID; //!< The Skill ID of the object
|
||||
@@ -16,35 +10,16 @@ struct CDObjectSkills {
|
||||
unsigned int AICombatWeight; //!< ???
|
||||
};
|
||||
|
||||
//! ObjectSkills table
|
||||
class CDObjectSkillsTable : public CDTable {
|
||||
class CDObjectSkillsTable : public CDTable<CDObjectSkillsTable> {
|
||||
private:
|
||||
std::vector<CDObjectSkills> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
*/
|
||||
CDObjectSkillsTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDObjectSkills> Query(std::function<bool(CDObjectSkills)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
// Gets all the entries in the table
|
||||
std::vector<CDObjectSkills> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -43,14 +43,6 @@ CDObjectsTable::CDObjectsTable(void) {
|
||||
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 auto& it = this->entries.find(LOT);
|
||||
if (it != this->entries.end()) {
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDObjectsTable.hpp
|
||||
\brief Contains data for the Objects table
|
||||
*/
|
||||
|
||||
//! RebuildComponent Struct
|
||||
struct CDObjects {
|
||||
unsigned int id; //!< The LOT of the object
|
||||
std::string name; //!< The internal name of the object
|
||||
@@ -26,29 +20,14 @@ struct CDObjects {
|
||||
UNUSED(unsigned int HQ_valid); //!< Probably used for the Nexus HQ database on LEGOUniverse.com
|
||||
};
|
||||
|
||||
//! ObjectSkills table
|
||||
class CDObjectsTable : public CDTable {
|
||||
class CDObjectsTable : public CDTable<CDObjectsTable> {
|
||||
private:
|
||||
//std::vector<CDObjects> entries;
|
||||
std::map<unsigned int, CDObjects> entries;
|
||||
CDObjects m_default;
|
||||
|
||||
public:
|
||||
|
||||
//! 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
|
||||
CDObjectsTable();
|
||||
// Gets an entry by ID
|
||||
const CDObjects& GetByID(unsigned int LOT);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -32,14 +32,6 @@ CDPackageComponentTable::CDPackageComponentTable(void) {
|
||||
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
|
||||
std::vector<CDPackageComponent> CDPackageComponentTable::Query(std::function<bool(CDPackageComponent)> predicate) {
|
||||
|
||||
|
||||
@@ -3,48 +3,20 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDPackageComponentTable.hpp
|
||||
\brief Contains data for the PackageComponent table
|
||||
*/
|
||||
|
||||
//! PackageComponent Entry Struct
|
||||
struct CDPackageComponent {
|
||||
unsigned int id;
|
||||
unsigned int LootMatrixIndex;
|
||||
unsigned int packageType;
|
||||
};
|
||||
|
||||
|
||||
//! PackageComponent table
|
||||
class CDPackageComponentTable : public CDTable {
|
||||
class CDPackageComponentTable : public CDTable<CDPackageComponentTable> {
|
||||
private:
|
||||
std::vector<CDPackageComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDPackageComponentTable(void);
|
||||
|
||||
//! 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
|
||||
*/
|
||||
// Queries the table with a custom "where" clause
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ CDPhysicsComponentTable::CDPhysicsComponentTable(void) {
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDPhysicsComponentTable::~CDPhysicsComponentTable(void) {
|
||||
CDPhysicsComponentTable::~CDPhysicsComponentTable() {
|
||||
for (auto e : m_entries) {
|
||||
if (e.second) delete e.second;
|
||||
}
|
||||
@@ -36,10 +36,6 @@ CDPhysicsComponentTable::~CDPhysicsComponentTable(void) {
|
||||
m_entries.clear();
|
||||
}
|
||||
|
||||
std::string CDPhysicsComponentTable::GetName(void) const {
|
||||
return "PhysicsComponent";
|
||||
}
|
||||
|
||||
CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) {
|
||||
for (auto e : m_entries) {
|
||||
if (e.first == componentID) return e.second;
|
||||
|
||||
@@ -21,12 +21,12 @@ struct CDPhysicsComponent {
|
||||
UNUSED(std::string gravityVolumeAsset);
|
||||
};
|
||||
|
||||
class CDPhysicsComponentTable : public CDTable {
|
||||
class CDPhysicsComponentTable : public CDTable<CDPhysicsComponentTable> {
|
||||
public:
|
||||
CDPhysicsComponentTable(void);
|
||||
~CDPhysicsComponentTable(void);
|
||||
CDPhysicsComponentTable();
|
||||
~CDPhysicsComponentTable();
|
||||
|
||||
std::string GetName(void) const override;
|
||||
static const std::string GetTableName() { return "PhysicsComponent"; };
|
||||
CDPhysicsComponent* GetByID(unsigned int componentID);
|
||||
|
||||
private:
|
||||
|
||||
@@ -32,12 +32,6 @@ CDPropertyEntranceComponentTable::CDPropertyEntranceComponentTable() {
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDPropertyEntranceComponentTable::~CDPropertyEntranceComponentTable(void) = default;
|
||||
|
||||
std::string CDPropertyEntranceComponentTable::GetName() const {
|
||||
return "PropertyEntranceComponent";
|
||||
}
|
||||
|
||||
CDPropertyEntranceComponent CDPropertyEntranceComponentTable::GetByID(uint32_t id) {
|
||||
for (const auto& entry : entries) {
|
||||
if (entry.id == id)
|
||||
|
||||
@@ -9,31 +9,13 @@ struct CDPropertyEntranceComponent {
|
||||
std::string groupType;
|
||||
};
|
||||
|
||||
class CDPropertyEntranceComponentTable : public CDTable {
|
||||
class CDPropertyEntranceComponentTable : public CDTable<CDPropertyEntranceComponentTable> {
|
||||
public:
|
||||
//! Constructor
|
||||
CDPropertyEntranceComponentTable();
|
||||
|
||||
//! 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
|
||||
*/
|
||||
// Queries the table with a custom "where" clause
|
||||
CDPropertyEntranceComponent GetByID(uint32_t id);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
// Gets all the entries in the table
|
||||
[[nodiscard]] std::vector<CDPropertyEntranceComponent> GetEntries() const { return entries; }
|
||||
private:
|
||||
std::vector<CDPropertyEntranceComponent> entries{};
|
||||
|
||||
@@ -30,12 +30,6 @@ CDPropertyTemplateTable::CDPropertyTemplateTable() {
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDPropertyTemplateTable::~CDPropertyTemplateTable() = default;
|
||||
|
||||
std::string CDPropertyTemplateTable::GetName() const {
|
||||
return "PropertyTemplate";
|
||||
}
|
||||
|
||||
CDPropertyTemplate CDPropertyTemplateTable::GetByMapID(uint32_t mapID) {
|
||||
for (const auto& entry : entries) {
|
||||
if (entry.mapID == mapID)
|
||||
|
||||
@@ -8,12 +8,11 @@ struct CDPropertyTemplate {
|
||||
std::string spawnName;
|
||||
};
|
||||
|
||||
class CDPropertyTemplateTable : public CDTable {
|
||||
class CDPropertyTemplateTable : public CDTable<CDPropertyTemplateTable> {
|
||||
public:
|
||||
CDPropertyTemplateTable();
|
||||
~CDPropertyTemplateTable();
|
||||
|
||||
[[nodiscard]] std::string GetName() const override;
|
||||
static const std::string GetTableName() { return "PropertyTemplate"; };
|
||||
CDPropertyTemplate GetByMapID(uint32_t mapID);
|
||||
private:
|
||||
std::vector<CDPropertyTemplate> entries{};
|
||||
|
||||
@@ -33,14 +33,6 @@ CDProximityMonitorComponentTable::CDProximityMonitorComponentTable(void) {
|
||||
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
|
||||
std::vector<CDProximityMonitorComponent> CDProximityMonitorComponentTable::Query(std::function<bool(CDProximityMonitorComponent)> predicate) {
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDProximityMonitorComponentTable.hpp
|
||||
\brief Contains data for the ProximityMonitorComponent table
|
||||
*/
|
||||
|
||||
//! ProximityMonitorComponent Entry Struct
|
||||
struct CDProximityMonitorComponent {
|
||||
unsigned int id;
|
||||
std::string Proximities;
|
||||
@@ -16,36 +10,14 @@ struct CDProximityMonitorComponent {
|
||||
bool LoadOnServer;
|
||||
};
|
||||
|
||||
|
||||
//! ProximityMonitorComponent table
|
||||
class CDProximityMonitorComponentTable : public CDTable {
|
||||
class CDProximityMonitorComponentTable : public CDTable<CDProximityMonitorComponentTable> {
|
||||
private:
|
||||
std::vector<CDProximityMonitorComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
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
|
||||
/*!
|
||||
\param predicate The 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;
|
||||
|
||||
};
|
||||
|
||||
@@ -43,12 +43,6 @@ CDRailActivatorComponentTable::CDRailActivatorComponentTable() {
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDRailActivatorComponentTable::~CDRailActivatorComponentTable() = default;
|
||||
|
||||
std::string CDRailActivatorComponentTable::GetName() const {
|
||||
return "RailActivatorComponent";
|
||||
}
|
||||
|
||||
CDRailActivatorComponent CDRailActivatorComponentTable::GetEntryByID(int32_t id) const {
|
||||
for (const auto& entry : m_Entries) {
|
||||
if (entry.id == id)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user