Compare commits

..

46 Commits

Author SHA1 Message Date
David Markowitz
b984cd6a0b Merge branch 'main' into property_behavior_saving 2024-06-12 19:17:39 -07:00
Gie "Max" Vanommeslaeghe
bcf1058759 Merge pull request #1595 from DarkflameUniverse/issue-462
fix: prevent moving items between inventories under cetain circumsances
2024-06-11 20:48:09 +02:00
David Markowitz
fee0238e79 fix: master not using table data, remove 2 noisy logs (#1613)
Tested with logs that queries to get soft and hard cap actually succeed now
Logs about slash command handler command registration and vanity NPC creation in mis matched worlds are now removed.
2024-06-09 15:31:57 -07:00
Wincent Holm
1454fcd003 Fix g++ 14 (#1610)
* Fix g++ 14

* Update thirdparty/CMakeLists.txt

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

---------

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2024-06-06 04:00:44 -05:00
Gie "Max" Vanommeslaeghe
af651f0d63 Merge pull request #1608 from DarkflameUniverse/feat--spectate-command
feat: spectate command
2024-06-04 09:17:18 +02:00
ff38503597 no feedback if empty 2024-06-03 22:51:46 -05:00
3f22bf5cc0 Add an easy way to stop spectating 2024-06-03 22:44:54 -05:00
9d5d2a68ee fix gm serialization 2024-06-03 22:30:57 -05:00
1a14c29c39 add returns, lol 2024-06-03 22:29:21 -05:00
2ef45bd7ee use empty 2024-06-03 22:28:37 -05:00
b56d077892 feat: spectate command 2024-06-03 21:50:12 -05:00
David Markowitz
a54600b41e busting out the multimap ig (#1602) 2024-05-31 13:46:18 -05:00
David Markowitz
342da927f5 fix dimantling items from not the model inventory (#1605) 2024-05-30 23:53:13 -05:00
David Markowitz
01086d05c8 fix: use after free and uninitialized memory (#1603)
* fix use after free and uninitialized memory

* add if check for packet lengths

* move purge down further

Its used in the if check too...
2024-05-30 23:53:03 -05:00
Remco Hofman
cce5755366 Fix Dockerfile vanity COPY (#1604)
Corrected an unintended mistake in the COPY commands for adding the
vanity files to the Docker container, causing only the last file
contents to be added to the file '/app/vanity/*'
2024-05-27 17:46:09 -07:00
TAHuntling
e966d3a644 Chore: split VE script up (#1598)
* Testing Scripts

Testing splitting AgSpaceStuff into AgSpaceStuff and AgShipShake

* fixed inclusions

* Removed DoShake

* cleaning up

* consistent if statements

* Update dScripts/ai/AG/AgShipShake.h

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

---------

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2024-05-27 01:24:48 -05:00
Gie "Max" Vanommeslaeghe
9328021339 Merge pull request #1600 from DarkflameUniverse/add-missing-scripts
fix: add back missing scripts from scripts refactor
2024-05-26 12:02:12 +02:00
Gie "Max" Vanommeslaeghe
d1134fdd62 Merge pull request #1601 from DarkflameUniverse/fix-using-skill-in-race
fix: players using non-car skills in a race
2024-05-26 12:01:54 +02:00
David Markowitz
efa658bc31 fix players using non-car skills in a race 2024-05-25 19:59:15 -07:00
David Markowitz
e59525d2ae Update CppScripts.cpp 2024-05-25 19:32:18 -07:00
David Markowitz
0348db72a5 fiux mission (#1596) 2024-05-25 12:24:02 -05:00
TAHuntling
debc2a96e2 Update CppScripts exclusion list (#1597) 2024-05-25 01:43:32 -07:00
86f335d64b fix type 2024-05-24 21:43:54 -05:00
8ca05241f2 fix: prevent moving items between inventories under cetain circumsances 2024-05-24 21:35:14 -05:00
David Markowitz
8ae1a8ff7c fix stale reference (#1594) 2024-05-24 09:15:30 -05:00
David Markowitz
f0960d48b2 Add more modular saving of config data for items (#1591)
* stubbing for saving item extra data

* add declaration to header

* modularize loading for all possible extra data

* move logic to Item

* remove extra map
2024-05-22 17:06:52 -07:00
David Markowitz
dc430d9758 Add reputation as a repeatable mission reward (#1590)
This reverts commit 7d1a28b492b263aba2008a5984dc0f5e7348a068.

Add stubbing for abbreviations

Reward reputation always if possible
2024-05-22 16:35:45 -07:00
TAHuntling
dea10c6d56 Client commands implementation (#1592)
* Adding Client Commands

Adding list of client commands provided to me by EmosewaMC

* Finished adding client commands
2024-05-22 08:32:24 -05:00
TAHuntling
ed00551982 feat: Help Command Pagination (#1581)
* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Fixed Comments

Now able to do /command help to see info for said command. Additionally this works for aliases. Fixed serialization missing from merge.

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp
2024-05-21 20:02:07 -05:00
TAHuntling
d6cac65a8d fix: Falling Off Edge in Pet Puzzle (#1584)
* FloatFix

* game activity setting

* Update dNavMesh.cpp

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
2024-05-21 20:01:44 -05:00
David Markowitz
d8f079cb1b fix mpc resetting on each world load (#1588) 2024-05-20 02:43:57 -05:00
David Markowitz
db2d4f02b5 preemptive include for windows 2024-05-18 04:16:07 -07:00
David Markowitz
00f36f3f28 missing include for windows 2024-05-18 04:15:07 -07:00
David Markowitz
a50b256689 Update IBehaviors.h 2024-05-18 03:54:09 -07:00
David Markowitz
b3548de7da debug logs and spacing 2024-05-18 03:52:36 -07:00
David Markowitz
387c37505c undo debug changes 2024-05-18 03:39:25 -07:00
David Markowitz
0c4108e730 Add loading from database
yahoo
2024-05-18 03:36:29 -07:00
David Markowitz
fd1c6ab2ea Saving actually works this time 2024-05-18 02:12:23 -07:00
David Markowitz
f2bf9a2a28 Saving to database working 2024-05-18 02:05:55 -07:00
TAHuntling
c8e0bb0db0 feat: Command Sorting (#1580)
* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update SlashCommandHandler.cpp

* Update dGame/dUtilities/SlashCommandHandler.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

---------

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2024-05-16 22:02:30 -07:00
David Markowitz
d9d262d3f1 prevent building in a folder which contains spaces (#1583) 2024-05-16 08:05:57 -05:00
TAHuntling
d0a5678290 chore: CppScripts refactor (#1579)
* Updating CppScripts

Rewrote file to use a lambda map rather than the massive if else chain. Kept the original comments alongside each of the different scripts they were by before.

* add script tests

* Update names

* More Changes to Scripts

* Update CppScripts.cpp

* Removing Unneeded Files

* Update CppScripts.cpp

* Delete tests/dGameTests/dScriptsTests/CMakeLists.txt

* Delete tests/dGameTests/dScriptsTests/dScriptsTests.cpp

* Delete tests/dGameTests/dScriptsTests/CppScriptsOld.cpp

* Delete tests/dGameTests/dScriptsTests/CppScriptsOld.h

* Update CMakeLists.txt

* finishing up

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
2024-05-16 04:50:18 -05:00
David Markowitz
35321b22d9 script fixes (#1577)
fixes an issue where the sirens would not be destroyed correctly
fixes undefined behavior in buff station

ok for real this time

actual fix for mermaids

and for general death_behavior 0 skill stuff
2024-05-16 04:30:32 -05:00
David Markowitz
8837b110ab add include guards (#1569) 2024-05-16 04:30:00 -05:00
David Markowitz
09a8c99f3e fix: mail crash from underflow and document variables (#1582)
* fix mail crash and document variables

* const
2024-05-16 04:29:48 -05:00
Terrev
e3b108e00e fv race place atm (#1570) 2024-05-13 06:18:27 -05:00
74 changed files with 1707 additions and 2962 deletions

View File

@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 3.25)
project(Darkflame)
# check if the path to the source directory contains a space
if("${CMAKE_SOURCE_DIR}" MATCHES " ")
message(FATAL_ERROR "The server cannot build in the path (" ${CMAKE_SOURCE_DIR} ") because it contains a space. Please move the server to a path without spaces.")
endif()
include(CTest)
set(CMAKE_CXX_STANDARD 20)
@@ -229,7 +235,6 @@ include_directories(
"tests/dCommonTests"
"tests/dGameTests"
"tests/dGameTests/dComponentsTests"
"tests/dGameTests/dScriptsTests"
SYSTEM "thirdparty/magic_enum/include/magic_enum"
SYSTEM "thirdparty/raknet/Source"

View File

@@ -31,7 +31,7 @@ COPY --from=build /app/build/*Server /app/
# Necessary suplimentary files
COPY --from=build /app/build/*.ini /app/configs/
COPY --from=build /app/build/vanity/*.* /app/vanity/*
COPY --from=build /app/build/vanity/*.* /app/vanity/
COPY --from=build /app/build/navmeshes /app/navmeshes
COPY --from=build /app/build/migrations /app/migrations
COPY --from=build /app/build/*.dcf /app/
@@ -39,7 +39,7 @@ COPY --from=build /app/build/*.dcf /app/
# backup of config and vanity files to copy to the host incase
# of a mount clobbering the copy from above
COPY --from=build /app/build/*.ini /app/default-configs/
COPY --from=build /app/build/vanity/*.* /app/default-vanity/*
COPY --from=build /app/build/vanity/*.* /app/default-vanity/
# needed as the container runs with the root user
# and therefore sudo doesn't exist

View File

@@ -179,6 +179,7 @@ int main(int argc, char** argv) {
}
void HandlePacket(Packet* packet) {
if (packet->length < 1) return;
if (packet->data[0] == ID_DISCONNECTION_NOTIFICATION || packet->data[0] == ID_CONNECTION_LOST) {
LOG("A server has disconnected, erasing their connected players from the list.");
} else if (packet->data[0] == ID_NEW_INCOMING_CONNECTION) {

View File

@@ -201,7 +201,7 @@ void OnTerminate() {
}
void MakeBacktrace() {
struct sigaction sigact;
struct sigaction sigact{};
sigact.sa_sigaction = CritErrHdlr;
sigact.sa_flags = SA_RESTART | SA_SIGINFO;

View File

@@ -31,22 +31,22 @@ public:
virtual ~LDFBaseData() {}
virtual void WriteToPacket(RakNet::BitStream& packet) = 0;
virtual void WriteToPacket(RakNet::BitStream& packet) const = 0;
virtual const std::u16string& GetKey() = 0;
virtual const std::u16string& GetKey() const = 0;
virtual eLDFType GetValueType() = 0;
virtual eLDFType GetValueType() const = 0;
/** Gets a string from the key/value pair
* @param includeKey Whether or not to include the key in the data
* @param includeTypeId Whether or not to include the type id in the data
* @return The string representation of the data
*/
virtual std::string GetString(bool includeKey = true, bool includeTypeId = true) = 0;
virtual std::string GetString(bool includeKey = true, bool includeTypeId = true) const = 0;
virtual std::string GetValueAsString() = 0;
virtual std::string GetValueAsString() const = 0;
virtual LDFBaseData* Copy() = 0;
virtual LDFBaseData* Copy() const = 0;
/**
* Given an input string, return the data as a LDF key.
@@ -62,7 +62,7 @@ private:
T value;
//! Writes the key to the packet
void WriteKey(RakNet::BitStream& packet) {
void WriteKey(RakNet::BitStream& packet) const {
packet.Write<uint8_t>(this->key.length() * sizeof(uint16_t));
for (uint32_t i = 0; i < this->key.length(); ++i) {
packet.Write<uint16_t>(this->key[i]);
@@ -70,7 +70,7 @@ private:
}
//! Writes the value to the packet
void WriteValue(RakNet::BitStream& packet) {
void WriteValue(RakNet::BitStream& packet) const {
packet.Write<uint8_t>(this->GetValueType());
packet.Write(this->value);
}
@@ -90,7 +90,7 @@ public:
/*!
\return The value
*/
const T& GetValue(void) { return this->value; }
const T& GetValue(void) const { return this->value; }
//! Sets the value
/*!
@@ -102,13 +102,13 @@ public:
/*!
\return The value string
*/
std::string GetValueString(void) { return ""; }
std::string GetValueString(void) const { return ""; }
//! Writes the data to a packet
/*!
\param packet The packet
*/
void WriteToPacket(RakNet::BitStream& packet) override {
void WriteToPacket(RakNet::BitStream& packet) const override {
this->WriteKey(packet);
this->WriteValue(packet);
}
@@ -117,13 +117,13 @@ public:
/*!
\return The key
*/
const std::u16string& GetKey(void) override { return this->key; }
const std::u16string& GetKey(void) const override { return this->key; }
//! Gets the LDF Type
/*!
\return The LDF value type
*/
eLDFType GetValueType(void) override { return LDF_TYPE_UNKNOWN; }
eLDFType GetValueType(void) const override { return LDF_TYPE_UNKNOWN; }
//! Gets the string data
/*!
@@ -131,7 +131,7 @@ public:
\param includeTypeId Whether or not to include the type id in the data
\return The string representation of the data
*/
std::string GetString(const bool includeKey = true, const bool includeTypeId = true) override {
std::string GetString(const bool includeKey = true, const bool includeTypeId = true) const override {
if (GetValueType() == -1) {
return GeneralUtils::UTF16ToWTF8(this->key) + "=-1:<server variable>";
}
@@ -154,11 +154,11 @@ public:
return stream.str();
}
std::string GetValueAsString() override {
std::string GetValueAsString() const override {
return this->GetValueString();
}
LDFBaseData* Copy() override {
LDFBaseData* Copy() const override {
return new LDFData<T>(key, value);
}
@@ -166,19 +166,19 @@ public:
};
// LDF Types
template<> inline eLDFType LDFData<std::u16string>::GetValueType(void) { return LDF_TYPE_UTF_16; };
template<> inline eLDFType LDFData<int32_t>::GetValueType(void) { return LDF_TYPE_S32; };
template<> inline eLDFType LDFData<float>::GetValueType(void) { return LDF_TYPE_FLOAT; };
template<> inline eLDFType LDFData<double>::GetValueType(void) { return LDF_TYPE_DOUBLE; };
template<> inline eLDFType LDFData<uint32_t>::GetValueType(void) { return LDF_TYPE_U32; };
template<> inline eLDFType LDFData<bool>::GetValueType(void) { return LDF_TYPE_BOOLEAN; };
template<> inline eLDFType LDFData<uint64_t>::GetValueType(void) { return LDF_TYPE_U64; };
template<> inline eLDFType LDFData<LWOOBJID>::GetValueType(void) { return LDF_TYPE_OBJID; };
template<> inline eLDFType LDFData<std::string>::GetValueType(void) { return LDF_TYPE_UTF_8; };
template<> inline eLDFType LDFData<std::u16string>::GetValueType(void) const { return LDF_TYPE_UTF_16; };
template<> inline eLDFType LDFData<int32_t>::GetValueType(void) const { return LDF_TYPE_S32; };
template<> inline eLDFType LDFData<float>::GetValueType(void) const { return LDF_TYPE_FLOAT; };
template<> inline eLDFType LDFData<double>::GetValueType(void) const { return LDF_TYPE_DOUBLE; };
template<> inline eLDFType LDFData<uint32_t>::GetValueType(void) const { return LDF_TYPE_U32; };
template<> inline eLDFType LDFData<bool>::GetValueType(void) const { return LDF_TYPE_BOOLEAN; };
template<> inline eLDFType LDFData<uint64_t>::GetValueType(void) const { return LDF_TYPE_U64; };
template<> inline eLDFType LDFData<LWOOBJID>::GetValueType(void) const { return LDF_TYPE_OBJID; };
template<> inline eLDFType LDFData<std::string>::GetValueType(void) const { return LDF_TYPE_UTF_8; };
// The specialized version for std::u16string (UTF-16)
template<>
inline void LDFData<std::u16string>::WriteValue(RakNet::BitStream& packet) {
inline void LDFData<std::u16string>::WriteValue(RakNet::BitStream& packet) const {
packet.Write<uint8_t>(this->GetValueType());
packet.Write<uint32_t>(this->value.length());
@@ -189,7 +189,7 @@ inline void LDFData<std::u16string>::WriteValue(RakNet::BitStream& packet) {
// The specialized version for bool
template<>
inline void LDFData<bool>::WriteValue(RakNet::BitStream& packet) {
inline void LDFData<bool>::WriteValue(RakNet::BitStream& packet) const {
packet.Write<uint8_t>(this->GetValueType());
packet.Write<uint8_t>(this->value);
@@ -197,7 +197,7 @@ inline void LDFData<bool>::WriteValue(RakNet::BitStream& packet) {
// The specialized version for std::string (UTF-8)
template<>
inline void LDFData<std::string>::WriteValue(RakNet::BitStream& packet) {
inline void LDFData<std::string>::WriteValue(RakNet::BitStream& packet) const {
packet.Write<uint8_t>(this->GetValueType());
packet.Write<uint32_t>(this->value.length());
@@ -206,18 +206,18 @@ inline void LDFData<std::string>::WriteValue(RakNet::BitStream& packet) {
}
}
template<> inline std::string LDFData<std::u16string>::GetValueString() {
template<> inline std::string LDFData<std::u16string>::GetValueString() const {
return GeneralUtils::UTF16ToWTF8(this->value, this->value.size());
}
template<> inline std::string LDFData<int32_t>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<float>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<double>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<uint32_t>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<bool>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<uint64_t>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<LWOOBJID>::GetValueString() { return std::to_string(this->value); }
template<> inline std::string LDFData<int32_t>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<float>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<double>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<uint32_t>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<bool>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<uint64_t>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<LWOOBJID>::GetValueString() const { return std::to_string(this->value); }
template<> inline std::string LDFData<std::string>::GetValueString() { return this->value; }
template<> inline std::string LDFData<std::string>::GetValueString() const { return this->value; }
#endif //!__LDFFORMAT__H__

View File

@@ -1,6 +1,7 @@
#include "dConfig.h"
#include <sstream>
#include <algorithm>
#include "BinaryPathFinder.h"
#include "GeneralUtils.h"

View File

@@ -0,0 +1,21 @@
#ifndef __EREPONSEMOVEITEMBETWEENINVENTORYTYPECODE__H__
#define __EREPONSEMOVEITEMBETWEENINVENTORYTYPECODE__H__
#include <cstdint>
enum class eReponseMoveItemBetweenInventoryTypeCode : int32_t {
SUCCESS,
FAIL_GENERIC,
FAIL_INV_FULL,
FAIL_ITEM_NOT_FOUND,
FAIL_CANT_MOVE_TO_THAT_INV_TYPE,
FAIL_NOT_NEAR_BANK,
FAIL_CANT_SWAP_ITEMS,
FAIL_SOURCE_TYPE,
FAIL_WRONG_DEST_TYPE,
FAIL_SWAP_DEST_TYPE,
FAIL_CANT_MOVE_THINKING_HAT,
FAIL_DISMOUNT_BEFORE_MOVING
};
#endif //!__EREPONSEMOVEITEMBETWEENINVENTORYTYPECODE__H__

View File

@@ -23,6 +23,7 @@
#include "IActivityLog.h"
#include "IIgnoreList.h"
#include "IAccountsRewardCodes.h"
#include "IBehaviors.h"
namespace sql {
class Statement;
@@ -40,7 +41,8 @@ class GameDatabase :
public IMail, public ICommandLog, public IPlayerCheatDetections, public IBugReports,
public IPropertyContents, public IProperty, public IPetNames, public ICharXml,
public IMigrationHistory, public IUgc, public IFriends, public ICharInfo,
public IAccounts, public IActivityLog, public IAccountsRewardCodes, public IIgnoreList {
public IAccounts, public IActivityLog, public IAccountsRewardCodes, public IIgnoreList,
public IBehaviors {
public:
virtual ~GameDatabase() = default;
// TODO: These should be made private.

View File

@@ -0,0 +1,22 @@
#ifndef IBEHAVIORS_H
#define IBEHAVIORS_H
#include <cstdint>
#include "dCommonVars.h"
class IBehaviors {
public:
struct Info {
int32_t behaviorId{};
uint32_t characterId{};
std::string behaviorInfo;
};
// This Add also takes care of updating if it exists.
virtual void AddBehavior(const Info& info) = 0;
virtual std::string GetBehavior(const int32_t behaviorId) = 0;
virtual void RemoveBehavior(const int32_t behaviorId) = 0;
};
#endif //!IBEHAVIORS_H

View File

@@ -1,6 +1,7 @@
#ifndef __IPROPERTIESCONTENTS__H__
#define __IPROPERTIESCONTENTS__H__
#include <array>
#include <cstdint>
#include <string_view>
@@ -16,6 +17,7 @@ public:
LWOOBJID id{};
LOT lot{};
uint32_t ugcId{};
std::array<int32_t, 5> behaviors{};
};
// Inserts a new UGC model into the database.
@@ -32,7 +34,7 @@ public:
virtual void InsertNewPropertyModel(const LWOOBJID& propertyId, const IPropertyContents::Model& model, const std::string_view name) = 0;
// Update the model position and rotation for the given property id.
virtual void UpdateModelPositionRotation(const LWOOBJID& propertyId, const NiPoint3& position, const NiQuaternion& rotation) = 0;
virtual void UpdateModel(const LWOOBJID& propertyId, const NiPoint3& position, const NiQuaternion& rotation, const std::array<std::pair<int32_t, std::string>, 5>& behaviors) = 0;
// Remove the model for the given property id.
virtual void RemoveModel(const LWOOBJID& modelId) = 0;

View File

@@ -74,7 +74,7 @@ public:
std::vector<IPropertyContents::Model> GetPropertyModels(const LWOOBJID& propertyId) override;
void RemoveUnreferencedUgcModels() override;
void InsertNewPropertyModel(const LWOOBJID& propertyId, const IPropertyContents::Model& model, const std::string_view name) override;
void UpdateModelPositionRotation(const LWOOBJID& propertyId, const NiPoint3& position, const NiQuaternion& rotation) override;
void UpdateModel(const LWOOBJID& propertyId, const NiPoint3& position, const NiQuaternion& rotation, const std::array<std::pair<int32_t, std::string>, 5>& behaviors) override;
void RemoveModel(const LWOOBJID& modelId) override;
void UpdatePerformanceCost(const LWOZONEID& zoneId, const float performanceCost) override;
void InsertNewBugReport(const IBugReports::Info& info) override;
@@ -108,6 +108,9 @@ public:
std::vector<IIgnoreList::Info> GetIgnoreList(const uint32_t playerId) override;
void InsertRewardCode(const uint32_t account_id, const uint32_t reward_code) override;
std::vector<uint32_t> GetRewardCodesByAccountID(const uint32_t account_id) override;
void AddBehavior(const IBehaviors::Info& info) override;
std::string GetBehavior(const int32_t behaviorId) override;
void RemoveBehavior(const int32_t characterId) override;
private:
// Generic query functions that can be used for any query.

View File

@@ -0,0 +1,19 @@
#include "IBehaviors.h"
#include "MySQLDatabase.h"
void MySQLDatabase::AddBehavior(const IBehaviors::Info& info) {
ExecuteInsert(
"INSERT INTO behaviors (behavior_info, character_id, behavior_id) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE behavior_info = ?",
info.behaviorInfo, info.characterId, info.behaviorId, info.behaviorInfo
);
}
void MySQLDatabase::RemoveBehavior(const int32_t behaviorId) {
ExecuteDelete("DELETE FROM behaviors WHERE behavior_id = ?", behaviorId);
}
std::string MySQLDatabase::GetBehavior(const int32_t behaviorId) {
auto result = ExecuteSelect("SELECT behavior_info FROM behaviors WHERE behavior_id = ?", behaviorId);
return result->next() ? result->getString("behavior_info").c_str() : "";
}

View File

@@ -2,6 +2,7 @@ set(DDATABASES_DATABASES_MYSQL_TABLES_SOURCES
"Accounts.cpp"
"AccountsRewardCodes.cpp"
"ActivityLog.cpp"
"Behaviors.cpp"
"BugReports.cpp"
"CharInfo.cpp"
"CharXml.cpp"

View File

@@ -1,7 +1,10 @@
#include "MySQLDatabase.h"
std::vector<IPropertyContents::Model> MySQLDatabase::GetPropertyModels(const LWOOBJID& propertyId) {
auto result = ExecuteSelect("SELECT id, lot, x, y, z, rx, ry, rz, rw, ugc_id FROM properties_contents WHERE property_id = ?;", propertyId);
auto result = ExecuteSelect(
"SELECT id, lot, x, y, z, rx, ry, rz, rw, ugc_id, "
"behavior_1, behavior_2, behavior_3, behavior_4, behavior_5 "
"FROM properties_contents WHERE property_id = ?;", propertyId);
std::vector<IPropertyContents::Model> toReturn;
toReturn.reserve(result->rowsCount());
@@ -17,6 +20,12 @@ std::vector<IPropertyContents::Model> MySQLDatabase::GetPropertyModels(const LWO
model.rotation.y = result->getFloat("ry");
model.rotation.z = result->getFloat("rz");
model.ugcId = result->getUInt64("ugc_id");
model.behaviors[0] = result->getInt("behavior_1");
model.behaviors[1] = result->getInt("behavior_2");
model.behaviors[2] = result->getInt("behavior_3");
model.behaviors[3] = result->getInt("behavior_4");
model.behaviors[4] = result->getInt("behavior_5");
toReturn.push_back(std::move(model));
}
return toReturn;
@@ -32,21 +41,23 @@ void MySQLDatabase::InsertNewPropertyModel(const LWOOBJID& propertyId, const IPr
model.id, propertyId, model.ugcId == 0 ? std::nullopt : std::optional(model.ugcId), static_cast<uint32_t>(model.lot),
model.position.x, model.position.y, model.position.z, model.rotation.x, model.rotation.y, model.rotation.z, model.rotation.w,
name, "", // Model description. TODO implement this.
0, // behavior 1. TODO implement this.
0, // behavior 2. TODO implement this.
0, // behavior 3. TODO implement this.
0, // behavior 4. TODO implement this.
0 // behavior 5. TODO implement this.
model.behaviors[0], // behavior 1
model.behaviors[1], // behavior 2
model.behaviors[2], // behavior 3
model.behaviors[3], // behavior 4
model.behaviors[4] // behavior 5
);
} catch (sql::SQLException& e) {
LOG("Error inserting new property model: %s", e.what());
}
}
void MySQLDatabase::UpdateModelPositionRotation(const LWOOBJID& propertyId, const NiPoint3& position, const NiQuaternion& rotation) {
void MySQLDatabase::UpdateModel(const LWOOBJID& propertyId, const NiPoint3& position, const NiQuaternion& rotation, const std::array<std::pair<int32_t, std::string>, 5>& behaviors) {
ExecuteUpdate(
"UPDATE properties_contents SET x = ?, y = ?, z = ?, rx = ?, ry = ?, rz = ?, rw = ? WHERE id = ?;",
position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, rotation.w, propertyId);
"UPDATE properties_contents SET x = ?, y = ?, z = ?, rx = ?, ry = ?, rz = ?, rw = ?, "
"behavior_1 = ?, behavior_2 = ?, behavior_3 = ?, behavior_4 = ?, behavior_5 = ? WHERE id = ?;",
position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, rotation.w,
behaviors[0].first, behaviors[1].first, behaviors[2].first, behaviors[3].first, behaviors[4].first, propertyId);
}
void MySQLDatabase::RemoveModel(const LWOOBJID& modelId) {

View File

@@ -27,6 +27,8 @@ Character::Character(uint32_t id, User* parentUser) {
m_ID = id;
m_ParentUser = parentUser;
m_OurEntity = nullptr;
m_GMLevel = eGameMasterLevel::CIVILIAN;
m_PermissionMap = static_cast<ePermissionMap>(0);
}
Character::~Character() {

View File

@@ -464,22 +464,22 @@ private:
/**
* The ID of this character. First 32 bits of the ObjectID.
*/
uint32_t m_ID;
uint32_t m_ID{};
/**
* The 64-bit unique ID used in the game.
*/
LWOOBJID m_ObjectID;
LWOOBJID m_ObjectID{ LWOOBJID_EMPTY };
/**
* The user that owns this character.
*/
User* m_ParentUser;
User* m_ParentUser{};
/**
* If the character is in game, this is the entity that it represents, else nullptr.
*/
Entity* m_OurEntity;
Entity* m_OurEntity{};
/**
* 0-9, the Game Master level of this character.
@@ -506,17 +506,17 @@ private:
/**
* Whether the custom name of this character is rejected
*/
bool m_NameRejected;
bool m_NameRejected{};
/**
* The current amount of coins of this character
*/
int64_t m_Coins;
int64_t m_Coins{};
/**
* Whether the character is building
*/
bool m_BuildMode;
bool m_BuildMode{};
/**
* The items equipped by the character on world load
@@ -583,7 +583,7 @@ private:
/**
* The ID of the properties of this character
*/
uint32_t m_PropertyCloneID;
uint32_t m_PropertyCloneID{};
/**
* The XML data for this character, stored as string
@@ -613,7 +613,7 @@ private:
/**
* The last time this character logged in
*/
uint64_t m_LastLogin;
uint64_t m_LastLogin{};
/**
* The gameplay flags this character has (not just true values)

View File

@@ -225,7 +225,7 @@ void Entity::Initialize() {
AddComponent<SimplePhysicsComponent>(simplePhysicsComponentID);
AddComponent<ModelComponent>();
AddComponent<ModelComponent>()->LoadBehaviors();
AddComponent<RenderComponent>();
@@ -649,7 +649,7 @@ void Entity::Initialize() {
}
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::MODEL, -1) != -1 && !GetComponent<PetComponent>()) {
AddComponent<ModelComponent>();
AddComponent<ModelComponent>()->LoadBehaviors();
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) {
auto* destroyableComponent = AddComponent<DestroyableComponent>();
destroyableComponent->SetHealth(1);
@@ -1534,7 +1534,7 @@ void Entity::Kill(Entity* murderer, const eKillType killType) {
bool waitForDeathAnimation = false;
if (destroyableComponent) {
waitForDeathAnimation = destroyableComponent->GetDeathBehavior() == 0 && killType != eKillType::SILENT;
waitForDeathAnimation = !destroyableComponent->GetIsSmashable() && destroyableComponent->GetDeathBehavior() == 0 && killType != eKillType::SILENT;
}
// Live waited a hard coded 12 seconds for death animations of type 0 before networking destruction!

View File

@@ -12,6 +12,7 @@ User::User(const SystemAddress& sysAddr, const std::string& username, const std:
m_AccountID = 0;
m_Username = "";
m_SessionKey = "";
m_MuteExpire = 0;
m_MaxGMLevel = eGameMasterLevel::CIVILIAN; //The max GM level this account can assign to it's characters
m_LastCharID = 0;

View File

@@ -105,7 +105,7 @@ void BehaviorContext::ExecuteUpdates() {
this->scheduledUpdates.clear();
}
void BehaviorContext::SyncBehavior(const uint32_t syncId, RakNet::BitStream& bitStream) {
bool BehaviorContext::SyncBehavior(const uint32_t syncId, RakNet::BitStream& bitStream) {
BehaviorSyncEntry entry;
auto found = false;
@@ -128,7 +128,7 @@ void BehaviorContext::SyncBehavior(const uint32_t syncId, RakNet::BitStream& bit
if (!found) {
LOG("Failed to find behavior sync entry with sync id (%i)!", syncId);
return;
return false;
}
auto* behavior = entry.behavior;
@@ -137,10 +137,11 @@ void BehaviorContext::SyncBehavior(const uint32_t syncId, RakNet::BitStream& bit
if (behavior == nullptr) {
LOG("Invalid behavior for sync id (%i)!", syncId);
return;
return false;
}
behavior->Sync(this, bitStream, branch);
return true;
}
@@ -224,6 +225,16 @@ bool BehaviorContext::CalculateUpdate(const float deltaTime) {
for (auto i = 0u; i < this->syncEntries.size(); ++i) {
auto entry = this->syncEntries.at(i);
if (entry.behavior->m_templateId == BehaviorTemplate::ATTACK_DELAY) {
auto* self = Game::entityManager->GetEntity(originator);
if (self) {
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
if (destroyableComponent && destroyableComponent->GetHealth() <= 0) {
continue;
}
}
}
if (entry.time > 0) {
entry.time -= deltaTime;
@@ -333,7 +344,7 @@ void BehaviorContext::FilterTargets(std::vector<Entity*>& targets, std::forward_
}
// handle targeting the caster
if (candidate == caster){
if (candidate == caster) {
// if we aren't targeting self, erase, otherise increment and continue
if (!targetSelf) index = targets.erase(index);
else index++;
@@ -356,24 +367,24 @@ void BehaviorContext::FilterTargets(std::vector<Entity*>& targets, std::forward_
}
// if they are dead, then earse and continue
if (candidateDestroyableComponent->GetIsDead()){
if (candidateDestroyableComponent->GetIsDead()) {
index = targets.erase(index);
continue;
}
// if their faction is explicitly included, increment and continue
auto candidateFactions = candidateDestroyableComponent->GetFactionIDs();
if (CheckFactionList(includeFactionList, candidateFactions)){
if (CheckFactionList(includeFactionList, candidateFactions)) {
index++;
continue;
}
// check if they are a team member
if (targetTeam){
if (targetTeam) {
auto* team = TeamManager::Instance()->GetTeam(this->caster);
if (team){
if (team) {
// if we find a team member keep it and continue to skip enemy checks
if(std::find(team->members.begin(), team->members.end(), candidate->GetObjectID()) != team->members.end()){
if (std::find(team->members.begin(), team->members.end(), candidate->GetObjectID()) != team->members.end()) {
index++;
continue;
}
@@ -419,8 +430,8 @@ bool BehaviorContext::CheckTargetingRequirements(const Entity* target) const {
// returns true if any of the object factions are in the faction list
bool BehaviorContext::CheckFactionList(std::forward_list<int32_t>& factionList, std::vector<int32_t>& objectsFactions) const {
if (factionList.empty() || objectsFactions.empty()) return false;
for (auto faction : factionList){
if(std::find(objectsFactions.begin(), objectsFactions.end(), faction) != objectsFactions.end()) return true;
for (auto faction : factionList) {
if (std::find(objectsFactions.begin(), objectsFactions.end(), faction) != objectsFactions.end()) return true;
}
return false;
}

View File

@@ -93,7 +93,7 @@ struct BehaviorContext
void ExecuteUpdates();
void SyncBehavior(uint32_t syncId, RakNet::BitStream& bitStream);
bool SyncBehavior(uint32_t syncId, RakNet::BitStream& bitStream);
void Update(float deltaTime);

View File

@@ -29,7 +29,8 @@
BaseCombatAIComponent::BaseCombatAIComponent(Entity* parent, const uint32_t id): Component(parent) {
m_Target = LWOOBJID_EMPTY;
SetAiState(AiState::spawn);
m_DirtyStateOrTarget = true;
m_State = AiState::spawn;
m_Timer = 1.0f;
m_StartPosition = parent->GetPosition();
m_MovementAI = nullptr;

View File

@@ -558,19 +558,9 @@ void InventoryComponent::LoadXml(const tinyxml2::XMLDocument& document) {
itemElement->QueryAttribute("parent", &parent);
// End custom xml
std::vector<LDFBaseData*> config;
auto* item = new Item(id, lot, inventory, slot, count, bound, {}, parent, subKey);
auto* extraInfo = itemElement->FirstChildElement("x");
if (extraInfo) {
std::string modInfo = extraInfo->Attribute("ma");
LDFBaseData* moduleAssembly = new LDFData<std::u16string>(u"assemblyPartLOTs", GeneralUtils::ASCIIToUTF16(modInfo.substr(2, modInfo.size() - 1)));
config.push_back(moduleAssembly);
}
const auto* item = new Item(id, lot, inventory, slot, count, bound, config, parent, subKey);
item->LoadConfigXml(*itemElement);
if (equipped) {
const auto info = Inventory::FindItemComponent(lot);
@@ -676,17 +666,7 @@ void InventoryComponent::UpdateXml(tinyxml2::XMLDocument& document) {
itemElement->SetAttribute("parent", item->GetParent());
// End custom xml
for (auto* data : item->GetConfig()) {
if (data->GetKey() != u"assemblyPartLOTs") {
continue;
}
auto* extraInfo = document.NewElement("x");
extraInfo->SetAttribute("ma", data->GetString(false).c_str());
itemElement->LinkEndChild(extraInfo);
}
item->SaveConfigXml(*itemElement);
bagElement->LinkEndChild(itemElement);
}
@@ -895,8 +875,6 @@ void InventoryComponent::UnEquipItem(Item* item) {
RemoveSlot(item->GetInfo().equipLocation);
PurgeProxies(item);
UnequipScripts(item);
Game::entityManager->SerializeEntity(m_Parent);
@@ -906,6 +884,8 @@ void InventoryComponent::UnEquipItem(Item* item) {
PropertyManagementComponent::Instance()->GetParent()->OnZonePropertyModelRemovedWhileEquipped(m_Parent);
Game::zoneManager->GetZoneControlObject()->OnZonePropertyModelRemovedWhileEquipped(m_Parent);
}
PurgeProxies(item);
}
@@ -1525,10 +1505,10 @@ void InventoryComponent::PurgeProxies(Item* item) {
const auto root = item->GetParent();
if (root != LWOOBJID_EMPTY) {
item = FindItemById(root);
Item* itemRoot = FindItemById(root);
if (item != nullptr) {
UnEquipItem(item);
if (itemRoot != nullptr) {
UnEquipItem(itemRoot);
}
return;
@@ -1600,18 +1580,18 @@ void InventoryComponent::UpdatePetXml(tinyxml2::XMLDocument& document) {
}
bool InventoryComponent::SetSkill(int32_t slot, uint32_t skillId){
bool InventoryComponent::SetSkill(int32_t slot, uint32_t skillId) {
BehaviorSlot behaviorSlot = BehaviorSlot::Invalid;
if (slot == 1 ) behaviorSlot = BehaviorSlot::Primary;
else if (slot == 2 ) behaviorSlot = BehaviorSlot::Offhand;
else if (slot == 3 ) behaviorSlot = BehaviorSlot::Neck;
else if (slot == 4 ) behaviorSlot = BehaviorSlot::Head;
else if (slot == 5 ) behaviorSlot = BehaviorSlot::Consumable;
if (slot == 1) behaviorSlot = BehaviorSlot::Primary;
else if (slot == 2) behaviorSlot = BehaviorSlot::Offhand;
else if (slot == 3) behaviorSlot = BehaviorSlot::Neck;
else if (slot == 4) behaviorSlot = BehaviorSlot::Head;
else if (slot == 5) behaviorSlot = BehaviorSlot::Consumable;
else return false;
return SetSkill(behaviorSlot, skillId);
}
bool InventoryComponent::SetSkill(BehaviorSlot slot, uint32_t skillId){
bool InventoryComponent::SetSkill(BehaviorSlot slot, uint32_t skillId) {
if (skillId == 0) return false;
const auto index = m_Skills.find(slot);
if (index != m_Skills.end()) {
@@ -1623,4 +1603,3 @@ bool InventoryComponent::SetSkill(BehaviorSlot slot, uint32_t skillId){
m_Skills.insert_or_assign(slot, skillId);
return true;
}

View File

@@ -6,6 +6,9 @@
#include "BehaviorStates.h"
#include "ControlBehaviorMsgs.h"
#include "tinyxml2.h"
#include "Database.h"
ModelComponent::ModelComponent(Entity* parent) : Component(parent) {
m_OriginalPosition = m_Parent->GetDefaultPosition();
@@ -14,6 +17,33 @@ ModelComponent::ModelComponent(Entity* parent) : Component(parent) {
m_userModelID = m_Parent->GetVarAs<LWOOBJID>(u"userModelID");
}
void ModelComponent::LoadBehaviors() {
auto behaviors = GeneralUtils::SplitString(m_Parent->GetVar<std::string>(u"userModelBehaviors"), ',');
for (const auto& behavior : behaviors) {
if (behavior.empty()) continue;
const auto behaviorId = GeneralUtils::TryParse<int32_t>(behavior);
if (!behaviorId.has_value() || behaviorId.value() == 0) continue;
LOG_DEBUG("Loading behavior %d", behaviorId.value());
auto& inserted = m_Behaviors.emplace_back();
inserted.SetBehaviorId(*behaviorId);
const auto behaviorStr = Database::Get()->GetBehavior(behaviorId.value());
tinyxml2::XMLDocument behaviorXml;
auto res = behaviorXml.Parse(behaviorStr.c_str(), behaviorStr.size());
LOG_DEBUG("Behavior %i %d: %s", res, behaviorId.value(), behaviorStr.c_str());
const auto* const behaviorRoot = behaviorXml.FirstChildElement("Behavior");
if (!behaviorRoot) {
LOG("Failed to load behavior %d due to missing behavior root", behaviorId.value());
continue;
}
inserted.Deserialize(*behaviorRoot);
}
}
void ModelComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) {
// ItemComponent Serialization. Pets do not get this serialization.
if (!m_Parent->HasComponent(eReplicaComponentType::PET)) {
@@ -72,3 +102,23 @@ void ModelComponent::MoveToInventory(MoveToInventoryMessage& msg) {
m_Behaviors.erase(m_Behaviors.begin() + msg.GetBehaviorIndex());
// TODO move to the inventory
}
std::array<std::pair<int32_t, std::string>, 5> ModelComponent::GetBehaviorsForSave() const {
std::array<std::pair<int32_t, std::string>, 5> toReturn{};
for (auto i = 0; i < m_Behaviors.size(); i++) {
const auto& behavior = m_Behaviors.at(i);
if (behavior.GetBehaviorId() == -1) continue;
auto& [id, behaviorData] = toReturn[i];
id = behavior.GetBehaviorId();
tinyxml2::XMLDocument doc;
auto* root = doc.NewElement("Behavior");
behavior.Serialize(*root);
doc.InsertFirstChild(root);
tinyxml2::XMLPrinter printer(0, true, 0);
doc.Print(&printer);
behaviorData = printer.CStr();
}
return toReturn;
}

View File

@@ -1,5 +1,6 @@
#pragma once
#include <array>
#include <map>
#include "dCommonVars.h"
@@ -28,6 +29,8 @@ public:
ModelComponent(Entity* parent);
void LoadBehaviors();
void Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) override;
/**
@@ -109,6 +112,8 @@ public:
void VerifyBehaviors();
std::array<std::pair<int32_t, std::string>, 5> GetBehaviorsForSave() const;
private:
/**
* The behaviors of the model

View File

@@ -32,6 +32,8 @@
#include "eGameMasterLevel.h"
#include "eMissionState.h"
#include "dNavMesh.h"
#include "eGameActivity.h"
#include "eStateChangeType.h"
std::unordered_map<LWOOBJID, LWOOBJID> PetComponent::currentActivities{};
std::unordered_map<LWOOBJID, LWOOBJID> PetComponent::activePets{};
@@ -210,24 +212,23 @@ void PetComponent::OnUse(Entity* originator) {
if (dpWorld::IsLoaded()) {
NiPoint3 attempt = petPosition + forward * interactionDistance;
float y = dpWorld::GetNavMesh()->GetHeightAtPoint(attempt);
NiPoint3 nearestPoint = dpWorld::GetNavMesh()->NearestPoint(attempt);
while (std::abs(y - petPosition.y) > 4 && interactionDistance > 10) {
while (std::abs(nearestPoint.y - petPosition.y) > 4 && interactionDistance > 10) {
const NiPoint3 forward = m_Parent->GetRotation().GetForwardVector();
attempt = originatorPosition + forward * interactionDistance;
y = dpWorld::GetNavMesh()->GetHeightAtPoint(attempt);
nearestPoint = dpWorld::GetNavMesh()->NearestPoint(attempt);
interactionDistance -= 0.5f;
}
position = attempt;
position = nearestPoint;
} else {
position = petPosition + forward * interactionDistance;
}
auto rotation = NiQuaternion::LookAt(position, petPosition);
GameMessages::SendNotifyPetTamingMinigame(
@@ -246,11 +247,11 @@ void PetComponent::OnUse(Entity* originator) {
m_Parent->GetObjectID(),
LWOOBJID_EMPTY,
originator->GetObjectID(),
true,
false,
ePetTamingNotifyType::BEGIN,
petPosition,
position,
rotation,
NiPoint3Constant::ZERO,
NiPoint3Constant::ZERO,
NiQuaternion(0.0f, 0.0f, 0.0f, 0.0f),
UNASSIGNED_SYSTEM_ADDRESS
);
@@ -258,11 +259,18 @@ void PetComponent::OnUse(Entity* originator) {
m_Tamer = originator->GetObjectID();
SetStatus(5);
Game::entityManager->SerializeEntity(m_Parent);
currentActivities.insert_or_assign(m_Tamer, m_Parent->GetObjectID());
// Notify the start of a pet taming minigame
m_Parent->GetScript()->OnNotifyPetTamingMinigame(m_Parent, originator, ePetTamingNotifyType::BEGIN);
auto* characterComponent = originator->GetComponent<CharacterComponent>();
if (characterComponent != nullptr) {
characterComponent->SetCurrentActivity(eGameActivity::PET_TAMING);
Game::entityManager->SerializeEntity(originator);
}
}
void PetComponent::Update(float deltaTime) {
@@ -627,6 +635,11 @@ void PetComponent::RequestSetPetName(std::u16string name) {
UNASSIGNED_SYSTEM_ADDRESS
);
auto* characterComponent = tamer->GetComponent<CharacterComponent>();
if (characterComponent != nullptr) {
characterComponent->SetCurrentActivity(eGameActivity::NONE);
Game::entityManager->SerializeEntity(tamer);
}
GameMessages::SendTerminateInteraction(m_Tamer, eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID());
auto* modelEntity = Game::entityManager->GetEntity(m_ModelId);
@@ -666,6 +679,11 @@ void PetComponent::ClientExitTamingMinigame(bool voluntaryExit) {
UNASSIGNED_SYSTEM_ADDRESS
);
auto* characterComponent = tamer->GetComponent<CharacterComponent>();
if (characterComponent != nullptr) {
characterComponent->SetCurrentActivity(eGameActivity::NONE);
Game::entityManager->SerializeEntity(tamer);
}
GameMessages::SendNotifyTamingModelLoadedOnServer(m_Tamer, tamer->GetSystemAddress());
GameMessages::SendTerminateInteraction(m_Tamer, eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID());
@@ -712,6 +730,11 @@ void PetComponent::ClientFailTamingMinigame() {
UNASSIGNED_SYSTEM_ADDRESS
);
auto* characterComponent = tamer->GetComponent<CharacterComponent>();
if (characterComponent != nullptr) {
characterComponent->SetCurrentActivity(eGameActivity::NONE);
Game::entityManager->SerializeEntity(tamer);
}
GameMessages::SendNotifyTamingModelLoadedOnServer(m_Tamer, tamer->GetSystemAddress());
GameMessages::SendTerminateInteraction(m_Tamer, eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID());

View File

@@ -21,9 +21,11 @@
#include "eObjectBits.h"
#include "CharacterComponent.h"
#include "PlayerManager.h"
#include "ModelComponent.h"
#include <vector>
#include "CppScripts.h"
#include <ranges>
PropertyManagementComponent* PropertyManagementComponent::instance = nullptr;
@@ -593,6 +595,20 @@ void PropertyManagementComponent::Load() {
settings.push_back(new LDFData<int>(u"componentWhitelist", 1));
}
std::ostringstream userModelBehavior;
bool firstAdded = false;
for (auto behavior : databaseModel.behaviors) {
if (behavior < 0) {
LOG("Invalid behavior ID: %d, removing behavior reference from model", behavior);
behavior = 0;
}
if (firstAdded) userModelBehavior << ",";
userModelBehavior << behavior;
firstAdded = true;
}
settings.push_back(new LDFData<std::string>(u"userModelBehaviors", userModelBehavior.str()));
node->config = settings;
const auto spawnerId = Game::zoneManager->MakeSpawner(info);
@@ -610,6 +626,12 @@ void PropertyManagementComponent::Save() {
return;
}
const auto* const owner = GetOwner();
if (!owner) return;
const auto* const character = owner->GetCharacter();
if (!character) return;
auto present = Database::Get()->GetPropertyModels(propertyId);
std::vector<LWOOBJID> modelIds;
@@ -624,6 +646,20 @@ void PropertyManagementComponent::Save() {
if (entity == nullptr) {
continue;
}
auto* modelComponent = entity->GetComponent<ModelComponent>();
if (!modelComponent) continue;
const auto modelBehaviors = modelComponent->GetBehaviorsForSave();
// save the behaviors of the model
for (const auto& [behaviorId, behaviorStr] : modelBehaviors) {
if (behaviorStr.empty() || behaviorId == -1 || behaviorId == 0) continue;
IBehaviors::Info info {
.behaviorId = behaviorId,
.characterId = character->GetID(),
.behaviorInfo = behaviorStr
};
Database::Get()->AddBehavior(info);
}
const auto position = entity->GetPosition();
const auto rotation = entity->GetRotation();
@@ -635,10 +671,13 @@ void PropertyManagementComponent::Save() {
model.position = position;
model.rotation = rotation;
model.ugcId = 0;
for (auto i = 0; i < model.behaviors.size(); i++) {
model.behaviors[i] = modelBehaviors[i].first;
}
Database::Get()->InsertNewPropertyModel(propertyId, model, "Objects_" + std::to_string(model.lot) + "_name");
} else {
Database::Get()->UpdateModelPositionRotation(id, position, rotation);
Database::Get()->UpdateModel(id, position, rotation, modelBehaviors);
}
}

View File

@@ -25,6 +25,7 @@
#include "LeaderboardManager.h"
#include "dZoneManager.h"
#include "CDActivitiesTable.h"
#include "eStateChangeType.h"
#include <ctime>
#ifndef M_PI
@@ -77,6 +78,9 @@ void RacingControlComponent::OnPlayerLoaded(Entity* player) {
m_LoadedPlayers++;
// not live accurate to stun the player but prevents them from using skills during the race that are not meant to be used.
GameMessages::SendSetStunned(player->GetObjectID(), eStateChangeType::PUSH, player->GetSystemAddress(), LWOOBJID_EMPTY, true, true, true, true, true, true, true, true, true);
LOG("Loading player %i",
m_LoadedPlayers);
m_LobbyPlayers.push_back(player->GetObjectID());

View File

@@ -38,7 +38,7 @@ bool SkillComponent::CastPlayerSkill(const uint32_t behaviorId, const uint32_t s
context->skillID = skillID;
this->m_managedBehaviors.insert_or_assign(skillUid, context);
this->m_managedBehaviors.insert({ skillUid, context });
auto* behavior = Behavior::CreateBehavior(behaviorId);
@@ -52,17 +52,24 @@ bool SkillComponent::CastPlayerSkill(const uint32_t behaviorId, const uint32_t s
}
void SkillComponent::SyncPlayerSkill(const uint32_t skillUid, const uint32_t syncId, RakNet::BitStream& bitStream) {
const auto index = this->m_managedBehaviors.find(skillUid);
const auto index = this->m_managedBehaviors.equal_range(skillUid);
if (index == this->m_managedBehaviors.end()) {
if (index.first == this->m_managedBehaviors.end()) {
LOG("Failed to find skill with uid (%i)!", skillUid, syncId);
return;
}
auto* context = index->second;
bool foundSyncId = false;
for (auto it = index.first; it != index.second && !foundSyncId; ++it) {
const auto& context = it->second;
context->SyncBehavior(syncId, bitStream);
foundSyncId = context->SyncBehavior(syncId, bitStream);
}
if (!foundSyncId) {
LOG("Failed to find sync id (%i) for skill with uid (%i)!", syncId, skillUid);
}
}
@@ -138,7 +145,7 @@ void SkillComponent::Update(const float deltaTime) {
for (const auto& pair : this->m_managedBehaviors) pair.second->UpdatePlayerSyncs(deltaTime);
}
std::map<uint32_t, BehaviorContext*> keep{};
std::multimap<uint32_t, BehaviorContext*> keep{};
for (const auto& pair : this->m_managedBehaviors) {
auto* context = pair.second;
@@ -176,7 +183,7 @@ void SkillComponent::Update(const float deltaTime) {
}
}
keep.insert_or_assign(pair.first, context);
keep.insert({ pair.first, context });
}
this->m_managedBehaviors = keep;
@@ -285,7 +292,7 @@ SkillExecutionResult SkillComponent::CalculateBehavior(
return { false, 0 };
}
this->m_managedBehaviors.insert_or_assign(context->skillUId, context);
this->m_managedBehaviors.insert({ context->skillUId, context });
if (!clientInitalized) {
// Echo start skill

View File

@@ -188,7 +188,7 @@ private:
/**
* All of the active skills mapped by their unique ID.
*/
std::map<uint32_t, BehaviorContext*> m_managedBehaviors;
std::multimap<uint32_t, BehaviorContext*> m_managedBehaviors;
/**
* All active projectiles.

View File

@@ -76,8 +76,8 @@ void VendorComponent::RefreshInventory(bool isCreation) {
if (vendorItems.empty()) break;
auto randomItemIndex = GeneralUtils::GenerateRandomNumber<int32_t>(0, vendorItems.size() - 1);
const auto& randomItem = vendorItems.at(randomItemIndex);
vendorItems.erase(vendorItems.begin() + randomItemIndex);
if (SetupItem(randomItem.itemid)) m_Inventory.push_back(SoldItem(randomItem.itemid, randomItem.sortPriority));
vendorItems.erase(vendorItems.begin() + randomItemIndex);
}
}
}

View File

@@ -99,9 +99,11 @@
#include "ActivityManager.h"
#include "PlayerManager.h"
#include "eVendorTransactionResult.h"
#include "eReponseMoveItemBetweenInventoryTypeCode.h"
#include "CDComponentsRegistryTable.h"
#include "CDObjectsTable.h"
#include "eItemType.h"
void GameMessages::SendFireEventClientSide(const LWOOBJID& objectID, const SystemAddress& sysAddr, std::u16string args, const LWOOBJID& object, int64_t param1, int param2, const LWOOBJID& sender) {
CBITSTREAM;
@@ -412,7 +414,8 @@ void GameMessages::SendPlatformResync(Entity* entity, const SystemAddress& sysAd
bitStream.Write(qUnexpectedRotation.w);
}
SEND_PACKET_BROADCAST;
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
SEND_PACKET;
}
void GameMessages::SendRestoreToPostLoadStats(Entity* entity, const SystemAddress& sysAddr) {
@@ -4563,16 +4566,31 @@ void GameMessages::HandleRequestMoveItemBetweenInventoryTypes(RakNet::BitStream&
if (inStream.ReadBit()) inStream.Read(itemLOT);
if (invTypeDst == invTypeSrc) {
SendResponseMoveItemBetweenInventoryTypes(entity->GetObjectID(), sysAddr, invTypeDst, invTypeSrc, eReponseMoveItemBetweenInventoryTypeCode::FAIL_GENERIC);
return;
}
auto* inventoryComponent = entity->GetComponent<InventoryComponent>();
if (inventoryComponent != nullptr) {
if (inventoryComponent) {
if (itemID != LWOOBJID_EMPTY) {
auto* item = inventoryComponent->FindItemById(itemID);
if (!item) return;
if (!item) {
SendResponseMoveItemBetweenInventoryTypes(entity->GetObjectID(), sysAddr, invTypeDst, invTypeSrc, eReponseMoveItemBetweenInventoryTypeCode::FAIL_ITEM_NOT_FOUND);
return;
}
if (item->GetLot() == 6086) { // Thinking hat
SendResponseMoveItemBetweenInventoryTypes(entity->GetObjectID(), sysAddr, invTypeDst, invTypeSrc, eReponseMoveItemBetweenInventoryTypeCode::FAIL_CANT_MOVE_THINKING_HAT);
return;
}
auto* destInv = inventoryComponent->GetInventory(invTypeDst);
if (destInv && destInv->GetEmptySlots() == 0) {
SendResponseMoveItemBetweenInventoryTypes(entity->GetObjectID(), sysAddr, invTypeDst, invTypeSrc, eReponseMoveItemBetweenInventoryTypeCode::FAIL_INV_FULL);
return;
}
// Despawn the pet if we are moving that pet to the vault.
auto* petComponent = PetComponent::GetActivePet(entity->GetObjectID());
@@ -4581,10 +4599,32 @@ void GameMessages::HandleRequestMoveItemBetweenInventoryTypes(RakNet::BitStream&
}
inventoryComponent->MoveItemToInventory(item, invTypeDst, iStackCount, showFlyingLoot, false, false, destSlot);
SendResponseMoveItemBetweenInventoryTypes(entity->GetObjectID(), sysAddr, invTypeDst, invTypeSrc, eReponseMoveItemBetweenInventoryTypeCode::SUCCESS);
}
} else {
SendResponseMoveItemBetweenInventoryTypes(entity->GetObjectID(), sysAddr, invTypeDst, invTypeSrc, eReponseMoveItemBetweenInventoryTypeCode::FAIL_GENERIC);
}
}
void GameMessages::SendResponseMoveItemBetweenInventoryTypes(LWOOBJID objectId, const SystemAddress& sysAddr, eInventoryType inventoryTypeDestination, eInventoryType inventoryTypeSource, eReponseMoveItemBetweenInventoryTypeCode response) {
CBITSTREAM;
CMSGHEADER;
bitStream.Write(objectId);
bitStream.Write(eGameMessageType::RESPONSE_MOVE_ITEM_BETWEEN_INVENTORY_TYPES);
bitStream.Write(inventoryTypeDestination != eInventoryType::ITEMS);
if (inventoryTypeDestination != eInventoryType::ITEMS) bitStream.Write(inventoryTypeDestination);
bitStream.Write(inventoryTypeSource != eInventoryType::ITEMS);
if (inventoryTypeSource != eInventoryType::ITEMS) bitStream.Write(inventoryTypeSource);
bitStream.Write(response != eReponseMoveItemBetweenInventoryTypeCode::FAIL_GENERIC);
if (response != eReponseMoveItemBetweenInventoryTypeCode::FAIL_GENERIC) bitStream.Write(response);
SEND_PACKET;
}
void GameMessages::SendShowActivityCountdown(LWOOBJID objectId, bool bPlayAdditionalSound, bool bPlayCountdownSound, std::u16string sndName, int32_t stateToPlaySoundOn, const SystemAddress& sysAddr) {
CBITSTREAM;
@@ -5351,7 +5391,8 @@ void GameMessages::HandleRemoveItemFromInventory(RakNet::BitStream& inStream, En
iStackCount = std::min<uint32_t>(item->GetCount(), iStackCount);
if (bConfirmed) {
if (eInvType == eInventoryType::MODELS) {
const auto itemType = static_cast<eItemType>(item->GetInfo().itemType);
if (itemType == eItemType::MODEL || itemType == eItemType::LOOT_MODEL) {
item->DisassembleModel(iStackCount);
}
auto lot = item->GetLot();
@@ -6209,3 +6250,18 @@ void GameMessages::SendSlashCommandFeedbackText(Entity* entity, std::u16string t
auto sysAddr = entity->GetSystemAddress();
SEND_PACKET;
}
void GameMessages::SendForceCameraTargetCycle(Entity* entity, bool bForceCycling, eCameraTargetCyclingMode cyclingMode, LWOOBJID optionalTargetID) {
CBITSTREAM;
CMSGHEADER;
bitStream.Write(entity->GetObjectID());
bitStream.Write(eGameMessageType::FORCE_CAMERA_TARGET_CYCLE);
bitStream.Write(bForceCycling);
bitStream.Write(cyclingMode != eCameraTargetCyclingMode::ALLOW_CYCLE_TEAMMATES);
if (cyclingMode != eCameraTargetCyclingMode::ALLOW_CYCLE_TEAMMATES) bitStream.Write(cyclingMode);
bitStream.Write(optionalTargetID);
auto sysAddr = entity->GetSystemAddress();
SEND_PACKET;
}

View File

@@ -39,6 +39,12 @@ enum class eQuickBuildFailReason : uint32_t;
enum class eQuickBuildState : uint32_t;
enum class BehaviorSlot : int32_t;
enum class eVendorTransactionResult : uint32_t;
enum class eReponseMoveItemBetweenInventoryTypeCode : int32_t;
enum class eCameraTargetCyclingMode : int32_t {
ALLOW_CYCLE_TEAMMATES,
DISALLOW_CYCLING
};
namespace GameMessages {
class PropertyDataMessage;
@@ -589,6 +595,7 @@ namespace GameMessages {
//NT:
void HandleRequestMoveItemBetweenInventoryTypes(RakNet::BitStream& inStream, Entity* entity, const SystemAddress& sysAddr);
void SendResponseMoveItemBetweenInventoryTypes(LWOOBJID objectId, const SystemAddress& sysAddr, eInventoryType inventoryTypeDestination, eInventoryType inventoryTypeSource, eReponseMoveItemBetweenInventoryTypeCode response);
void SendShowActivityCountdown(LWOOBJID objectId, bool bPlayAdditionalSound, bool bPlayCountdownSound, std::u16string sndName, int32_t stateToPlaySoundOn, const SystemAddress& sysAddr);
@@ -666,6 +673,7 @@ namespace GameMessages {
void HandleCancelDonationOnPlayer(RakNet::BitStream& inStream, Entity* entity);
void SendSlashCommandFeedbackText(Entity* entity, std::u16string text);
void SendForceCameraTargetCycle(Entity* entity, bool bForceCycling, eCameraTargetCyclingMode cyclingMode, LWOOBJID optionalTargetID);
};
#endif // GAMEMESSAGES_H

View File

@@ -27,6 +27,23 @@
#include "CDComponentsRegistryTable.h"
#include "CDPackageComponentTable.h"
namespace {
const std::map<std::string, std::string> ExtraSettingAbbreviations = {
{ "assemblyPartLOTs", "ma" },
{ "blueprintID", "b" },
{ "userModelID", "ui" },
{ "userModelName", "un" },
{ "userModelDesc", "ud" },
{ "userModelHasBhvr", "ub" },
{ "userModelBehaviors", "ubh" },
{ "userModelBehaviorSourceID", "ubs" },
{ "userModelPhysicsType", "up" },
{ "userModelMod", "um" },
{ "userModelOpt", "uo" },
{ "reforgedLOT", "rl" },
};
}
Item::Item(const LWOOBJID id, const LOT lot, Inventory* inventory, const uint32_t slot, const uint32_t count, const bool bound, const std::vector<LDFBaseData*>& config, const LWOOBJID parent, LWOOBJID subKey, eLootSourceType lootSourceType) {
if (!Inventory::IsValidItem(lot)) {
return;
@@ -122,6 +139,10 @@ uint32_t Item::GetSlot() const {
return slot;
}
std::vector<LDFBaseData*> Item::GetConfig() const {
return config;
}
std::vector<LDFBaseData*>& Item::GetConfig() {
return config;
}
@@ -251,7 +272,7 @@ bool Item::Consume() {
auto skills = skillsTable->Query([this](const CDObjectSkills entry) {
return entry.objectTemplate == static_cast<uint32_t>(lot);
});
});
auto success = false;
@@ -515,3 +536,35 @@ Item::~Item() {
config.clear();
}
void Item::SaveConfigXml(tinyxml2::XMLElement& i) const {
tinyxml2::XMLElement* x = nullptr;
for (const auto* config : this->config) {
const auto& key = GeneralUtils::UTF16ToWTF8(config->GetKey());
const auto saveKey = ExtraSettingAbbreviations.find(key);
if (saveKey == ExtraSettingAbbreviations.end()) {
continue;
}
if (!x) {
x = i.InsertNewChildElement("x");
}
const auto dataToSave = config->GetString(false);
x->SetAttribute(saveKey->second.c_str(), dataToSave.c_str());
}
}
void Item::LoadConfigXml(const tinyxml2::XMLElement& i) {
const auto* x = i.FirstChildElement("x");
if (!x) return;
for (const auto& pair : ExtraSettingAbbreviations) {
const auto* data = x->Attribute(pair.second.c_str());
if (!data) continue;
const auto value = pair.first + "=" + data;
config.push_back(LDFBaseData::DataFromString(value));
}
}

View File

@@ -9,6 +9,10 @@
#include "eInventoryType.h"
#include "eLootSourceType.h"
namespace tinyxml2 {
class XMLElement;
};
/**
* An item that can be stored in an inventory and optionally consumed or equipped
* TODO: ideally this should be a component
@@ -116,6 +120,12 @@ public:
*/
std::vector<LDFBaseData*>& GetConfig();
/**
* Returns current config info for this item, e.g. for rockets
* @return current config info for this item
*/
std::vector<LDFBaseData*> GetConfig() const;
/**
* Returns the database info for this item
* @return the database info for this item
@@ -214,6 +224,10 @@ public:
*/
void RemoveFromInventory();
void SaveConfigXml(tinyxml2::XMLElement& i) const;
void LoadConfigXml(const tinyxml2::XMLElement& i);
private:
/**
* The object ID of this item

View File

@@ -454,6 +454,16 @@ void Mission::YieldRewards() {
}
}
// Even with no repeatable column, reputation is repeatable
if (info.reward_reputation > 0) {
missionComponent->Progress(eMissionTaskType::EARN_REPUTATION, 0, LWOOBJID_EMPTY, "", info.reward_reputation);
auto* const character = entity->GetComponent<CharacterComponent>();
if (character) {
character->SetReputation(character->GetReputation() + info.reward_reputation);
GameMessages::SendUpdateReputation(entity->GetObjectID(), character->GetReputation(), entity->GetSystemAddress());
}
}
if (m_Completions > 0) {
std::vector<std::pair<LOT, uint32_t>> items;
@@ -532,15 +542,6 @@ void Mission::YieldRewards() {
modelInventory->SetSize(modelInventory->GetSize() + info.reward_bankinventory);
}
if (info.reward_reputation > 0) {
missionComponent->Progress(eMissionTaskType::EARN_REPUTATION, 0, 0L, "", info.reward_reputation);
auto character = entity->GetComponent<CharacterComponent>();
if (character) {
character->SetReputation(character->GetReputation() + info.reward_reputation);
GameMessages::SendUpdateReputation(entity->GetObjectID(), character->GetReputation(), entity->GetSystemAddress());
}
}
if (info.reward_maxhealth > 0) {
destroyableComponent->SetMaxHealth(destroyableComponent->GetMaxHealth() + static_cast<float>(info.reward_maxhealth), true);
}

View File

@@ -1,6 +1,8 @@
#include "Action.h"
#include "Amf3.h"
#include "tinyxml2.h"
Action::Action(const AMFArrayValue& arguments) {
for (const auto& [paramName, paramValue] : arguments.GetAssociative()) {
if (paramName == "Type") {
@@ -32,3 +34,46 @@ void Action::SendBehaviorBlocksToClient(AMFArrayValue& args) const {
actionArgs->Insert(m_ValueParameterName, m_ValueParameterDouble);
}
}
void Action::Serialize(tinyxml2::XMLElement& action) const {
action.SetAttribute("Type", m_Type.c_str());
if (m_ValueParameterName.empty()) return;
action.SetAttribute("ValueParameterName", m_ValueParameterName.c_str());
if (m_ValueParameterName == "Message") {
action.SetAttribute("Value", m_ValueParameterString.c_str());
} else {
action.SetAttribute("Value", m_ValueParameterDouble);
}
}
void Action::Deserialize(const tinyxml2::XMLElement& action) {
const char* type = nullptr;
action.QueryAttribute("Type", &type);
if (!type) {
LOG("No type found for an action?");
return;
}
m_Type = type;
const char* valueParameterName = nullptr;
action.QueryAttribute("ValueParameterName", &valueParameterName);
if (valueParameterName) {
m_ValueParameterName = valueParameterName;
if (m_ValueParameterName == "Message") {
const char* value = nullptr;
action.QueryAttribute("Value", &value);
if (value) {
m_ValueParameterString = value;
} else {
LOG("No value found for an action message?");
}
} else {
action.QueryDoubleAttribute("Value", &m_ValueParameterDouble);
}
}
}

View File

@@ -3,6 +3,10 @@
#include <string>
namespace tinyxml2 {
class XMLElement;
};
class AMFArrayValue;
/**
@@ -20,6 +24,8 @@ public:
void SendBehaviorBlocksToClient(AMFArrayValue& args) const;
void Serialize(tinyxml2::XMLElement& action) const;
void Deserialize(const tinyxml2::XMLElement& action);
private:
double m_ValueParameterDouble{ 0.0 };
std::string m_Type{ "" };

View File

@@ -1,6 +1,7 @@
#include "StripUiPosition.h"
#include "Amf3.h"
#include "tinyxml2.h"
StripUiPosition::StripUiPosition(const AMFArrayValue& arguments, const std::string& uiKeyName) {
const auto* const uiArray = arguments.GetArray(uiKeyName);
@@ -21,3 +22,13 @@ void StripUiPosition::SendBehaviorBlocksToClient(AMFArrayValue& args) const {
uiArgs->Insert("x", m_XPosition);
uiArgs->Insert("y", m_YPosition);
}
void StripUiPosition::Serialize(tinyxml2::XMLElement& position) const {
position.SetAttribute("x", m_XPosition);
position.SetAttribute("y", m_YPosition);
}
void StripUiPosition::Deserialize(const tinyxml2::XMLElement& position) {
position.QueryDoubleAttribute("x", &m_XPosition);
position.QueryDoubleAttribute("y", &m_YPosition);
}

View File

@@ -3,6 +3,10 @@
class AMFArrayValue;
namespace tinyxml2 {
class XMLElement;
}
/**
* @brief The position of the first Action in a Strip
*
@@ -15,6 +19,8 @@ public:
[[nodiscard]] double GetX() const noexcept { return m_XPosition; }
[[nodiscard]] double GetY() const noexcept { return m_YPosition; }
void Serialize(tinyxml2::XMLElement& position) const;
void Deserialize(const tinyxml2::XMLElement& position);
private:
double m_XPosition{ 0.0 };
double m_YPosition{ 0.0 };

View File

@@ -3,6 +3,7 @@
#include "Amf3.h"
#include "BehaviorStates.h"
#include "ControlBehaviorMsgs.h"
#include "tinyxml2.h"
PropertyBehavior::PropertyBehavior() {
m_LastEditedState = BehaviorState::HOME_STATE;
@@ -124,3 +125,31 @@ void PropertyBehavior::SendBehaviorBlocksToClient(AMFArrayValue& args) const {
// TODO Serialize the execution state of the behavior
}
void PropertyBehavior::Serialize(tinyxml2::XMLElement& behavior) const {
behavior.SetAttribute("id", m_BehaviorId);
behavior.SetAttribute("name", m_Name.c_str());
behavior.SetAttribute("isLocked", isLocked);
behavior.SetAttribute("isLoot", isLoot);
for (const auto& [stateId, state] : m_States) {
if (state.IsEmpty()) continue;
auto* const stateElement = behavior.InsertNewChildElement("State");
stateElement->SetAttribute("id", static_cast<uint32_t>(stateId));
state.Serialize(*stateElement);
}
}
void PropertyBehavior::Deserialize(const tinyxml2::XMLElement& behavior) {
m_Name = behavior.Attribute("name");
behavior.QueryBoolAttribute("isLocked", &isLocked);
behavior.QueryBoolAttribute("isLoot", &isLoot);
for (const auto* stateElement = behavior.FirstChildElement("State"); stateElement; stateElement = stateElement->NextSiblingElement("State")) {
int32_t stateId = -1;
stateElement->QueryIntAttribute("id", &stateId);
if (stateId < 0 || stateId > 5) continue;
m_States[static_cast<BehaviorState>(stateId)].Deserialize(*stateElement);
}
}

View File

@@ -3,6 +3,10 @@
#include "State.h"
namespace tinyxml2 {
class XMLElement;
}
enum class BehaviorState : uint32_t;
class AMFArrayValue;
@@ -25,6 +29,8 @@ public:
[[nodiscard]] int32_t GetBehaviorId() const noexcept { return m_BehaviorId; }
void SetBehaviorId(int32_t id) noexcept { m_BehaviorId = id; }
void Serialize(tinyxml2::XMLElement& behavior) const;
void Deserialize(const tinyxml2::XMLElement& behavior);
private:
// The states this behavior has.

View File

@@ -2,6 +2,7 @@
#include "Amf3.h"
#include "ControlBehaviorMsgs.h"
#include "tinyxml2.h"
template <>
void State::HandleMsg(AddStripMessage& msg) {
@@ -134,4 +135,20 @@ void State::SendBehaviorBlocksToClient(AMFArrayValue& args) const {
strip.SendBehaviorBlocksToClient(*stripArgs);
}
};
}
void State::Serialize(tinyxml2::XMLElement& state) const {
for (const auto& strip : m_Strips) {
if (strip.IsEmpty()) continue;
auto* const stripElement = state.InsertNewChildElement("Strip");
strip.Serialize(*stripElement);
}
}
void State::Deserialize(const tinyxml2::XMLElement& state) {
for (const auto* stripElement = state.FirstChildElement("Strip"); stripElement; stripElement = stripElement->NextSiblingElement("Strip")) {
auto& strip = m_Strips.emplace_back();
strip.Deserialize(*stripElement);
}
}

View File

@@ -3,6 +3,10 @@
#include "Strip.h"
namespace tinyxml2 {
class XMLElement;
}
class AMFArrayValue;
class State {
@@ -13,6 +17,8 @@ public:
void SendBehaviorBlocksToClient(AMFArrayValue& args) const;
bool IsEmpty() const;
void Serialize(tinyxml2::XMLElement& state) const;
void Deserialize(const tinyxml2::XMLElement& state);
private:
std::vector<Strip> m_Strips;
};

View File

@@ -2,6 +2,7 @@
#include "Amf3.h"
#include "ControlBehaviorMsgs.h"
#include "tinyxml2.h"
template <>
void Strip::HandleMsg(AddStripMessage& msg) {
@@ -83,4 +84,25 @@ void Strip::SendBehaviorBlocksToClient(AMFArrayValue& args) const {
for (const auto& action : m_Actions) {
action.SendBehaviorBlocksToClient(*actions);
}
};
}
void Strip::Serialize(tinyxml2::XMLElement& strip) const {
auto* const positionElement = strip.InsertNewChildElement("Position");
m_Position.Serialize(*positionElement);
for (const auto& action : m_Actions) {
auto* const actionElement = strip.InsertNewChildElement("Action");
action.Serialize(*actionElement);
}
}
void Strip::Deserialize(const tinyxml2::XMLElement& strip) {
const auto* positionElement = strip.FirstChildElement("Position");
if (positionElement) {
m_Position.Deserialize(*positionElement);
}
for (const auto* actionElement = strip.FirstChildElement("Action"); actionElement; actionElement = actionElement->NextSiblingElement("Action")) {
auto& action = m_Actions.emplace_back();
action.Deserialize(*actionElement);
}
}

View File

@@ -6,6 +6,10 @@
#include <vector>
namespace tinyxml2 {
class XMLElement;
}
class AMFArrayValue;
class Strip {
@@ -16,6 +20,8 @@ public:
void SendBehaviorBlocksToClient(AMFArrayValue& args) const;
bool IsEmpty() const noexcept { return m_Actions.empty(); }
void Serialize(tinyxml2::XMLElement& strip) const;
void Deserialize(const tinyxml2::XMLElement& strip);
private:
std::vector<Action> m_Actions;
StripUiPosition m_Position;

View File

@@ -94,35 +94,6 @@ void Mail::SendMail(const LWOOBJID sender, const std::string& senderName, LWOOBJ
SendNotification(sysAddr, 1); //Show the "one new mail" message
}
//Because we need it:
std::string ReadWStringAsString(RakNet::BitStream& bitStream, uint32_t size) {
std::string toReturn = "";
uint8_t buffer;
bool isFinishedReading = false;
for (uint32_t i = 0; i < size; ++i) {
bitStream.Read(buffer);
if (!isFinishedReading) toReturn.push_back(buffer);
if (buffer == '\0') isFinishedReading = true; //so we don't continue to read garbage as part of the string.
bitStream.Read(buffer); //Read the null term
}
return toReturn;
}
void WriteStringAsWString(RakNet::BitStream& bitStream, std::string str, uint32_t size) {
uint32_t sizeToFill = size - str.size();
for (uint32_t i = 0; i < str.size(); ++i) {
bitStream.Write(str[i]);
bitStream.Write(uint8_t(0));
}
for (uint32_t i = 0; i < sizeToFill; ++i) {
bitStream.Write(uint16_t(0));
}
}
void Mail::HandleMailStuff(RakNet::BitStream& packet, const SystemAddress& sysAddr, Entity* entity) {
int mailStuffID = 0;
packet.Read(mailStuffID);
@@ -176,11 +147,20 @@ void Mail::HandleSendMail(RakNet::BitStream& packet, const SystemAddress& sysAdd
return;
}
std::string subject = ReadWStringAsString(packet, 50);
std::string body = ReadWStringAsString(packet, 400);
std::string recipient = ReadWStringAsString(packet, 32);
LUWString subjectRead(50);
packet.Read(subjectRead);
LUWString bodyRead(400);
packet.Read(bodyRead);
LUWString recipientRead(32);
packet.Read(recipientRead);
const std::string subject = subjectRead.GetAsString();
const std::string body = bodyRead.GetAsString();
//Cleanse recipient:
recipient = std::regex_replace(recipient, std::regex("[^0-9a-zA-Z]+"), "");
const std::string recipient = std::regex_replace(recipientRead.GetAsString(), std::regex("[^0-9a-zA-Z]+"), "");
uint64_t unknown64 = 0;
LWOOBJID attachmentID;
@@ -267,40 +247,44 @@ void Mail::HandleDataRequest(RakNet::BitStream& packet, const SystemAddress& sys
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
bitStream.Write(int(MailMessageID::MailData));
bitStream.Write(int(0));
bitStream.Write(int(0)); // throttled
bitStream.Write<uint16_t>(playerMail.size());
bitStream.Write<uint16_t>(playerMail.size()); // size
bitStream.Write<uint16_t>(0);
for (const auto& mail : playerMail) {
bitStream.Write(mail.id); //MailID
WriteStringAsWString(bitStream, mail.subject.c_str(), 50); //subject
WriteStringAsWString(bitStream, mail.body.c_str(), 400); //body
WriteStringAsWString(bitStream, mail.senderUsername.c_str(), 32); //sender
const LUWString subject(mail.subject, 50);
bitStream.Write(subject); //subject
const LUWString body(mail.body, 400);
bitStream.Write(body); //body
const LUWString sender(mail.senderUsername, 32);
bitStream.Write(sender); //sender
bitStream.Write(uint32_t(0)); // packing
bitStream.Write(uint32_t(0));
bitStream.Write(uint64_t(0));
bitStream.Write(uint64_t(0)); // attachedCurrency
bitStream.Write(mail.itemID); //Attachment ID
LOT lot = mail.itemLOT;
if (lot <= 0) bitStream.Write(LOT(-1));
else bitStream.Write(lot);
bitStream.Write(uint32_t(0));
bitStream.Write(uint32_t(0)); // packing
bitStream.Write(mail.itemSubkey); //Attachment subKey
bitStream.Write<uint16_t>(mail.itemCount); //Attachment count
bitStream.Write(mail.itemSubkey); // Attachment subKey
bitStream.Write(uint32_t(0));
bitStream.Write(uint16_t(0));
bitStream.Write<uint16_t>(mail.itemCount); // Attachment count
bitStream.Write(uint8_t(0)); // subject type (used for auction)
bitStream.Write(uint8_t(0)); // packing
bitStream.Write(uint32_t(0)); // packing
bitStream.Write<uint64_t>(mail.timeSent); //time sent (twice?)
bitStream.Write<uint64_t>(mail.timeSent);
bitStream.Write<uint64_t>(mail.timeSent); // expiration date
bitStream.Write<uint64_t>(mail.timeSent);// send date
bitStream.Write<uint8_t>(mail.wasRead); //was read
bitStream.Write(uint8_t(0));
bitStream.Write(uint16_t(0));
bitStream.Write(uint32_t(0));
bitStream.Write(uint8_t(0)); // isLocalized
bitStream.Write(uint16_t(0)); // packing
bitStream.Write(uint32_t(0)); // packing
}
Game::server->Send(bitStream, sysAddr, false);

View File

@@ -8,6 +8,7 @@
#include "SlashCommandHandler.h"
#include <iomanip>
#include <ranges>
#include "DEVGMCommands.h"
#include "GMGreaterThanZeroCommands.h"
@@ -19,7 +20,7 @@
#include "dServer.h"
namespace {
std::vector<Command> CommandInfos;
std::map<std::string, Command> CommandInfos;
std::map<std::string, Command> RegisteredCommands;
}
@@ -30,7 +31,6 @@ void SlashCommandHandler::RegisterCommand(Command command) {
}
for (const auto& alias : command.aliases) {
LOG_DEBUG("Registering command %s", alias.c_str());
auto [_, success] = RegisteredCommands.try_emplace(alias, command);
// Don't allow duplicate commands
if (!success) {
@@ -38,9 +38,8 @@ void SlashCommandHandler::RegisterCommand(Command command) {
continue;
}
}
CommandInfos.push_back(command);
};
CommandInfos[command.aliases[0]] = command;
}
void SlashCommandHandler::HandleChatCommand(const std::u16string& chat, Entity* entity, const SystemAddress& sysAddr) {
auto input = GeneralUtils::UTF16ToWTF8(chat);
@@ -61,11 +60,9 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& chat, Entity*
if (commandHandle.requiredLevel > eGameMasterLevel::CIVILIAN) Database::Get()->InsertSlashCommandUsage(entity->GetObjectID(), input);
commandHandle.handle(entity, sysAddr, args);
} else if (entity->GetGMLevel() != eGameMasterLevel::CIVILIAN) {
// We don't need to tell civilians they aren't high enough level
error = "You are not high enough GM level to use \"" + command + "\"";
}
} else if (entity->GetGMLevel() == eGameMasterLevel::CIVILIAN) {
// We don't need to tell civilians commands don't exist
error = "Command " + command + " does not exist!";
}
@@ -74,41 +71,76 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& chat, Entity*
}
}
// This commands in here so we can access the CommandInfos to display info
void GMZeroCommands::Help(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
std::ostringstream feedback;
if (args.empty()) {
feedback << "----- Commands -----";
for (const auto& command : CommandInfos) {
// TODO: Limit displaying commands based on GM level they require
if (command.requiredLevel > entity->GetGMLevel()) continue;
LOG("Help command: %s", command.aliases[0].c_str());
feedback << "\n/" << command.aliases[0] << ": " << command.help;
constexpr size_t pageSize = 10;
std::string trimmedArgs = args;
trimmedArgs.erase(trimmedArgs.begin(), std::find_if_not(trimmedArgs.begin(), trimmedArgs.end(), [](unsigned char ch) {
return std::isspace(ch);
}));
trimmedArgs.erase(std::find_if_not(trimmedArgs.rbegin(), trimmedArgs.rend(), [](unsigned char ch) {
return std::isspace(ch);
}).base(), trimmedArgs.end());
std::optional<uint32_t> parsedPage = GeneralUtils::TryParse<uint32_t>(trimmedArgs);
if (trimmedArgs.empty() || parsedPage.has_value()) {
size_t page = parsedPage.value_or(1);
std::map<std::string, Command> accessibleCommands;
for (const auto& [commandName, command] : CommandInfos) {
if (command.requiredLevel <= entity->GetGMLevel()) {
accessibleCommands.emplace(commandName, command);
}
}
} else {
bool foundCommand = false;
for (const auto& command : CommandInfos) {
if (std::ranges::find(command.aliases, args) == command.aliases.end()) continue;
if (entity->GetGMLevel() < command.requiredLevel) break;
foundCommand = true;
feedback << "----- " << command.aliases.at(0) << " -----\n";
// info can be a localizable string
feedback << command.info;
if (command.aliases.size() == 1) break;
size_t totalPages = (accessibleCommands.size() + pageSize - 1) / pageSize;
feedback << "\nAliases: ";
for (size_t i = 0; i < command.aliases.size(); i++) {
if (page < 1 || page > totalPages) {
feedback << "Invalid page number. Total pages: " << totalPages;
GameMessages::SendSlashCommandFeedbackText(entity, GeneralUtils::ASCIIToUTF16(feedback.str()));
return;
}
auto it = accessibleCommands.begin();
std::advance(it, (page - 1) * pageSize);
size_t endIdx = std::min(page * pageSize, accessibleCommands.size());
feedback << "----- Commands (Page " << page << " of " << totalPages << ") -----";
for (size_t i = (page - 1) * pageSize; i < endIdx; ++i, ++it) {
feedback << "\n/" << it->first << ": " << it->second.help;
}
const auto feedbackStr = feedback.str();
if (!feedbackStr.empty()) {
GameMessages::SendSlashCommandFeedbackText(entity, GeneralUtils::ASCIIToUTF16(feedbackStr));
}
return;
}
auto it = std::ranges::find_if(CommandInfos, [&trimmedArgs](const auto& pair) {
return std::ranges::find(pair.second.aliases, trimmedArgs) != pair.second.aliases.end();
});
if (it != CommandInfos.end() && entity->GetGMLevel() >= it->second.requiredLevel) {
const auto& command = it->second;
feedback << "----- " << it->first << " Info -----\n";
feedback << command.info << "\n";
if (command.aliases.size() > 1) {
feedback << "Aliases: ";
for (size_t i = 0; i < command.aliases.size(); ++i) {
if (i > 0) feedback << ", ";
feedback << command.aliases[i];
}
}
// Let GameMasters know if the command doesn't exist
if (!foundCommand && entity->GetGMLevel() > eGameMasterLevel::CIVILIAN) feedback << "Command " << std::quoted(args) << " does not exist!";
} else {
feedback << "Command not found.";
}
const auto feedbackStr = feedback.str();
if (!feedbackStr.empty()) GameMessages::SendSlashCommandFeedbackText(entity, GeneralUtils::ASCIIToUTF16(feedbackStr));
if (!feedbackStr.empty()) {
GameMessages::SendSlashCommandFeedbackText(entity, GeneralUtils::ASCIIToUTF16(feedbackStr));
}
}
void SlashCommandHandler::SendAnnouncement(const std::string& title, const std::string& message) {
@@ -896,11 +928,20 @@ void SlashCommandHandler::Startup() {
};
RegisterCommand(FindPlayerCommand);
Command SpectateCommand{
.help = "Spectate a player",
.info = "Specify a player name to spectate. They must be in the same world as you. Leave blank to stop spectating",
.aliases = { "spectate", "follow" },
.handle = GMGreaterThanZeroCommands::Spectate,
.requiredLevel = eGameMasterLevel::JUNIOR_MODERATOR
};
RegisterCommand(SpectateCommand);
// Register GM Zero Commands
Command HelpCommand{
.help = "Display command info",
.info = "If a command is given, display detailed info on that command. Otherwise display a list of commands with short desctiptions.",
.info = "If a command is given, display detailed info on that command. Otherwise display a list of commands with short descriptions.",
.aliases = { "help", "h"},
.handle = GMZeroCommands::Help,
.requiredLevel = eGameMasterLevel::CIVILIAN
@@ -1015,4 +1056,383 @@ void SlashCommandHandler::Startup() {
};
RegisterCommand(InstanceInfoCommand);
//Commands that are handled by the client
Command faqCommand{
.help = "Show the LU FAQ Page",
.info = "Show the LU FAQ Page",
.aliases = {"faq","faqs"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(faqCommand);
Command teamChatCommand{
.help = "Send a message to your teammates.",
.info = "Send a message to your teammates.",
.aliases = {"team","t"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(teamChatCommand);
Command showStoreCommand{
.help = "Show the LEGO shop page.",
.info = "Show the LEGO shop page.",
.aliases = {"shop","store"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(showStoreCommand);
Command minigamesCommand{
.help = "Show the LEGO minigames page!",
.info = "Show the LEGO minigames page!",
.aliases = {"minigames"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(minigamesCommand);
Command forumsCommand{
.help = "Show the LU Forums!",
.info = "Show the LU Forums!",
.aliases = {"forums"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(forumsCommand);
Command exitGameCommand{
.help = "Exit to desktop",
.info = "Exit to desktop",
.aliases = {"exit","quit"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(exitGameCommand);
Command thumbsUpCommand{
.help = "Oh, yeah!",
.info = "Oh, yeah!",
.aliases = {"thumb","thumbs","thumbsup"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(thumbsUpCommand);
Command victoryCommand{
.help = "Victory!",
.info = "Victory!",
.aliases = {"victory!"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(victoryCommand);
Command backflipCommand{
.help = "Do a flip!",
.info = "Do a flip!",
.aliases = {"backflip"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(backflipCommand);
Command clapCommand{
.help = "A round of applause!",
.info = "A round of applause!",
.aliases = {"clap"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(clapCommand);
Command logoutCharacterCommand{
.help = "Returns you to the character select screen.",
.info = "Returns you to the character select screen.",
.aliases = {"camp","logoutcharacter"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(logoutCharacterCommand);
Command sayCommand{
.help = "Say something outloud so that everyone can hear you",
.info = "Say something outloud so that everyone can hear you",
.aliases = {"s","say"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(sayCommand);
Command whisperCommand{
.help = "Send a private message to another player.",
.info = "Send a private message to another player.",
.aliases = {"tell","w","whisper"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(whisperCommand);
Command locationCommand{
.help = "Output your current location on the map to the chat box.",
.info = "Output your current location on the map to the chat box.",
.aliases = {"loc","locate","location"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(locationCommand);
Command logoutCommand{
.help = "Returns you to the login screen.",
.info = "Returns you to the login screen.",
.aliases = {"logout","logoutaccount"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(logoutCommand);
Command shrugCommand{
.help = "I dunno...",
.info = "I dunno...",
.aliases = {"shrug"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(shrugCommand);
Command leaveTeamCommand{
.help = "Leave your current team.",
.info = "Leave your current team.",
.aliases = {"leave","leaveteam","teamleave","tleave"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(leaveTeamCommand);
Command teamLootTypeCommand{
.help = "[rr|ffa] Set the loot for your current team (round-robin/free for all).",
.info = "[rr|ffa] Set the loot for your current team (round-robin/free for all).",
.aliases = {"setloot","teamsetloot","tloot","tsetloot"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(teamLootTypeCommand);
Command removeFriendCommand{
.help = "[name] Removes a player from your friends list.",
.info = "[name] Removes a player from your friends list.",
.aliases = {"removefriend"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(removeFriendCommand);
Command yesCommand{
.help = "Aye aye, captain!",
.info = "Aye aye, captain!",
.aliases = {"yes"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(yesCommand);
Command teamInviteCommand{
.help = "[name] Invite a player to your team.",
.info = "[name] Invite a player to your team.",
.aliases = {"invite","inviteteam","teaminvite","tinvite"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(teamInviteCommand);
Command danceCommand{
.help = "Dance 'til you can't dance no more.",
.info = "Dance 'til you can't dance no more.",
.aliases = {"dance"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(danceCommand);
Command sighCommand{
.help = "Another day, another brick.",
.info = "Another day, another brick.",
.aliases = {"sigh"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(sighCommand);
Command recommendedOptionsCommand{
.help = "Sets the recommended performance options in the cfg file",
.info = "Sets the recommended performance options in the cfg file",
.aliases = {"recommendedperfoptions"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(recommendedOptionsCommand);
Command setTeamLeaderCommand{
.help = "[name] Set the leader for your current team.",
.info = "[name] Set the leader for your current team.",
.aliases = {"leader","setleader","teamsetleader","tleader","tsetleader"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(setTeamLeaderCommand);
Command cringeCommand{
.help = "I don't even want to talk about it...",
.info = "I don't even want to talk about it...",
.aliases = {"cringe"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(cringeCommand);
Command talkCommand{
.help = "Jibber Jabber",
.info = "Jibber Jabber",
.aliases = {"talk"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(talkCommand);
Command cancelQueueCommand{
.help = "Cancel Your position in the queue if you are in one.",
.info = "Cancel Your position in the queue if you are in one.",
.aliases = {"cancelqueue"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(cancelQueueCommand);
Command lowPerformanceCommand{
.help = "Sets the default low-spec performance options in the cfg file",
.info = "Sets the default low-spec performance options in the cfg file",
.aliases = {"perfoptionslow"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(lowPerformanceCommand);
Command kickFromTeamCommand{
.help = "[name] Kick a player from your current team.",
.info = "[name] Kick a player from your current team.",
.aliases = {"kick","kickplayer","teamkickplayer","tkick","tkickplayer"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(kickFromTeamCommand);
Command thanksCommand{
.help = "Express your gratitude for another.",
.info = "Express your gratitude for another.",
.aliases = {"thanks"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(thanksCommand);
Command waveCommand{
.help = "Wave to other players.",
.info = "Wave to other players.",
.aliases = {"wave"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(waveCommand);
Command whyCommand{
.help = "Why|!?!!",
.info = "Why|!?!!",
.aliases = {"why"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(whyCommand);
Command midPerformanceCommand{
.help = "Sets the default medium-spec performance options in the cfg file",
.info = "Sets the default medium-spec performance options in the cfg file",
.aliases = {"perfoptionsmid"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(midPerformanceCommand);
Command highPerformanceCommand{
.help = "Sets the default high-spec performance options in the cfg file",
.info = "Sets the default high-spec performance options in the cfg file",
.aliases = {"perfoptionshigh"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(highPerformanceCommand);
Command gaspCommand{
.help = "Oh my goodness!",
.info = "Oh my goodness!",
.aliases = {"gasp"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(gaspCommand);
Command ignoreCommand{
.help = "[name] Add a player to your ignore list.",
.info = "[name] Add a player to your ignore list.",
.aliases = {"addignore"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(ignoreCommand);
Command addFriendCommand{
.help = "[name] Add a player to your friends list.",
.info = "[name] Add a player to your friends list.",
.aliases = {"addfriend"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(addFriendCommand);
Command cryCommand{
.help = "Show everyone your 'Aw' face.",
.info = "Show everyone your 'Aw' face.",
.aliases = {"cry"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(cryCommand);
Command giggleCommand{
.help = "A good little chuckle",
.info = "A good little chuckle",
.aliases = {"giggle"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(giggleCommand);
Command saluteCommand{
.help = "For those about to build...",
.info = "For those about to build...",
.aliases = {"salute"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(saluteCommand);
Command removeIgnoreCommand{
.help = "[name] Removes a player from your ignore list.",
.info = "[name] Removes a player from your ignore list.",
.aliases = {"removeIgnore"},
.handle = GMZeroCommands::ClientHandled,
.requiredLevel = eGameMasterLevel::CIVILIAN
};
RegisterCommand(removeIgnoreCommand);
}

View File

@@ -1,3 +1,6 @@
#ifndef DEVGMCOMMANDS_H
#define DEVGMCOMMANDS_H
namespace DEVGMCommands {
void SetGMLevel(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void ToggleNameplate(Entity* entity, const SystemAddress& sysAddr, const std::string args);
@@ -71,3 +74,5 @@ namespace DEVGMCommands {
void CastSkill(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void DeleteInven(Entity* entity, const SystemAddress& sysAddr, const std::string args);
}
#endif //!DEVGMCOMMANDS_H

View File

@@ -322,4 +322,19 @@ namespace GMGreaterThanZeroCommands {
request.Serialize(bitStream);
Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE, 0, Game::chatSysAddr, false);
}
void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
if (args.empty()) {
GameMessages::SendForceCameraTargetCycle(entity, false, eCameraTargetCyclingMode::DISALLOW_CYCLING, entity->GetObjectID());
return;
}
auto player = PlayerManager::GetPlayer(args);
if (!player) {
GameMessages::SendSlashCommandFeedbackText(entity, u"Player not found");
return;
}
GameMessages::SendSlashCommandFeedbackText(entity, u"Spectating Player");
GameMessages::SendForceCameraTargetCycle(entity, false, eCameraTargetCyclingMode::DISALLOW_CYCLING, player->GetObjectID());
}
}

View File

@@ -1,3 +1,6 @@
#ifndef GMGREATERTHANZEROCOMMANDS_H
#define GMGREATERTHANZEROCOMMANDS_H
namespace GMGreaterThanZeroCommands {
void Kick(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void MailItem(Entity* entity, const SystemAddress& sysAddr, const std::string args);
@@ -12,4 +15,7 @@ namespace GMGreaterThanZeroCommands {
void Title(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void ShowAll(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void FindPlayer(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void Spectate(Entity* entity, const SystemAddress& sysAddr, const std::string args);
}
#endif //!GMGREATERTHANZEROCOMMANDS_H

View File

@@ -224,5 +224,9 @@ namespace GMZeroCommands {
ChatPackets::SendSystemMessage(sysAddr, u"Map: " + (GeneralUtils::to_u16string(zoneId.GetMapID())) + u"\nClone: " + (GeneralUtils::to_u16string(zoneId.GetCloneID())) + u"\nInstance: " + (GeneralUtils::to_u16string(zoneId.GetInstanceID())));
}
//For client side commands
void ClientHandled(Entity* entity, const SystemAddress& sysAddr, const std::string args) {}
};

View File

@@ -1,3 +1,6 @@
#ifndef GMZEROCOMMANDS_H
#define GMZEROCOMMANDS_H
namespace GMZeroCommands {
void Help(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void Credits(Entity* entity, const SystemAddress& sysAddr, const std::string args);
@@ -12,4 +15,7 @@ namespace GMZeroCommands {
void LeaveZone(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void Resurrect(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void InstanceInfo(Entity* entity, const SystemAddress& sysAddr, const std::string args);
void ClientHandled(Entity* entity, const SystemAddress& sysAddr, const std::string args);
}
#endif //!GMZEROCOMMANDS_H

View File

@@ -285,7 +285,6 @@ void ParseXml(const std::string& file) {
}
if (zoneID.value() != currentZoneID) {
LOG_DEBUG("Skipping (%s) %i location because it is in %i and not the current zone (%i)", name, lot, zoneID.value(), currentZoneID);
continue;
}

View File

@@ -40,6 +40,7 @@
#include "BitStreamUtils.h"
#include "Start.h"
#include "Server.h"
#include "CDZoneTableTable.h"
namespace Game {
Logger* logger = nullptr;
@@ -277,6 +278,17 @@ int main(int argc, char** argv) {
PersistentIDManager::Initialize();
Game::im = new InstanceManager(Game::logger, Game::server->GetIP());
//Get CDClient initial information
try {
CDClientManager::LoadValuesFromDatabase();
} catch (CppSQLite3Exception& e) {
LOG("Failed to initialize CDServer SQLite Database");
LOG("May be caused by corrupted file: %s", (Game::assetManager->GetResPath() / "CDServer.sqlite").string().c_str());
LOG("Error: %s", e.errorMessage());
LOG("Error Code: %i", e.errorCode());
return EXIT_FAILURE;
}
//Depending on the config, start up servers:
if (Game::config->GetValue("prestart_servers") != "0") {
StartChatServer();
@@ -382,6 +394,7 @@ int main(int argc, char** argv) {
}
void HandlePacket(Packet* packet) {
if (packet->length < 1) return;
if (packet->data[0] == ID_DISCONNECTION_NOTIFICATION) {
LOG("A server has disconnected");

View File

@@ -112,6 +112,31 @@ void dNavMesh::LoadNavmesh() {
m_NavMesh = mesh;
}
NiPoint3 dNavMesh::NearestPoint(const NiPoint3& location, const float halfExtent) const {
NiPoint3 toReturn = location;
if (m_NavMesh != nullptr) {
float pos[3];
pos[0] = location.x;
pos[1] = location.y;
pos[2] = location.z;
dtPolyRef nearestRef = 0;
float polyPickExt[3] = { halfExtent, halfExtent, halfExtent };
float nearestPoint[3] = { 0.0f, 0.0f, 0.0f };
dtQueryFilter filter{};
auto hasPoly = m_NavQuery->findNearestPoly(pos, polyPickExt, &filter, &nearestRef, nearestPoint);
if (hasPoly != DT_SUCCESS) {
toReturn = location;
} else {
toReturn.x = nearestPoint[0];
toReturn.y = nearestPoint[1];
toReturn.z = nearestPoint[2];
}
}
return toReturn;
}
float dNavMesh::GetHeightAtPoint(const NiPoint3& location, const float halfExtentsHeight) const {
if (m_NavMesh == nullptr) {
return location.y;

View File

@@ -21,7 +21,7 @@ public:
/**
* Get the height at a point
*
*
* @param location The location to check for height at. This is the center of the search area.
* @param halfExtentsHeight The half extents height of the search area. This is the distance from the center to the top and bottom of the search area.
* The larger the value of halfExtentsHeight is, the larger the performance cost of the query.
@@ -29,7 +29,7 @@ public:
*/
float GetHeightAtPoint(const NiPoint3& location, const float halfExtentsHeight = 32.0f) const;
std::vector<NiPoint3> GetPath(const NiPoint3& startPos, const NiPoint3& endPos, float speed = 10.0f);
NiPoint3 NearestPoint(const NiPoint3& location, const float halfExtent = 32.0f) const;
bool IsNavmeshLoaded() { return m_NavMesh != nullptr; }
private:

View File

@@ -5,6 +5,7 @@
#include "MessageIdentifiers.h"
#include "BitStream.h"
#include <string>
#include <algorithm>
enum class eConnectionType : uint16_t;

View File

@@ -15,6 +15,7 @@
#include "SkillComponent.h"
#include "eReplicaComponentType.h"
#include "RenderComponent.h"
#include "PlayerManager.h"
#include <vector>
@@ -53,11 +54,13 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) {
void BossSpiderQueenEnemyServer::OnDie(Entity* self, Entity* killer) {
if (Game::zoneManager->GetZoneID().GetMapID() == instanceZoneID && killer) {
auto* missionComponent = killer->GetComponent<MissionComponent>();
if (missionComponent == nullptr)
return;
for (const auto& player : PlayerManager::GetAllPlayers()) {
auto* missionComponent = player->GetComponent<MissionComponent>();
if (missionComponent == nullptr)
return;
missionComponent->CompleteMission(instanceMissionID);
missionComponent->CompleteMission(instanceMissionID);
}
}
// There is suppose to be a 0.1 second delay here but that may be admitted?

View File

@@ -56,10 +56,6 @@ void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
auto member = Game::entityManager->GetEntity(memberID);
if (member != nullptr && !member->GetIsDead()) {
GameMessages::SendDropClientLoot(member, self->GetObjectID(), powerupToDrop, 0, self->GetPosition());
} else {
// If player left the team or left early erase them from the team variable.
team.erase(std::find(team.begin(), team.end(), memberID));
self->SetVar<std::vector<LWOOBJID>>(u"BuilderTeam", team);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,81 @@
#include "AgShipShake.h"
#include "EntityInfo.h"
#include "GeneralUtils.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "RenderComponent.h"
#include "Entity.h"
void AgShipShake::OnStartup(Entity* self) {
EntityInfo info{};
info.pos = { -418, 585, -30 };
info.lot = 33;
info.spawnerID = self->GetObjectID();
auto* ref = Game::entityManager->CreateEntity(info);
Game::entityManager->ConstructEntity(ref);
self->SetVar(u"ShakeObject", ref->GetObjectID());
self->AddTimer("ShipShakeIdle", 2.0f);
self->SetVar(u"RandomTime", 10);
}
void AgShipShake::OnTimerDone(Entity* self, std::string timerName) {
auto* shipFxObject = GetEntityInGroup(ShipFX);
auto* shipFxObject2 = GetEntityInGroup(ShipFX2);
auto* debrisObject = GetEntityInGroup(DebrisFX);
if (timerName == "ShipShakeIdle") {
auto* ref = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(u"ShakeObject"));
const auto randomTime = self->GetVar<int>(u"RandomTime");
auto time = GeneralUtils::GenerateRandomNumber<int>(0, randomTime + 1);
if (time < randomTime / 2) {
time += randomTime / 2;
}
self->AddTimer("ShipShakeIdle", static_cast<float>(time));
if (ref)
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(ref, FXName, ref->GetObjectID(), 500.0f);
if (debrisObject)
GameMessages::SendPlayFXEffect(debrisObject, -1, u"DebrisFall", "Debris", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
const auto randomFx = GeneralUtils::GenerateRandomNumber<int>(0, 3);
if (shipFxObject) {
std::string effectType = "shipboom" + std::to_string(randomFx);
GameMessages::SendPlayFXEffect(shipFxObject, 559, GeneralUtils::ASCIIToUTF16(effectType), "FX", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
}
self->AddTimer("ShipShakeExplode", 5.0f);
if (shipFxObject2)
RenderComponent::PlayAnimation(shipFxObject2, u"explosion");
} else if (timerName == "ShipShakeExplode") {
if (shipFxObject)
RenderComponent::PlayAnimation(shipFxObject, u"idle");
if (shipFxObject2)
RenderComponent::PlayAnimation(shipFxObject2, u"idle");
}
}
Entity* AgShipShake::GetEntityInGroup(const std::string& group) {
auto entities = Game::entityManager->GetEntitiesInGroup(group);
Entity* en = nullptr;
for (auto entity : entities) {
if (entity) {
en = entity;
break;
}
}
return en;
}

View File

@@ -0,0 +1,16 @@
#pragma once
#include "CppScripts.h"
class AgShipShake : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void OnTimerDone(Entity* self, std::string timerName) override;
std::string DebrisFX = "DebrisFX";
std::string ShipFX = "ShipFX";
std::string ShipFX2 = "ShipFX2";
std::u16string FXName = u"camshake-bridge";
private:
Entity* GetEntityInGroup(const std::string& group);
};

View File

@@ -8,21 +8,6 @@
void AgSpaceStuff::OnStartup(Entity* self) {
self->AddTimer("FloaterScale", 5.0f);
EntityInfo info{};
info.pos = { -418, 585, -30 };
info.lot = 33;
info.spawnerID = self->GetObjectID();
auto* ref = Game::entityManager->CreateEntity(info);
Game::entityManager->ConstructEntity(ref);
self->SetVar(u"ShakeObject", ref->GetObjectID());
self->AddTimer("ShipShakeIdle", 2.0f);
self->SetVar(u"RandomTime", 10);
}
void AgSpaceStuff::OnTimerDone(Entity* self, std::string timerName) {
@@ -37,70 +22,5 @@ void AgSpaceStuff::OnTimerDone(Entity* self, std::string timerName) {
RenderComponent::PlayAnimation(self, u"path_0" + (GeneralUtils::to_u16string(pathType)));
self->AddTimer("FloaterScale", randTime);
} else if (timerName == "ShipShakeExplode") {
DoShake(self, true);
} else if (timerName == "ShipShakeIdle") {
DoShake(self, false);
}
}
void AgSpaceStuff::DoShake(Entity* self, bool explodeIdle) {
if (!explodeIdle) {
auto* ref = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(u"ShakeObject"));
const auto randomTime = self->GetVar<int>(u"RandomTime");
auto time = GeneralUtils::GenerateRandomNumber<int>(0, randomTime + 1);
if (time < randomTime / 2) {
time += randomTime / 2;
}
self->AddTimer("ShipShakeIdle", static_cast<float>(time));
if (ref)
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(ref, FXName, ref->GetObjectID(), 500.0f);
auto* debrisObject = GetEntityInGroup(DebrisFX);
if (debrisObject)
GameMessages::SendPlayFXEffect(debrisObject, -1, u"DebrisFall", "Debris", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
const auto randomFx = GeneralUtils::GenerateRandomNumber<int>(0, 3);
auto* shipFxObject = GetEntityInGroup(ShipFX);
if (shipFxObject) {
std::string effectType = "shipboom" + std::to_string(randomFx);
GameMessages::SendPlayFXEffect(shipFxObject, 559, GeneralUtils::ASCIIToUTF16(effectType), "FX", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
}
self->AddTimer("ShipShakeExplode", 5.0f);
auto* shipFxObject2 = GetEntityInGroup(ShipFX2);
if (shipFxObject2)
RenderComponent::PlayAnimation(shipFxObject2, u"explosion");
} else {
auto* shipFxObject = GetEntityInGroup(ShipFX);
auto* shipFxObject2 = GetEntityInGroup(ShipFX2);
if (shipFxObject)
RenderComponent::PlayAnimation(shipFxObject, u"idle");
if (shipFxObject2)
RenderComponent::PlayAnimation(shipFxObject2, u"idle");
}
}
Entity* AgSpaceStuff::GetEntityInGroup(const std::string& group) {
auto entities = Game::entityManager->GetEntitiesInGroup(group);
Entity* en = nullptr;
for (auto entity : entities) {
if (entity) {
en = entity;
break;
}
}
return en;
}

View File

@@ -5,14 +5,5 @@ class AgSpaceStuff : public CppScripts::Script {
public:
void OnStartup(Entity* self);
void OnTimerDone(Entity* self, std::string timerName);
void DoShake(Entity* self, bool explodeIdle);
std::string DebrisFX = "DebrisFX";
std::string ShipFX = "ShipFX";
std::string ShipFX2 = "ShipFX2";
std::u16string FXName = u"camshake-bridge";
private:
Entity* GetEntityInGroup(const std::string& group);
};

View File

@@ -1,6 +1,7 @@
set(DSCRIPTS_SOURCES_AI_AG
"AgShipPlayerDeathTrigger.cpp"
"AgSpaceStuff.cpp"
"AgShipShake.cpp"
"AgShipPlayerShockServer.cpp"
"AgImagSmashable.cpp"
"ActSharkPlayerDeathTrigger.cpp"

View File

@@ -529,6 +529,7 @@ int main(int argc, char** argv) {
}
void HandlePacketChat(Packet* packet) {
if (packet->length < 1) return;
if (packet->data[0] == ID_DISCONNECTION_NOTIFICATION || packet->data[0] == ID_CONNECTION_LOST) {
LOG("Lost our connection to chat, zone(%i), instance(%i)", Game::server->GetZoneID(), Game::server->GetInstanceID());
@@ -542,7 +543,7 @@ void HandlePacketChat(Packet* packet) {
chatConnected = true;
}
if (packet->data[0] == ID_USER_PACKET_ENUM) {
if (packet->data[0] == ID_USER_PACKET_ENUM && packet->length >= 4) {
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::CHAT) {
switch (static_cast<eChatMessageType>(packet->data[3])) {
case eChatMessageType::WORLD_ROUTE_PACKET: {
@@ -557,8 +558,9 @@ void HandlePacketChat(Packet* packet) {
//Write our stream outwards:
CBITSTREAM;
for (BitSize_t i = 0; i < inStream.GetNumberOfBytesUsed(); i++) {
bitStream.Write(packet->data[i + 16]); //16 bytes == header + playerID to skip
unsigned char data;
while (inStream.Read(data)) {
bitStream.Write(data);
}
SEND_PACKET; //send routed packet to player
@@ -659,7 +661,7 @@ void HandlePacketChat(Packet* packet) {
}
void HandleMasterPacket(Packet* packet) {
if (packet->length < 2) return;
if (static_cast<eConnectionType>(packet->data[1]) != eConnectionType::MASTER || packet->length < 4) return;
switch (static_cast<eMasterMessageType>(packet->data[3])) {
case eMasterMessageType::REQUEST_PERSISTENT_ID_RESPONSE: {
@@ -785,6 +787,7 @@ void HandleMasterPacket(Packet* packet) {
}
void HandlePacket(Packet* packet) {
if (packet->length < 1) return;
if (packet->data[0] == ID_DISCONNECTION_NOTIFICATION || packet->data[0] == ID_CONNECTION_LOST) {
auto user = UserManager::Instance()->GetUser(packet->systemAddress);
if (!user) return;
@@ -1207,8 +1210,8 @@ void HandlePacket(Packet* packet) {
//Now write the rest of the data:
auto data = inStream.GetData();
for (uint32_t i = 0; i < size; ++i) {
bitStream.Write(data[i + 23]);
for (uint32_t i = 23; i - 23 < size && i < packet->length; ++i) {
bitStream.Write(data[i]);
}
Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE_ORDERED, 0, Game::chatSysAddr, false);

View File

@@ -0,0 +1,3 @@
ALTER TABLE behaviors ADD COLUMN character_id BIGINT NOT NULL DEFAULT 0;
ALTER TABLE behaviors ADD COLUMN behavior_id BIGINT NOT NULL PRIMARY KEY;
ALTER TABLE behaviors DROP COLUMN id;

View File

@@ -8,33 +8,18 @@ list(APPEND DGAMETEST_SOURCES ${DCOMPONENTS_TESTS})
add_subdirectory(dGameMessagesTests)
list(APPEND DGAMETEST_SOURCES ${DGAMEMESSAGES_TESTS})
add_subdirectory(dScriptsTests)
list(APPEND DGAMETEST_SOURCES ${DSCRIPTS_TESTS})
include_directories(${CMAKE_SOURCE_DIR}/dScripts)
file(COPY ${GAMEMESSAGE_TESTBITSTREAMS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
# Add the executable. Remember to add all tests above this!
add_executable(dGameTests ${DGAMETEST_SOURCES})
add_dependencies(dGameTests conncpp_tests)
target_include_directories(dGameTests PRIVATE
$<TARGET_PROPERTY:dScriptsBase,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:dScriptsServer,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:dScriptsAI,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:dScriptsClient,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:dScriptsEquipmentScripts,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:dScriptsEquipmentTriggers,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:dScriptsZone,INTERFACE_INCLUDE_DIRECTORIES>
)
# Apple needs some special linkage for the mariadb connector for tests.
if(APPLE)
add_custom_command(TARGET dGameTests POST_BUILD
COMMAND install_name_tool ARGS -change libmariadbcpp.dylib @rpath/libmariadbcpp.dylib dGameTests
COMMAND otool ARGS -L dGameTests
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_custom_command(TARGET dGameTests POST_BUILD
COMMAND install_name_tool ARGS -change libmariadbcpp.dylib @rpath/libmariadbcpp.dylib dGameTests
COMMAND otool ARGS -L dGameTests
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
target_link_libraries(dGameTests ${COMMON_LIBRARIES} GTest::gtest_main

View File

@@ -1,11 +0,0 @@
set(DSCRIPTS_TESTS
"dScriptsTests.cpp"
"CppScriptsOld.cpp"
)
# Get the folder name and prepend it to the files above
get_filename_component(thisFolderName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
list(TRANSFORM DSCRIPTS_TESTS PREPEND "${thisFolderName}/")
# Export to parent scope
set(DSCRIPTS_TESTS ${DSCRIPTS_TESTS} PARENT_SCOPE)

View File

@@ -1,991 +0,0 @@
#include "CppScriptsOld.h"
//I can feel my soul being torn apart with every script added to this monstrosity.
// skate fast eat trash
// do you think god stays in heaven because he too lives in fear of what he's created?
#include "GameMessages.h"
#include "Entity.h"
#include "ScriptComponent.h"
#include "Game.h"
#include "Logger.h"
#include "InvalidScript.h"
//VE / AG scripts:
#include "AgShipPlayerDeathTrigger.h"
#include "AgShipPlayerShockServer.h"
#include "AgSpaceStuff.h"
#include "AgImagSmashable.h"
#include "NpcNpSpacemanBob.h"
#include "StoryBoxInteractServer.h"
#include "Binoculars.h"
#include "AllCrateChicken.h"
#include "SsModularBuildServer.h"
#include "ZoneAgProperty.h"
#include "TouchMissionUpdateServer.h"
#include "ActSharkPlayerDeathTrigger.h"
#include "BaseEnemyMech.h"
#include "ZoneAgSurvival.h"
#include "AgBusDoor.h"
#include "MaestromExtracticatorServer.h"
#include "NpcWispServer.h"
#include "AgCagedBricksServer.h"
#include "NpcEpsilonServer.h"
#include "AgTurret.h"
#include "AgMonumentBirds.h"
#include "AgLaserSensorServer.h"
#include "AgMonumentLaserServer.h"
#include "AgFans.h"
#include "RemoveRentalGear.h"
#include "NpcNjAssistantServer.h"
#include "EnemySpiderSpawner.h"
#include "AgQbElevator.h"
#include "AgPropGuard.h"
#include "AgBugsprayer.h"
#include "WishingWellServer.h"
#include "NpcAgCourseStarter.h"
#include "AgMonumentRaceGoal.h"
#include "ZoneAgSpiderQueen.h"
#include "SpiderBossTreasureChestServer.h"
#include "NpcCowboyServer.h"
#include "ZoneAgMedProperty.h"
#include "AgStromlingProperty.h"
#include "AgDarkSpiderling.h"
#include "PropertyFXDamage.h"
#include "AgPropguards.h"
#include "NpcPirateServer.h"
#include "AgPicnicBlanket.h"
#include "AgMonumentRaceCancel.h"
#include "VeBricksampleServer.h"
#include "PropertyBankInteract.h"
#include "VeMech.h"
#include "VeMissionConsole.h"
#include "VeEpsilonServer.h"
#include "AgSurvivalBuffStation.h"
#include "QbSpawner.h"
#include "AgQbWall.h"
// NS Scripts
#include "NsModularBuild.h"
#include "NsGetFactionMissionServer.h"
#include "NsQbImaginationStatue.h"
#include "NsConcertChoiceBuildManager.h"
#include "NsConcertChoiceBuild.h"
#include "NsConcertQuickBuild.h"
#include "AgStagePlatforms.h"
#include "NsConcertInstrument.h"
#include "NsJohnnyMissionServer.h"
#include "StinkyFishTarget.h"
#include "ZoneNsProperty.h"
#include "ZoneNsMedProperty.h"
#include "NsTokenConsoleServer.h"
#include "NsLupTeleport.h"
#include "ZoneNsWaves.h"
#include "WaveBossHammerling.h"
#include "WaveBossApe.h"
#include "WaveBossSpiderling.h"
#include "WaveBossHorsemen.h"
#include "MinigameTreasureChestServer.h"
#include "NsLegoClubDoor.h"
#include "ClRing.h"
#include "WildAmbients.h"
#include "PropertyDeathPlane.h"
// PR Scripts
#include "PrWhistle.h"
#include "PrSeagullFly.h"
#include "HydrantBroken.h"
#include "HydrantSmashable.h"
#include "PetDigServer.h"
#include "PetFromDigServer.h"
#include "PetFromObjectServer.h"
#include "DamagingPets.h"
#include "SpawnGryphonServer.h"
// GF Scripts
#include "GfTikiTorch.h"
#include "GfCampfire.h"
#include "GfOrgan.h"
#include "GfBanana.h"
#include "GfBananaCluster.h"
#include "GfJailkeepMission.h"
#include "TriggerAmbush.h"
#include "GfCaptainsCannon.h"
#include "MastTeleport.h"
#include "GfJailWalls.h"
#include "QbEnemyStunner.h"
#include "PetDigBuild.h"
#include "SpawnLionServer.h"
#include "BaseEnemyApe.h"
#include "GfApeSmashingQB.h"
#include "ZoneGfProperty.h"
#include "GfArchway.h"
#include "GfMaelstromGeyser.h"
#include "PirateRep.h"
#include "GfParrotCrash.h"
// SG Scripts
#include "SGCannon.h"
#include "ZoneSGServer.h"
// FV Scripts
#include "FvCandle.h"
#include "EnemyRoninSpawner.h"
#include "ActNinjaTurret.h"
#include "FvMaelstromCavalry.h"
#include "FvHorsemenTrigger.h"
#include "FvFlyingCreviceDragon.h"
#include "FvMaelstromDragon.h"
#include "FvDragonSmashingGolemQb.h"
#include "TreasureChestDragonServer.h"
#include "InstanceExitTransferPlayerToLastNonInstance.h"
#include "FvFreeGfNinjas.h"
#include "FvPandaServer.h"
#include "FvPandaSpawnerServer.h"
#include "ZoneFvProperty.h"
#include "FvBrickPuzzleServer.h"
#include "FvConsoleLeftQuickbuild.h"
#include "FvConsoleRightQuickbuild.h"
#include "FvFacilityBrick.h"
#include "FvFacilityPipes.h"
#include "ImgBrickConsoleQB.h"
#include "ActParadoxPipeFix.h"
#include "FvNinjaGuard.h"
#include "FvPassThroughWall.h"
#include "FvBounceOverWall.h"
#include "FvFong.h"
#include "FvMaelstromGeyser.h"
#include "FvRaceDragon.h"
#include "FvRacePillarABCServer.h"
#include "FvRacePillarDServer.h"
#include "RaceFireballs.h"
#include "RaceShipLapColumnsServer.h"
// FB Scripts
#include "AgJetEffectServer.h"
#include "AgSalutingNpcs.h"
#include "BossSpiderQueenEnemyServer.h"
#include "RockHydrantSmashable.h"
// Misc Scripts
#include "ExplodingAsset.h"
#include "ActPlayerDeathTrigger.h"
#include "CrabServer.h"
#include "GrowingFlower.h"
#include "BaseFootRaceManager.h"
#include "PropertyPlatform.h"
#include "MailBoxServer.h"
#include "ActMine.h"
#include "FireFirstSkillonStartup.h"
// Racing Scripts
#include "RaceImagineCrateServer.h"
#include "ActVehicleDeathTrigger.h"
#include "RaceImaginePowerup.h"
#include "RaceMaelstromGeiser.h"
#include "FvRaceSmashEggImagineServer.h"
#include "RaceSmashServer.h"
#include "FvRacingColumns.h"
// NT Scripts
#include "NtSentinelWalkwayServer.h"
#include "NtParadoxTeleServer.h"
#include "NtDarkitectRevealServer.h"
#include "BankInteractServer.h"
#include "NtVentureSpeedPadServer.h"
#include "NtVentureCannonServer.h"
#include "NtCombatChallengeServer.h"
#include "NtCombatChallengeDummy.h"
#include "NtCombatChallengeExplodingDummy.h"
#include "BaseInteractDropLootServer.h"
#include "NtAssemblyTubeServer.h"
#include "NtParadoxPanelServer.h"
#include "TokenConsoleServer.h"
#include "NtImagBeamBuffer.h"
#include "NtBeamImaginationCollectors.h"
#include "NtDirtCloudServer.h"
#include "NtConsoleTeleportServer.h"
#include "SpawnShrakeServer.h"
#include "SpawnSaberCatServer.h"
#include "SpawnStegoServer.h"
#include "NtDukeServer.h"
#include "NtHaelServer.h"
#include "NtOverbuildServer.h"
#include "NtVandaServer.h"
#include "ForceVolumeServer.h"
#include "NtXRayServer.h"
#include "NtSleepingGuard.h"
#include "NtImagimeterVisibility.h"
#include "FrictionVolumeServer.h"
#include "NTPipeVisibilityServer.h"
#include "NTNaomiDirtServer.h"
#include "MinigameBlueMark.h"
#include "NtNaomiBreadcrumbServer.h"
// DLU Scripts
#include "DLUVanityTeleportingObject.h"
// AM Scripts
#include "AmConsoleTeleportServer.h"
#include "RandomSpawnerFin.h"
#include "RandomSpawnerPit.h"
#include "RandomSpawnerStr.h"
#include "RandomSpawnerZip.h"
#include "AmDarklingMech.h"
#include "AmBridge.h"
#include "AmDrawBridge.h"
#include "AmShieldGenerator.h"
#include "AmShieldGeneratorQuickbuild.h"
#include "AmDropshipComputer.h"
#include "AmScrollReaderServer.h"
#include "AmTemplateSkillVolume.h"
#include "EnemyNjBuff.h"
#include "AmSkeletonEngineer.h"
#include "AmSkullkinDrill.h"
#include "AmSkullkinDrillStand.h"
#include "AmSkullkinTower.h"
#include "AmDarklingDragon.h"
#include "AmBlueX.h"
#include "AmTeapotServer.h"
#include "WanderingVendor.h"
// NJ Scripts
#include "NjGarmadonCelebration.h"
#include "NjWuNPC.h"
#include "NjScrollChestServer.h"
#include "EnemySkeletonSpawner.h"
#include "NjRailSwitch.h"
#include "NjRailPostServer.h"
#include "NjRailActivatorsServer.h"
#include "NjColeNPC.h"
#include "NjNPCMissionSpinjitzuServer.h"
#include "NjJayMissionItems.h"
#include "FallingTile.h"
#include "ImaginationShrineServer.h"
#include "Lieutenant.h"
#include "RainOfArrows.h"
#include "NjIceRailActivator.h"
#include "CavePrisonCage.h"
#include "NjMonastryBossInstance.h"
#include "CatapultBouncerServer.h"
#include "CatapultBaseServer.h"
#include "NjhubLavaPlayerDeathTrigger.h"
#include "MonCoreNookDoors.h"
#include "MonCoreSmashableDoors.h"
#include "FlameJetServer.h"
#include "BurningTile.h"
#include "NjEarthDragonPetServer.h"
#include "NjEarthPetServer.h"
#include "NjDragonEmblemChestServer.h"
#include "NjNyaMissionitems.h"
// Scripted equipment
#include "AnvilOfArmor.h"
#include "CauldronOfLife.h"
#include "FountainOfImagination.h"
#include "Sunflower.h"
#include "BootyDigServer.h"
#include "PersonalFortress.h"
#include "PropertyDevice.h"
#include "ImaginationBackpackHealServer.h"
#include "LegoDieRoll.h"
#include "BuccaneerValiantShip.h"
#include "GemPack.h"
#include "ShardArmor.h"
#include "TeslaPack.h"
#include "StunImmunity.h"
// Survival scripts
#include "AgSurvivalStromling.h"
#include "AgSurvivalMech.h"
#include "AgSurvivalSpiderling.h"
// Frostburgh Scripts
#include "RockHydrantBroken.h"
#include "WhFans.h"
// WBL scripts
#include "WblGenericZone.h"
// Alpha Scripts
#include "TriggerGas.h"
#include "ActNinjaSensei.h"
// pickups
#include "SpecialCoinSpawner.h"
#include "SpecialPowerupSpawner.h"
#include "SpecialSpeedBuffSpawner.h"
// Wild Scripts
#include "WildAndScared.h"
#include "WildGfGlowbug.h"
#include "WildAmbientCrab.h"
#include "WildPants.h"
#include "WildNinjaStudent.h"
#include "WildNinjaSensei.h"
#include "WildNinjaBricks.h"
#include "VisToggleNotifierServer.h"
#include "LupGenericInteract.h"
#include "WblRobotCitizen.h"
#include "CppScripts.h"
namespace {
// This is in the translation unit instead of the header to prevent wierd linker errors
InvalidScript* const InvalidToReturn = new InvalidScript();
std::map<std::string, CppScripts::Script*> m_Scripts;
};
CppScripts::Script* const CppScriptsOld::GetScript(Entity* parent, const std::string& scriptName) {
auto itr = m_Scripts.find(scriptName);
if (itr != m_Scripts.end()) {
return itr->second;
}
CppScripts::Script* script = InvalidToReturn;
//VE / AG:
if (scriptName == "scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua")
script = new AgShipPlayerDeathTrigger();
else if (scriptName == "scripts\\ai\\NP\\L_NPC_NP_SPACEMAN_BOB.lua")
script = new NpcNpSpacemanBob();
else if (scriptName == "scripts\\ai\\AG\\L_AG_SPACE_STUFF.lua") // Broken, will (sometimes) display all animations at once on initial login
script = new AgSpaceStuff();
else if (scriptName == "scripts\\ai\\AG\\L_AG_SHIP_PLAYER_SHOCK_SERVER.lua")
script = new AgShipPlayerShockServer();
else if (scriptName == "scripts\\ai\\AG\\L_AG_IMAG_SMASHABLE.lua")
script = new AgImagSmashable();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_STORY_BOX_INTERACT_SERVER.lua")
script = new StoryBoxInteractServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_BINOCULARS.lua")
script = new Binoculars();
else if (scriptName == "scripts\\ai\\WILD\\L_ALL_CRATE_CHICKEN.lua")
script = new AllCrateChicken();
else if (scriptName == "scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_SMASHABLE.lua")
script = new RockHydrantSmashable(); // Broken?
else if (scriptName == "scripts\\02_server\\Map\\SS\\L_SS_MODULAR_BUILD_SERVER.lua")
script = new SsModularBuildServer();
else if (scriptName == "scripts\\02_server\\Map\\Property\\AG_Small\\L_ZONE_AG_PROPERTY.lua")
script = new ZoneAgProperty();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_POI_MISSION.lua")
script = new InvalidScript(); // this is done in Entity.cpp, not needed for our implementation
else if (scriptName == "scripts\\02_server\\Map\\General\\L_TOUCH_MISSION_UPDATE_SERVER.lua")
script = new TouchMissionUpdateServer();
else if (scriptName == "scripts\\ai\\AG\\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua")
script = new ActSharkPlayerDeathTrigger();
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_MECH.lua")
script = new BaseEnemyMech();
else if (scriptName == "scripts\\zone\\AG\\L_ZONE_AG_SURVIVAL.lua")
script = new ZoneAgSurvival();
else if (scriptName == "scripts\\02_server\\Objects\\L_BUFF_STATION_SERVER.lua")
script = new AgSurvivalBuffStation();
else if (scriptName == "scripts\\ai\\AG\\L_AG_BUS_DOOR.lua")
script = new AgBusDoor();
else if (scriptName == "scripts\\02_server\\Equipment\\L_MAESTROM_EXTRACTICATOR_SERVER.lua")
script = new MaestromExtracticatorServer();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_AG_CAGED_BRICKS_SERVER.lua")
script = new AgCagedBricksServer();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_NPC_WISP_SERVER.lua")
script = new NpcWispServer();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_NPC_EPSILON_SERVER.lua")
script = new NpcEpsilonServer();
else if (scriptName == "scripts\\ai\\AG\\L_AG_TURRET.lua" || scriptName == "scripts\\ai\\AG\\L_AG_TURRET_FOR_SHIP.lua")
script = new AgTurret();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_AG_LASER_SENSOR_SERVER.lua")
script = new AgLaserSensorServer();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_LASER_SERVER.lua")
script = new AgMonumentLaserServer();
else if (scriptName == "scripts\\ai\\AG\\L_AG_FANS.lua")
script = new AgFans();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_BIRDS.lua")
script = new AgMonumentBirds();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_REMOVE_RENTAL_GEAR.lua")
script = new RemoveRentalGear();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_NPC_NJ_ASSISTANT_SERVER.lua")
script = new NpcNjAssistantServer();
else if (scriptName == "scripts\\ai\\AG\\L_AG_SALUTING_NPCS.lua")
script = new AgSalutingNpcs();
else if (scriptName == "scripts\\ai\\AG\\L_AG_JET_EFFECT_SERVER.lua")
script = new AgJetEffectServer();
else if (scriptName == "scripts\\02_server\\Enemy\\AG\\L_BOSS_SPIDER_QUEEN_ENEMY_SERVER.lua")
script = new BossSpiderQueenEnemyServer();
else if (scriptName == "scripts\\02_server\\Map\\Property\\AG_Small\\L_ENEMY_SPIDER_SPAWNER.lua")
script = new EnemySpiderSpawner();
else if (scriptName == "scripts/02_server/Map/Property/AG_Small/L_ENEMY_SPIDER_SPAWNER.lua")
script = new EnemySpiderSpawner();
else if (scriptName == "scripts\\ai\\AG\\L_AG_QB_Elevator.lua")
script = new AgQbElevator();
else if (scriptName == "scripts\\ai\\PROPERTY\\AG\\L_AG_PROP_GUARD.lua")
script = new AgPropGuard();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_AG_BUGSPRAYER.lua")
script = new AgBugsprayer();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_NPC_AG_COURSE_STARTER.lua")
script = new NpcAgCourseStarter();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_GOAL.lua")
script = new AgMonumentRaceGoal();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_CANCEL.lua")
script = new AgMonumentRaceCancel();
else if (scriptName == "scripts\\02_server\\Map\\AG_Spider_Queen\\L_ZONE_AG_SPIDER_QUEEN.lua")
script = new ZoneAgSpiderQueen();
else if (scriptName == "scripts\\02_server\\Map\\AG_Spider_Queen\\L_SPIDER_BOSS_TREASURE_CHEST_SERVER.lua")
script = new SpiderBossTreasureChestServer();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_NPC_COWBOY_SERVER.lua")
script = new NpcCowboyServer();
else if (scriptName == "scripts\\02_server\\Map\\Property\\AG_Med\\L_ZONE_AG_MED_PROPERTY.lua")
script = new ZoneAgMedProperty();
else if (scriptName == "scripts\\ai\\AG\\L_AG_STROMBIE_PROPERTY.lua")
script = new AgStromlingProperty();
else if (scriptName == "scripts\\ai\\AG\\L_AG_DARKLING_MECH.lua")
script = new BaseEnemyMech();
else if (scriptName == "scripts\\ai\\AG\\L_AG_DARK_SPIDERLING.lua")
script = new AgDarkSpiderling();
else if (scriptName == "scripts\\ai\\PROPERTY\\L_PROP_GUARDS.lua")
script = new AgPropguards();
else if (scriptName == "scripts\\ai\\PROPERTY\\L_PROPERTY_FX_DAMAGE.lua")
script = new PropertyFXDamage();
else if (scriptName == "scripts\\02_server\\Map\\AG\\L_NPC_PIRATE_SERVER.lua")
script = new NpcPirateServer();
else if (scriptName == "scripts\\ai\\AG\\L_AG_PICNIC_BLANKET.lua")
script = new AgPicnicBlanket();
else if (scriptName == "scripts\\02_server\\Map\\Property\\L_PROPERTY_BANK_INTERACT_SERVER.lua")
script = new PropertyBankInteract();
else if (scriptName == "scripts\\02_server\\Enemy\\VE\\L_VE_MECH.lua")
script = new VeMech();
else if (scriptName == "scripts\\02_server\\Map\\VE\\L_MISSION_CONSOLE_SERVER.lua")
script = new VeMissionConsole();
else if (scriptName == "scripts\\02_server\\Map\\VE\\L_EPSILON_SERVER.lua")
script = new VeEpsilonServer();
// Win32 thinks this if chain is too long, let's cut it up and serve it as a three course meal
//NS:
if (scriptName == "scripts\\ai\\NS\\L_NS_MODULAR_BUILD.lua")
script = new NsModularBuild();
else if (scriptName == "scripts\\ai\\NS\\L_NS_GET_FACTION_MISSION_SERVER.lua")
script = new NsGetFactionMissionServer();
else if (scriptName == "scripts\\ai\\NS\\L_NS_QB_IMAGINATION_STATUE.lua")
script = new NsQbImaginationStatue();
else if (scriptName == "scripts\\02_server\\Map\\NS\\CONCERT_CHOICEBUILD_MANAGER_SERVER.lua")
script = new NsConcertChoiceBuildManager();
else if (scriptName == "scripts\\ai\\NS\\L_NS_CONCERT_CHOICEBUILD.lua")
script = new NsConcertChoiceBuild();
else if (scriptName == "scripts\\ai\\NS\\L_NS_CONCERT_QUICKBUILD.lua")
script = new NsConcertQuickBuild();
else if (scriptName == "scripts\\ai\\AG\\L_AG_STAGE_PLATFORMS.lua")
script = new AgStagePlatforms();
else if (scriptName == "scripts\\ai\\NS\\L_NS_CONCERT_INSTRUMENT_QB.lua")
script = new NsConcertInstrument();
else if (scriptName == "scripts\\ai\\NS\\L_NS_JONNY_FLAG_MISSION_SERVER.lua")
script = new NsJohnnyMissionServer();
else if (scriptName == "scripts\\02_server\\Objects\\L_STINKY_FISH_TARGET.lua")
script = new StinkyFishTarget();
else if (scriptName == "scripts\\zone\\PROPERTY\\NS\\L_ZONE_NS_PROPERTY.lua")
script = new ZoneNsProperty();
else if (scriptName == "scripts\\02_server\\Map\\Property\\NS_Med\\L_ZONE_NS_MED_PROPERTY.lua")
script = new ZoneNsMedProperty();
else if (scriptName == "scripts\\02_server\\Map\\NS\\L_NS_TOKEN_CONSOLE_SERVER.lua")
script = new NsTokenConsoleServer();
else if (scriptName == "scripts\\02_server\\Map\\NS\\L_NS_LUP_TELEPORT.lua")
script = new NsLupTeleport();
else if (scriptName == "scripts\\02_server\\Map\\NS\\Waves\\L_ZONE_NS_WAVES.lua")
script = new ZoneNsWaves();
else if (scriptName == "scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HAMMERLING_ENEMY_SERVER.lua")
script = new WaveBossHammerling();
else if (scriptName == "scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_APE_ENEMY_SERVER.lua")
script = new WaveBossApe();
else if (scriptName == "scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_DARK_SPIDERLING_ENEMY_SERVER.lua")
script = new WaveBossSpiderling();
else if (scriptName == "scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HORESEMEN_ENEMY_SERVER.lua")
script = new WaveBossHorsemen();
else if (scriptName == "scripts\\02_server\\Minigame\\General\\L_MINIGAME_TREASURE_CHEST_SERVER.lua")
script = new MinigameTreasureChestServer();
else if (scriptName == "scripts\\02_server\\Map\\NS\\L_NS_LEGO_CLUB_DOOR.lua")
script = new NsLegoClubDoor();
else if (scriptName == "scripts/ai/NS/L_CL_RING.lua")
script = new ClRing();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_AMBIENTS.lua")
script = new WildAmbients();
else if (scriptName == "scripts\\ai\\NS\\NS_PP_01\\L_NS_PP_01_TELEPORT.lua")
script = new PropertyDeathPlane();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_QB_SPAWNER.lua")
script = new QbSpawner();
else if (scriptName == "scripts\\ai\\AG\\L_AG_QB_Wall.lua")
script = new AgQbWall();
//GF:
else if (scriptName == "scripts\\02_server\\Map\\GF\\L_GF_TORCH.lua")
script = new GfTikiTorch();
else if (scriptName == "scripts\\ai\\GF\\L_SPECIAL_FIREPIT.lua")
script = new GfCampfire();
else if (scriptName == "scripts\\ai\\GF\\L_GF_ORGAN.lua")
script = new GfOrgan();
else if (scriptName == "scripts\\ai\\GF\\L_GF_BANANA.lua")
script = new GfBanana();
else if (scriptName == "scripts\\ai\\GF\\L_GF_BANANA_CLUSTER.lua")
script = new GfBananaCluster();
else if (scriptName == "scripts/ai/GF/L_GF_JAILKEEP_MISSION.lua")
script = new GfJailkeepMission();
else if (scriptName == "scripts\\ai\\GF\\L_TRIGGER_AMBUSH.lua")
script = new TriggerAmbush();
else if (scriptName == "scripts\\02_server\\Map\\GF\\L_GF_CAPTAINS_CANNON.lua")
script = new GfCaptainsCannon();
else if (scriptName == "scripts\\02_server\\Map\\GF\\L_MAST_TELEPORT.lua")
script = new MastTeleport();
else if (scriptName == "scripts\\ai\\GF\\L_GF_JAIL_WALLS.lua")
script = new GfJailWalls();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_QB_ENEMY_STUNNER.lua")
script = new QbEnemyStunner();
else if (scriptName == "scripts\\ai\\GF\\L_GF_PET_DIG_BUILD.lua")
script = new PetDigBuild(); // Technically also used once in AG
else if (scriptName == "scripts\\02_server\\Map\\GF\\L_SPAWN_LION_SERVER.lua")
script = new SpawnLionServer();
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_APE.lua")
script = new BaseEnemyApe();
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_GF_APE_SMASHING_QB.lua")
script = new GfApeSmashingQB();
else if (scriptName == "scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua")
script = new ZoneGfProperty();
else if (scriptName == "scripts\\ai\\GF\\L_GF_ARCHWAY.lua")
script = new GfArchway();
else if (scriptName == "scripts\\ai\\GF\\L_GF_MAELSTROM_GEYSER.lua")
script = new GfMaelstromGeyser();
else if (scriptName == "scripts\\ai\\GF\\L_PIRATE_REP.lua")
script = new PirateRep();
else if (scriptName == "scripts\\ai\\GF\\L_GF_PARROT_CRASH.lua")
script = new GfParrotCrash();
// SG
else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua")
script = new SGCannon();
else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\L_ZONE_SG_SERVER.lua")
script = new ZoneSGServer();
//PR:
else if (scriptName == "scripts\\client\\ai\\PR\\L_PR_WHISTLE.lua")
script = new PrWhistle();
if (scriptName == "scripts\\02_server\\Map\\PR\\L_PR_SEAGULL_FLY.lua")
script = new PrSeagullFly();
else if (scriptName == "scripts\\ai\\PETS\\L_HYDRANT_SMASHABLE.lua")
script = new HydrantSmashable();
else if (scriptName == "scripts\\02_server\\map\\PR\\L_HYDRANT_BROKEN.lua")
script = new HydrantBroken();
else if (scriptName == "scripts\\02_server\\Map\\General\\PET_DIG_SERVER.lua" || scriptName == "scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua")
script = new PetDigServer();
else if (scriptName == "scripts\\client\\ai\\PR\\L_CRAB_SERVER.lua")
script = new CrabServer();
else if (scriptName == "scripts\\02_server\\Pets\\L_PET_FROM_DIG_SERVER.lua")
script = new PetFromDigServer();
else if (scriptName == "scripts\\02_server\\Pets\\L_PET_FROM_OBJECT_SERVER.lua")
script = new PetFromObjectServer();
else if (scriptName == "scripts\\02_server\\Pets\\L_DAMAGING_PET.lua")
script = new DamagingPets();
else if (scriptName == "scripts\\02_server\\Map\\PR\\L_SPAWN_GRYPHON_SERVER.lua")
script = new SpawnGryphonServer();
//FV Scripts:
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_ACT_CANDLE.lua")
script = new FvCandle();
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_ENEMY_RONIN_SPAWNER.lua")
script = new EnemyRoninSpawner();
else if (scriptName == "scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_CAVALRY.lua")
script = new FvMaelstromCavalry();
else if (scriptName == "scripts\\ai\\FV\\L_ACT_NINJA_TURRET_1.lua")
script = new ActNinjaTurret();
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_FV_HORSEMEN_TRIGGER.lua")
script = new FvHorsemenTrigger();
else if (scriptName == "scripts\\ai\\FV\\L_FV_FLYING_CREVICE_DRAGON.lua")
script = new FvFlyingCreviceDragon();
else if (scriptName == "scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_DRAGON.lua")
script = new FvMaelstromDragon();
else if (scriptName == "scripts\\ai\\FV\\L_FV_DRAGON_SMASHING_GOLEM_QB.lua")
script = new FvDragonSmashingGolemQb();
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_TREASURE_CHEST_DRAGON_SERVER.lua")
script = new TreasureChestDragonServer();
else if (scriptName == "scripts\\ai\\GENERAL\\L_INSTANCE_EXIT_TRANSFER_PLAYER_TO_LAST_NON_INSTANCE.lua")
script = new InstanceExitTransferPlayerToLastNonInstance();
else if (scriptName == "scripts\\ai\\FV\\L_NPC_FREE_GF_NINJAS.lua")
script = new FvFreeGfNinjas();
else if (scriptName == "scripts\\ai\\FV\\L_FV_PANDA_SPAWNER_SERVER.lua")
script = new FvPandaSpawnerServer();
else if (scriptName == "scripts\\ai\\FV\\L_FV_PANDA_SERVER.lua")
script = new FvPandaServer();
else if (scriptName == "scripts\\zone\\PROPERTY\\FV\\L_ZONE_FV_PROPERTY.lua")
script = new ZoneFvProperty();
else if (scriptName == "scripts\\ai\\FV\\L_FV_BRICK_PUZZLE_SERVER.lua")
script = new FvBrickPuzzleServer();
else if (scriptName == "scripts\\ai\\FV\\L_FV_CONSOLE_LEFT_QUICKBUILD.lua")
script = new FvConsoleLeftQuickbuild();
else if (scriptName == "scripts\\ai\\FV\\L_FV_CONSOLE_RIGHT_QUICKBUILD.lua")
script = new FvConsoleRightQuickbuild();
else if (scriptName == "scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua")
script = new FvFacilityBrick();
else if (scriptName == "scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua")
script = new FvFacilityPipes();
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua")
script = new ImgBrickConsoleQB();
else if (scriptName == "scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua")
script = new ActParadoxPipeFix();
else if (scriptName == "scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua")
script = new FvNinjaGuard();
else if (scriptName == "scripts\\ai\\FV\\L_ACT_PASS_THROUGH_WALL.lua")
script = new FvPassThroughWall();
else if (scriptName == "scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua")
script = new FvBounceOverWall();
else if (scriptName == "scripts\\02_server\\Map\\FV\\L_NPC_FONG.lua")
script = new FvFong();
else if (scriptName == "scripts\\ai\\FV\\L_FV_MAELSTROM_GEYSER.lua")
script = new FvMaelstromGeyser();
else if (scriptName == "scripts\\02_server\\Map\\FV\\Racing\\RACE_SHIP_LAP_COLUMNS_SERVER.lua")
script = new RaceShipLapColumnsServer();
// yes we know the lap numbers dont match the file name or anim. thats what they desgined it as.
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP1_SERVER.lua")
script = new FvRaceDragon("lap_01", 2);
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP2_SERVER.lua")
script = new FvRaceDragon("lap_02", 0);
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP3_SERVER.lua")
script = new FvRaceDragon("lap_03", 1);
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_ABC_SERVER.lua")
script = new FvRacePillarABCServer();
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_D_SERVER.lua")
script = new FvRacePillarDServer();
else if (scriptName == "scripts\\02_server\\Map\\FV\\Racing\\RACE_FIREBALLS.lua")
script = new RaceFireballs();
//Misc:
if (scriptName == "scripts\\02_server\\Map\\General\\L_EXPLODING_ASSET.lua")
script = new ExplodingAsset();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_WISHING_WELL_SERVER.lua")
script = new WishingWellServer();
else if (scriptName == "scripts\\ai\\ACT\\L_ACT_PLAYER_DEATH_TRIGGER.lua")
script = new ActPlayerDeathTrigger();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_GROWING_FLOWER_SERVER.lua")
script = new GrowingFlower();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_TOKEN_CONSOLE_SERVER.lua")
script = new TokenConsoleServer();
else if (scriptName == "scripts\\ai\\ACT\\FootRace\\L_ACT_BASE_FOOT_RACE.lua")
script = new BaseFootRaceManager();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_PROP_PLATFORM.lua")
script = new PropertyPlatform();
else if (scriptName == "scripts\\02_server\\Map\\VE\\L_VE_BRICKSAMPLE_SERVER.lua")
script = new VeBricksampleServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_MAIL_BOX_SERVER.lua")
script = new MailBoxServer();
else if (scriptName == "scripts\\ai\\ACT\\L_ACT_MINE.lua")
script = new ActMine();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_WANDERING_VENDOR.lua")
script = new WanderingVendor();
//Racing:
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_CRATE_SERVER.lua")
script = new RaceImagineCrateServer();
else if (scriptName == "scripts\\ai\\ACT\\L_ACT_VEHICLE_DEATH_TRIGGER.lua")
script = new ActVehicleDeathTrigger();
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_POWERUP.lua")
script = new RaceImaginePowerup();
else if (scriptName == "scripts\\02_server\\Map\\FV\\Racing\\RACE_MAELSTROM_GEISER.lua")
script = new RaceMaelstromGeiser();
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\FV_RACE_SMASH_EGG_IMAGINE_SERVER.lua")
script = new FvRaceSmashEggImagineServer();
else if (scriptName == "scripts\\02_server\\Map\\FV\\Racing\\FV_RACING_COLUMNS.lua")
script = new FvRacingColumns();
else if (scriptName == "scripts\\ai\\RACING\\OBJECTS\\RACE_SMASH_SERVER.lua")
script = new RaceSmashServer();
//NT:
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_SENTINELWALKWAY_SERVER.lua")
script = new NtSentinelWalkwayServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_PARADOXTELE_SERVER.lua")
script = new NtParadoxTeleServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_DARKITECT_REVEAL_SERVER.lua")
script = new NtDarkitectRevealServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_BANK_INTERACT_SERVER.lua")
script = new BankInteractServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_VENTURESPEEDPAD_SERVER.lua")
script = new NtVentureSpeedPadServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_VENTURE_CANNON_SERVER.lua")
script = new NtVentureCannonServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_SERVER.lua")
script = new NtCombatChallengeServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_DUMMY.lua")
script = new NtCombatChallengeDummy();
else if (scriptName == "scripts\\02_server\\Map\\NT\\\\L_NT_COMBAT_EXPLODING_TARGET.lua")
script = new NtCombatChallengeExplodingDummy();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_BASE_INTERACT_DROP_LOOT_SERVER.lua")
script = new BaseInteractDropLootServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_ASSEMBLYTUBE_SERVER.lua")
script = new NtAssemblyTubeServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_PARADOX_PANEL_SERVER.lua")
script = new NtParadoxPanelServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_IMAG_BEAM_BUFFER.lua")
script = new NtImagBeamBuffer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_BEAM_IMAGINATION_COLLECTORS.lua")
script = new NtBeamImaginationCollectors();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_DIRT_CLOUD_SERVER.lua")
script = new NtDirtCloudServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_CONSOLE_TELEPORT_SERVER.lua")
script = new NtConsoleTeleportServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_SPAWN_STEGO_SERVER.lua")
script = new SpawnStegoServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_SPAWN_SABERCAT_SERVER.lua")
script = new SpawnSaberCatServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_SPAWN_SHRAKE_SERVER.lua")
script = new SpawnShrakeServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_DUKE_SERVER.lua")
script = new NtDukeServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_HAEL_SERVER.lua")
script = new NtHaelServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_FACTION_SPY_SERVER.lua")
script = new NtFactionSpyServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_OVERBUILD_SERVER.lua")
script = new NtOverbuildServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_VANDA_SERVER.lua")
script = new NtVandaServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_FORCE_VOLUME_SERVER.lua")
script = new ForceVolumeServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_FRICTION_VOLUME_SERVER.lua")
script = new FrictionVolumeServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_XRAY_SERVER.lua")
script = new NtXRayServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua")
script = new NtSleepingGuard();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua")
script = new NTImagimeterVisibility();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_PIPE_VISIBILITY_SERVER.lua")
script = new NTPipeVisibilityServer();
else if (scriptName == "scripts\\ai\\MINIGAME\\Objects\\MINIGAME_BLUE_MARK.lua")
script = new MinigameBlueMark();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_NAOMI_BREADCRUMB_SERVER.lua")
script = new NtNaomiBreadcrumbServer();
else if (scriptName == "scripts\\02_server\\Map\\NT\\L_NT_NAOMI_DIRT_SERVER.lua")
script = new NTNaomiDirtServer();
//AM:
if (scriptName == "scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua")
script = new AmConsoleTeleportServer();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_FIN.lua")
script = new RandomSpawnerFin();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_PIT.lua")
script = new RandomSpawnerPit();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_STR.lua")
script = new RandomSpawnerStr();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_ZIP.lua")
script = new RandomSpawnerZip();
else if (scriptName == "scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_MECH.lua")
script = new AmDarklingMech();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_BRIDGE.lua")
script = new AmBridge();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_DRAW_BRIDGE.lua")
script = new AmDrawBridge();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR.lua")
script = new AmShieldGenerator();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR_QUICKBUILD.lua")
script = new AmShieldGeneratorQuickbuild();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_DROPSHIP_COMPUTER.lua")
script = new AmDropshipComputer();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_SCROLL_READER_SERVER.lua")
script = new AmScrollReaderServer();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_TEMPLE_SKILL_VOLUME.lua")
script = new AmTemplateSkillVolume();
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF.lua")
script = new EnemyNjBuff();
else if (scriptName == "scripts\\02_server\\Enemy\\AM\\L_AM_SKELETON_ENGINEER.lua")
script = new AmSkeletonEngineer();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL.lua")
script = new AmSkullkinDrill();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL_STAND.lua")
script = new AmSkullkinDrillStand();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_SKULLKIN_TOWER.lua")
script = new AmSkullkinTower();
else if (scriptName == "scripts\\02_server\\Enemy\\AM\\L_AM_NAMED_DARKLING_DRAGON.lua")
script = new AmDarklingDragon();
else if (scriptName == "scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_DRAGON.lua")
script = new AmDarklingDragon();
else if (scriptName == "scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_APE.lua")
script = new BaseEnemyApe();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_BLUE_X.lua")
script = new AmBlueX();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_TEAPOT_SERVER.lua")
script = new AmTeapotServer();
// Ninjago
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua")
script = new NjGarmadonCelebration();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_WU_NPC.lua")
script = new NjWuNPC();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_SCROLL_CHEST_SERVER.lua")
script = new NjScrollChestServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_COLE_NPC.lua")
script = new NjColeNPC();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_JAY_MISSION_ITEMS.lua")
script = new NjJayMissionItems();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_NPC_MISSION_SPINJITZU_SERVER.lua")
script = new NjNPCMissionSpinjitzuServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_ENEMY_SKELETON_SPAWNER.lua")
script = new EnemySkeletonSpawner();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_NJ_RAIL_SWITCH.lua")
script = new NjRailSwitch();
else if (scriptName == "scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_ACTIVATORS_SERVER.lua")
script = new NjRailActivatorsServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_POST_SERVER.lua")
script = new NjRailPostServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\Ninjago\\L_ICE_RAIL_ACTIVATOR_SERVER.lua")
script = new NjIceRailActivator();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_FALLING_TILE.lua")
script = new FallingTile();
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF_STUN_IMMUNITY.lua")
script = new EnemyNjBuff();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_IMAGINATION_SHRINE_SERVER.lua")
script = new ImaginationShrineServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_LIEUTENANT.lua")
script = new Lieutenant();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_RAIN_OF_ARROWS.lua")
script = new RainOfArrows();
if (scriptName == "scripts\\02_server\\Map\\njhub\\L_CAVE_PRISON_CAGE.lua")
script = new CavePrisonCage();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\boss_instance\\L_MONASTERY_BOSS_INSTANCE_SERVER.lua")
script = new NjMonastryBossInstance();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_CATAPULT_BOUNCER_SERVER.lua")
script = new CatapultBouncerServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_CATAPULT_BASE_SERVER.lua")
script = new CatapultBaseServer();
else if (scriptName == "scripts\\02_server\\Map\\General\\Ninjago\\L_NJHUB_LAVA_PLAYER_DEATH_TRIGGER.lua")
script = new NjhubLavaPlayerDeathTrigger();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_MON_CORE_NOOK_DOORS.lua")
script = new MonCoreNookDoors();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua")
script = new MonCoreSmashableDoors();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_FLAME_JET_SERVER.lua")
script = new FlameJetServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_BURNING_TILE.lua")
script = new BurningTile();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_SPAWN_EARTH_PET_SERVER.lua")
script = new NjEarthDragonPetServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_EARTH_PET_SERVER.lua")
script = new NjEarthPetServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_DRAGON_EMBLEM_CHEST_SERVER.lua")
script = new NjDragonEmblemChestServer();
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_NYA_MISSION_ITEMS.lua")
script = new NjNyaMissionitems();
//DLU:
else if (scriptName == "scripts\\02_server\\DLU\\DLUVanityTeleportingObject.lua")
script = new DLUVanityTeleportingObject();
// Survival minigame
else if (scriptName == "scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_STROMBIE.lua")
script = new AgSurvivalStromling();
else if (scriptName == "scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARKLING_MECH.lua")
script = new AgSurvivalMech();
else if (scriptName == "scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARK_SPIDERLING.lua")
script = new AgSurvivalSpiderling();
// Scripted equipment
else if (scriptName == "scripts\\EquipmentScripts\\Sunflower.lua")
script = new Sunflower();
else if (scriptName == "scripts/EquipmentScripts/AnvilOfArmor.lua")
script = new AnvilOfArmor();
else if (scriptName == "scripts/EquipmentScripts/FountainOfImagination.lua")
script = new FountainOfImagination();
else if (scriptName == "scripts/EquipmentScripts/CauldronOfLife.lua")
script = new CauldronOfLife();
else if (scriptName == "scripts\\02_server\\Equipment\\L_BOOTYDIG_SERVER.lua")
script = new BootyDigServer();
else if (scriptName == "scripts\\EquipmentScripts\\PersonalFortress.lua")
script = new PersonalFortress();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_PROPERTY_DEVICE.lua")
script = new PropertyDevice();
else if (scriptName == "scripts\\02_server\\Map\\General\\L_IMAG_BACKPACK_HEALS_SERVER.lua")
script = new ImaginationBackpackHealServer();
else if (scriptName == "scripts\\ai\\GENERAL\\L_LEGO_DIE_ROLL.lua")
script = new LegoDieRoll();
else if (scriptName == "scripts\\EquipmentScripts\\BuccaneerValiantShip.lua")
script = new BuccaneerValiantShip();
else if (scriptName == "scripts\\EquipmentScripts\\FireFirstSkillonStartup.lua")
script = new FireFirstSkillonStartup();
else if (scriptName == "scripts\\equipmenttriggers\\gempack.lua")
script = new GemPack();
else if (scriptName == "scripts\\equipmenttriggers\\shardarmor.lua")
script = new ShardArmor();
else if (scriptName == "scripts\\equipmenttriggers\\coilbackpack.lua")
script = new TeslaPack();
else if (scriptName == "scripts\\EquipmentScripts\\stunImmunity.lua")
script = new StunImmunity();
// FB
else if (scriptName == "scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_BROKEN.lua")
script = new RockHydrantBroken();
else if (scriptName == "scripts\\ai\\NS\\L_NS_WH_FANS.lua")
script = new WhFans();
// WBL
else if (scriptName == "scripts\\zone\\LUPs\\WBL_generic_zone.lua")
script = new WblGenericZone();
// Alpha
if (scriptName == "scripts\\ai\\FV\\L_TRIGGER_GAS.lua")
script = new TriggerGas();
else if (scriptName == "scripts\\ai\\FV\\L_ACT_NINJA_SENSEI.lua")
script = new ActNinjaSensei();
// pickups
if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_1_BRONZE-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(1);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_1_GOLD-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(10000);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_1_SILVER-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(100);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_10_BRONZE-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(10);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_10_GOLD-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(100000);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_10_SILVER-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(1000);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_25_BRONZE-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(25);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_25_GOLD-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(250000);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_25_SILVER-COIN-SPAWNER.lua")
script = new SpecialCoinSpawner(2500);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER.lua")
script = new SpecialPowerupSpawner(13);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER-2PT.lua")
script = new SpecialPowerupSpawner(129);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_LIFE-POWERUP-SPAWNER.lua")
script = new SpecialPowerupSpawner(5);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_ARMOR-POWERUP-SPAWNER.lua")
script = new SpecialPowerupSpawner(747);
else if (scriptName == "scripts\\ai\\SPEC\\L_SPECIAL_SPEED_BUFF_SPAWNER.lua")
script = new SpecialSpeedBuffSpawner();
// Wild
if (scriptName == "scripts\\ai\\WILD\\L_WILD_GF_RAT.lua" || scriptName == "scripts\\ai\\WILD\\L_WILD_GF_SNAIL.lua")
script = new WildAndScared();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_GF_GLOWBUG.lua")
script = new WildGfGlowbug();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_AMBIENT_CRAB.lua")
script = new WildAmbientCrab();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_PANTS.lua")
script = new WildPants();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_NINJA_BRICKS.lua")
script = new WildNinjaBricks();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_NINJA_STUDENT.lua")
script = new WildNinjaStudent();
else if (scriptName == "scripts\\ai\\WILD\\L_WILD_NINJA_SENSEI.lua")
script = new WildNinjaSensei();
else if (scriptName == "scripts\\ai\\WILD\\L_LUP_generic_interact.lua")
script = new LupGenericInteract();
else if (scriptName.rfind("scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizen", 0) == 0)
script = new WblRobotCitizen();
// handle invalid script reporting if the path is greater than zero and it's not an ignored script
// information not really needed for sys admins but is for developers
else if (script == InvalidToReturn) {
if ((scriptName.length() > 0) && !((scriptName == "scripts\\02_server\\Enemy\\General\\L_SUSPEND_LUA_AI.lua") ||
(scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_SPIDERLING.lua") ||
(scriptName =="scripts\\ai\\FV\\L_ACT_NINJA_STUDENT.lua") ||
(scriptName == "scripts\\ai\\WILD\\L_WILD_GF_FROG.lua") ||
(scriptName == "scripts\\empty.lua")
)) LOG_DEBUG("LOT %i attempted to load CppScript for '%s', but returned InvalidScript.", parent->GetLOT(), scriptName.c_str());
}
m_Scripts[scriptName] = script;
return script;
}

View File

@@ -1,16 +0,0 @@
#ifndef CPPSCRIPTSOLD_H
#define CPPSCRIPTSOLD_H
#include <string>
class Entity;
namespace CppScripts {
class Script;
};
namespace CppScriptsOld {
CppScripts::Script* const GetScript(Entity* entity, const std::string& scriptName);
};
#endif //!CPPSCRIPTSOLD_H

View File

@@ -1,941 +0,0 @@
#include <gtest/gtest.h>
#include "dCommonVars.h"
#include "eCinematicEvent.h"
#include "CppScripts.h"
#include "CppScriptsOld.h"
#include "Entity.h"
#include "EntityInfo.h"
#include "LupGenericInteract.h"
#include "InvalidScript.h"
//VE / AG scripts:
#include "AgShipPlayerDeathTrigger.h"
#include "AgShipPlayerShockServer.h"
#include "AgSpaceStuff.h"
#include "AgImagSmashable.h"
#include "NpcNpSpacemanBob.h"
#include "StoryBoxInteractServer.h"
#include "Binoculars.h"
#include "AllCrateChicken.h"
#include "SsModularBuildServer.h"
#include "ZoneAgProperty.h"
#include "TouchMissionUpdateServer.h"
#include "ActSharkPlayerDeathTrigger.h"
#include "BaseEnemyMech.h"
#include "ZoneAgSurvival.h"
#include "AgBusDoor.h"
#include "MaestromExtracticatorServer.h"
#include "NpcWispServer.h"
#include "AgCagedBricksServer.h"
#include "NpcEpsilonServer.h"
#include "AgTurret.h"
#include "AgMonumentBirds.h"
#include "AgLaserSensorServer.h"
#include "AgMonumentLaserServer.h"
#include "AgFans.h"
#include "RemoveRentalGear.h"
#include "NpcNjAssistantServer.h"
#include "EnemySpiderSpawner.h"
#include "AgQbElevator.h"
#include "AgPropGuard.h"
#include "AgBugsprayer.h"
#include "WishingWellServer.h"
#include "NpcAgCourseStarter.h"
#include "AgMonumentRaceGoal.h"
#include "ZoneAgSpiderQueen.h"
#include "SpiderBossTreasureChestServer.h"
#include "NpcCowboyServer.h"
#include "ZoneAgMedProperty.h"
#include "AgStromlingProperty.h"
#include "AgDarkSpiderling.h"
#include "PropertyFXDamage.h"
#include "AgPropguards.h"
#include "NpcPirateServer.h"
#include "AgPicnicBlanket.h"
#include "AgMonumentRaceCancel.h"
#include "VeBricksampleServer.h"
#include "PropertyBankInteract.h"
#include "VeMech.h"
#include "VeMissionConsole.h"
#include "VeEpsilonServer.h"
#include "AgSurvivalBuffStation.h"
#include "QbSpawner.h"
#include "AgQbWall.h"
// NS Scripts
#include "NsModularBuild.h"
#include "NsGetFactionMissionServer.h"
#include "NsQbImaginationStatue.h"
#include "NsConcertChoiceBuildManager.h"
#include "NsConcertChoiceBuild.h"
#include "NsConcertQuickBuild.h"
#include "AgStagePlatforms.h"
#include "NsConcertInstrument.h"
#include "NsJohnnyMissionServer.h"
#include "StinkyFishTarget.h"
#include "ZoneNsProperty.h"
#include "ZoneNsMedProperty.h"
#include "NsTokenConsoleServer.h"
#include "NsLupTeleport.h"
#include "ZoneNsWaves.h"
#include "WaveBossHammerling.h"
#include "WaveBossApe.h"
#include "WaveBossSpiderling.h"
#include "WaveBossHorsemen.h"
#include "MinigameTreasureChestServer.h"
#include "NsLegoClubDoor.h"
#include "ClRing.h"
#include "WildAmbients.h"
#include "PropertyDeathPlane.h"
// PR Scripts
#include "PrWhistle.h"
#include "PrSeagullFly.h"
#include "HydrantBroken.h"
#include "HydrantSmashable.h"
#include "PetDigServer.h"
#include "PetFromDigServer.h"
#include "PetFromObjectServer.h"
#include "DamagingPets.h"
#include "SpawnGryphonServer.h"
// GF Scripts
#include "GfTikiTorch.h"
#include "GfCampfire.h"
#include "GfOrgan.h"
#include "GfBanana.h"
#include "GfBananaCluster.h"
#include "GfJailkeepMission.h"
#include "TriggerAmbush.h"
#include "GfCaptainsCannon.h"
#include "MastTeleport.h"
#include "GfJailWalls.h"
#include "QbEnemyStunner.h"
#include "PetDigBuild.h"
#include "SpawnLionServer.h"
#include "BaseEnemyApe.h"
#include "GfApeSmashingQB.h"
#include "ZoneGfProperty.h"
#include "GfArchway.h"
#include "GfMaelstromGeyser.h"
#include "PirateRep.h"
#include "GfParrotCrash.h"
// SG Scripts
#include "SGCannon.h"
#include "ZoneSGServer.h"
// FV Scripts
#include "FvCandle.h"
#include "EnemyRoninSpawner.h"
#include "ActNinjaTurret.h"
#include "FvMaelstromCavalry.h"
#include "FvHorsemenTrigger.h"
#include "FvFlyingCreviceDragon.h"
#include "FvMaelstromDragon.h"
#include "FvDragonSmashingGolemQb.h"
#include "TreasureChestDragonServer.h"
#include "InstanceExitTransferPlayerToLastNonInstance.h"
#include "FvFreeGfNinjas.h"
#include "FvPandaServer.h"
#include "FvPandaSpawnerServer.h"
#include "ZoneFvProperty.h"
#include "FvBrickPuzzleServer.h"
#include "FvConsoleLeftQuickbuild.h"
#include "FvConsoleRightQuickbuild.h"
#include "FvFacilityBrick.h"
#include "FvFacilityPipes.h"
#include "ImgBrickConsoleQB.h"
#include "ActParadoxPipeFix.h"
#include "FvNinjaGuard.h"
#include "FvPassThroughWall.h"
#include "FvBounceOverWall.h"
#include "FvFong.h"
#include "FvMaelstromGeyser.h"
#include "FvRaceDragon.h"
#include "FvRacePillarABCServer.h"
#include "FvRacePillarDServer.h"
#include "RaceFireballs.h"
#include "RaceShipLapColumnsServer.h"
// FB Scripts
#include "AgJetEffectServer.h"
#include "AgSalutingNpcs.h"
#include "BossSpiderQueenEnemyServer.h"
#include "RockHydrantSmashable.h"
// Misc Scripts
#include "ExplodingAsset.h"
#include "ActPlayerDeathTrigger.h"
#include "CrabServer.h"
#include "GrowingFlower.h"
#include "BaseFootRaceManager.h"
#include "PropertyPlatform.h"
#include "MailBoxServer.h"
#include "ActMine.h"
#include "FireFirstSkillonStartup.h"
// Racing Scripts
#include "RaceImagineCrateServer.h"
#include "ActVehicleDeathTrigger.h"
#include "RaceImaginePowerup.h"
#include "RaceMaelstromGeiser.h"
#include "FvRaceSmashEggImagineServer.h"
#include "RaceSmashServer.h"
#include "FvRacingColumns.h"
// NT Scripts
#include "NtSentinelWalkwayServer.h"
#include "NtParadoxTeleServer.h"
#include "NtDarkitectRevealServer.h"
#include "BankInteractServer.h"
#include "NtVentureSpeedPadServer.h"
#include "NtVentureCannonServer.h"
#include "NtCombatChallengeServer.h"
#include "NtCombatChallengeDummy.h"
#include "NtCombatChallengeExplodingDummy.h"
#include "BaseInteractDropLootServer.h"
#include "NtAssemblyTubeServer.h"
#include "NtParadoxPanelServer.h"
#include "TokenConsoleServer.h"
#include "NtImagBeamBuffer.h"
#include "NtBeamImaginationCollectors.h"
#include "NtDirtCloudServer.h"
#include "NtConsoleTeleportServer.h"
#include "SpawnShrakeServer.h"
#include "SpawnSaberCatServer.h"
#include "SpawnStegoServer.h"
#include "NtDukeServer.h"
#include "NtHaelServer.h"
#include "NtOverbuildServer.h"
#include "NtVandaServer.h"
#include "ForceVolumeServer.h"
#include "NtXRayServer.h"
#include "NtSleepingGuard.h"
#include "NtImagimeterVisibility.h"
#include "FrictionVolumeServer.h"
#include "NTPipeVisibilityServer.h"
#include "NTNaomiDirtServer.h"
#include "MinigameBlueMark.h"
#include "NtNaomiBreadcrumbServer.h"
// DLU Scripts
#include "DLUVanityTeleportingObject.h"
// AM Scripts
#include "AmConsoleTeleportServer.h"
#include "RandomSpawnerFin.h"
#include "RandomSpawnerPit.h"
#include "RandomSpawnerStr.h"
#include "RandomSpawnerZip.h"
#include "AmDarklingMech.h"
#include "AmBridge.h"
#include "AmDrawBridge.h"
#include "AmShieldGenerator.h"
#include "AmShieldGeneratorQuickbuild.h"
#include "AmDropshipComputer.h"
#include "AmScrollReaderServer.h"
#include "AmTemplateSkillVolume.h"
#include "EnemyNjBuff.h"
#include "AmSkeletonEngineer.h"
#include "AmSkullkinDrill.h"
#include "AmSkullkinDrillStand.h"
#include "AmSkullkinTower.h"
#include "AmDarklingDragon.h"
#include "AmBlueX.h"
#include "AmTeapotServer.h"
#include "WanderingVendor.h"
// NJ Scripts
#include "NjGarmadonCelebration.h"
#include "NjWuNPC.h"
#include "NjScrollChestServer.h"
#include "EnemySkeletonSpawner.h"
#include "NjRailSwitch.h"
#include "NjRailPostServer.h"
#include "NjRailActivatorsServer.h"
#include "NjColeNPC.h"
#include "NjNPCMissionSpinjitzuServer.h"
#include "NjJayMissionItems.h"
#include "FallingTile.h"
#include "ImaginationShrineServer.h"
#include "Lieutenant.h"
#include "RainOfArrows.h"
#include "NjIceRailActivator.h"
#include "CavePrisonCage.h"
#include "NjMonastryBossInstance.h"
#include "CatapultBouncerServer.h"
#include "CatapultBaseServer.h"
#include "NjhubLavaPlayerDeathTrigger.h"
#include "MonCoreNookDoors.h"
#include "MonCoreSmashableDoors.h"
#include "FlameJetServer.h"
#include "BurningTile.h"
#include "NjEarthDragonPetServer.h"
#include "NjEarthPetServer.h"
#include "NjDragonEmblemChestServer.h"
#include "NjNyaMissionitems.h"
// Scripted equipment
#include "AnvilOfArmor.h"
#include "CauldronOfLife.h"
#include "FountainOfImagination.h"
#include "Sunflower.h"
#include "BootyDigServer.h"
#include "PersonalFortress.h"
#include "PropertyDevice.h"
#include "ImaginationBackpackHealServer.h"
#include "LegoDieRoll.h"
#include "BuccaneerValiantShip.h"
#include "GemPack.h"
#include "ShardArmor.h"
#include "TeslaPack.h"
#include "StunImmunity.h"
// Survival scripts
#include "AgSurvivalStromling.h"
#include "AgSurvivalMech.h"
#include "AgSurvivalSpiderling.h"
// Frostburgh Scripts
#include "RockHydrantBroken.h"
#include "WhFans.h"
// WBL scripts
#include "WblGenericZone.h"
// Alpha Scripts
#include "TriggerGas.h"
#include "ActNinjaSensei.h"
// pickups
#include "SpecialCoinSpawner.h"
#include "SpecialPowerupSpawner.h"
#include "SpecialSpeedBuffSpawner.h"
// Wild Scripts
#include "WildAndScared.h"
#include "WildGfGlowbug.h"
#include "WildAmbientCrab.h"
#include "WildPants.h"
#include "WildNinjaStudent.h"
#include "WildNinjaSensei.h"
#include "WildNinjaBricks.h"
#include "VisToggleNotifierServer.h"
#include "LupGenericInteract.h"
#include "WblRobotCitizen.h"
#define CHECK_SCRIPT(scriptName, scriptType) do { \
auto* script = dynamic_cast<scriptType*>(CppScripts::GetScript(&entity, scriptName)); \
auto* oldScript = dynamic_cast<scriptType*>(CppScriptsOld::GetScript(&entity, scriptName)); \
ASSERT_NE(script, nullptr); \
ASSERT_NE(oldScript, nullptr); \
} while (0)
#define CHECK_CACHE(scriptName) do { \
ASSERT_EQ(CppScripts::GetScript(&entity, scriptName), CppScripts::GetScript(&entity, scriptName)); \
} while (0)
TEST(dScriptsTests, OldCppScriptsCheck) {
Entity entity(LWOOBJID_EMPTY, EntityInfo{});
CHECK_SCRIPT("scripts\\ai\\WILD\\L_LUP_generic_interact.lua", LupGenericInteract);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua", AgShipPlayerDeathTrigger);
CHECK_SCRIPT("scripts\\ai\\NP\\L_NPC_NP_SPACEMAN_BOB.lua", NpcNpSpacemanBob);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_SPACE_STUFF.lua", AgSpaceStuff);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_SHIP_PLAYER_SHOCK_SERVER.lua", AgShipPlayerShockServer);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_IMAG_SMASHABLE.lua", AgImagSmashable);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_STORY_BOX_INTERACT_SERVER.lua", StoryBoxInteractServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_BINOCULARS.lua", Binoculars);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_ALL_CRATE_CHICKEN.lua", AllCrateChicken);
CHECK_SCRIPT("scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_SMASHABLE.lua", RockHydrantSmashable);
CHECK_SCRIPT("scripts\\02_server\\Map\\SS\\L_SS_MODULAR_BUILD_SERVER.lua", SsModularBuildServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\Property\\AG_Small\\L_ZONE_AG_PROPERTY.lua", ZoneAgProperty);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_POI_MISSION.lua", InvalidScript);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_TOUCH_MISSION_UPDATE_SERVER.lua", TouchMissionUpdateServer);
CHECK_SCRIPT("scripts\\ai\\AG\\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua", ActSharkPlayerDeathTrigger);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_MECH.lua", BaseEnemyMech);
CHECK_SCRIPT("scripts\\zone\\AG\\L_ZONE_AG_SURVIVAL.lua", ZoneAgSurvival);
CHECK_SCRIPT("scripts\\02_server\\Objects\\L_BUFF_STATION_SERVER.lua", AgSurvivalBuffStation);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_BUS_DOOR.lua", AgBusDoor);
CHECK_SCRIPT("scripts\\02_server\\Equipment\\L_MAESTROM_EXTRACTICATOR_SERVER.lua", MaestromExtracticatorServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_AG_CAGED_BRICKS_SERVER.lua", AgCagedBricksServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_NPC_WISP_SERVER.lua", NpcWispServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_NPC_EPSILON_SERVER.lua", NpcEpsilonServer);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_TURRET.lua", AgTurret);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_TURRET_FOR_SHIP.lua", AgTurret);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_AG_LASER_SENSOR_SERVER.lua", AgLaserSensorServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_LASER_SERVER.lua", AgMonumentLaserServer);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_FANS.lua", AgFans);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_BIRDS.lua", AgMonumentBirds);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_REMOVE_RENTAL_GEAR.lua", RemoveRentalGear);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_NPC_NJ_ASSISTANT_SERVER.lua", NpcNjAssistantServer);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_SALUTING_NPCS.lua", AgSalutingNpcs);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_JET_EFFECT_SERVER.lua", AgJetEffectServer);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\AG\\L_BOSS_SPIDER_QUEEN_ENEMY_SERVER.lua", BossSpiderQueenEnemyServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\Property\\AG_Small\\L_ENEMY_SPIDER_SPAWNER.lua", EnemySpiderSpawner);
CHECK_SCRIPT("scripts/02_server/Map/Property/AG_Small/L_ENEMY_SPIDER_SPAWNER.lua", EnemySpiderSpawner);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_QB_Elevator.lua", AgQbElevator);
CHECK_SCRIPT("scripts\\ai\\PROPERTY\\AG\\L_AG_PROP_GUARD.lua", AgPropGuard);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_AG_BUGSPRAYER.lua", AgBugsprayer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_NPC_AG_COURSE_STARTER.lua", NpcAgCourseStarter);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_GOAL.lua", AgMonumentRaceGoal);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_CANCEL.lua", AgMonumentRaceCancel);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG_Spider_Queen\\L_ZONE_AG_SPIDER_QUEEN.lua", ZoneAgSpiderQueen);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG_Spider_Queen\\L_SPIDER_BOSS_TREASURE_CHEST_SERVER.lua", SpiderBossTreasureChestServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_NPC_COWBOY_SERVER.lua", NpcCowboyServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\Property\\AG_Med\\L_ZONE_AG_MED_PROPERTY.lua", ZoneAgMedProperty);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_STROMBIE_PROPERTY.lua", AgStromlingProperty);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_DARKLING_MECH.lua", BaseEnemyMech);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_DARK_SPIDERLING.lua", AgDarkSpiderling);
CHECK_SCRIPT("scripts\\ai\\PROPERTY\\L_PROP_GUARDS.lua", AgPropguards);
CHECK_SCRIPT("scripts\\ai\\PROPERTY\\L_PROPERTY_FX_DAMAGE.lua", PropertyFXDamage);
CHECK_SCRIPT("scripts\\02_server\\Map\\AG\\L_NPC_PIRATE_SERVER.lua", NpcPirateServer);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_PICNIC_BLANKET.lua", AgPicnicBlanket);
CHECK_SCRIPT("scripts\\02_server\\Map\\Property\\L_PROPERTY_BANK_INTERACT_SERVER.lua", PropertyBankInteract);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\VE\\L_VE_MECH.lua", VeMech);
CHECK_SCRIPT("scripts\\02_server\\Map\\VE\\L_MISSION_CONSOLE_SERVER.lua", VeMissionConsole);
CHECK_SCRIPT("scripts\\02_server\\Map\\VE\\L_EPSILON_SERVER.lua", VeEpsilonServer);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_MODULAR_BUILD.lua", NsModularBuild);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_GET_FACTION_MISSION_SERVER.lua", NsGetFactionMissionServer);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_QB_IMAGINATION_STATUE.lua", NsQbImaginationStatue);
CHECK_SCRIPT("scripts\\02_server\\Map\\NS\\CONCERT_CHOICEBUILD_MANAGER_SERVER.lua", NsConcertChoiceBuildManager);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_CONCERT_CHOICEBUILD.lua", NsConcertChoiceBuild);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_CONCERT_QUICKBUILD.lua", NsConcertQuickBuild);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_STAGE_PLATFORMS.lua", AgStagePlatforms);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_CONCERT_INSTRUMENT_QB.lua", NsConcertInstrument);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_JONNY_FLAG_MISSION_SERVER.lua", NsJohnnyMissionServer);
CHECK_SCRIPT("scripts\\02_server\\Objects\\L_STINKY_FISH_TARGET.lua", StinkyFishTarget);
CHECK_SCRIPT("scripts\\zone\\PROPERTY\\NS\\L_ZONE_NS_PROPERTY.lua", ZoneNsProperty);
CHECK_SCRIPT("scripts\\02_server\\Map\\Property\\NS_Med\\L_ZONE_NS_MED_PROPERTY.lua", ZoneNsMedProperty);
CHECK_SCRIPT("scripts\\02_server\\Map\\NS\\L_NS_TOKEN_CONSOLE_SERVER.lua", NsTokenConsoleServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NS\\L_NS_LUP_TELEPORT.lua", NsLupTeleport);
CHECK_SCRIPT("scripts\\02_server\\Map\\NS\\Waves\\L_ZONE_NS_WAVES.lua", ZoneNsWaves);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HAMMERLING_ENEMY_SERVER.lua", WaveBossHammerling);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_APE_ENEMY_SERVER.lua", WaveBossApe);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_DARK_SPIDERLING_ENEMY_SERVER.lua", WaveBossSpiderling);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HORESEMEN_ENEMY_SERVER.lua", WaveBossHorsemen);
CHECK_SCRIPT("scripts\\02_server\\Minigame\\General\\L_MINIGAME_TREASURE_CHEST_SERVER.lua", MinigameTreasureChestServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NS\\L_NS_LEGO_CLUB_DOOR.lua", NsLegoClubDoor);
CHECK_SCRIPT("scripts/ai/NS/L_CL_RING.lua", ClRing);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_AMBIENTS.lua", WildAmbients);
CHECK_SCRIPT("scripts\\ai\\NS\\NS_PP_01\\L_NS_PP_01_TELEPORT.lua", PropertyDeathPlane);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_QB_SPAWNER.lua", QbSpawner);
CHECK_SCRIPT("scripts\\ai\\AG\\L_AG_QB_Wall.lua", AgQbWall);
CHECK_SCRIPT("scripts\\02_server\\Map\\GF\\L_GF_TORCH.lua", GfTikiTorch);
CHECK_SCRIPT("scripts\\ai\\GF\\L_SPECIAL_FIREPIT.lua", GfCampfire);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_ORGAN.lua", GfOrgan);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_BANANA.lua", GfBanana);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_BANANA_CLUSTER.lua", GfBananaCluster);
CHECK_SCRIPT("scripts/ai/GF/L_GF_JAILKEEP_MISSION.lua", GfJailkeepMission);
CHECK_SCRIPT("scripts\\ai\\GF\\L_TRIGGER_AMBUSH.lua", TriggerAmbush);
CHECK_SCRIPT("scripts\\02_server\\Map\\GF\\L_GF_CAPTAINS_CANNON.lua", GfCaptainsCannon);
CHECK_SCRIPT("scripts\\02_server\\Map\\GF\\L_MAST_TELEPORT.lua", MastTeleport);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_JAIL_WALLS.lua", GfJailWalls);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_QB_ENEMY_STUNNER.lua", QbEnemyStunner);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_PET_DIG_BUILD.lua", PetDigBuild);
CHECK_SCRIPT("scripts\\02_server\\Map\\GF\\L_SPAWN_LION_SERVER.lua", SpawnLionServer);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_APE.lua", BaseEnemyApe);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\General\\L_GF_APE_SMASHING_QB.lua", GfApeSmashingQB);
CHECK_SCRIPT("scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua", ZoneGfProperty);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_ARCHWAY.lua", GfArchway);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_MAELSTROM_GEYSER.lua", GfMaelstromGeyser);
CHECK_SCRIPT("scripts\\ai\\GF\\L_PIRATE_REP.lua", PirateRep);
CHECK_SCRIPT("scripts\\ai\\GF\\L_GF_PARROT_CRASH.lua", GfParrotCrash);
CHECK_SCRIPT("scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua", SGCannon);
CHECK_SCRIPT("scripts\\ai\\MINIGAME\\SG_GF\\L_ZONE_SG_SERVER.lua", ZoneSGServer);
CHECK_SCRIPT("scripts\\client\\ai\\PR\\L_PR_WHISTLE.lua", PrWhistle);
CHECK_SCRIPT("scripts\\02_server\\Map\\PR\\L_PR_SEAGULL_FLY.lua", PrSeagullFly);
CHECK_SCRIPT("scripts\\ai\\PETS\\L_HYDRANT_SMASHABLE.lua", HydrantSmashable);
CHECK_SCRIPT("scripts\\02_server\\map\\PR\\L_HYDRANT_BROKEN.lua", HydrantBroken);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\PET_DIG_SERVER.lua", PetDigServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua", PetDigServer);
CHECK_SCRIPT("scripts\\client\\ai\\PR\\L_CRAB_SERVER.lua", CrabServer);
CHECK_SCRIPT("scripts\\02_server\\Pets\\L_PET_FROM_DIG_SERVER.lua", PetFromDigServer);
CHECK_SCRIPT("scripts\\02_server\\Pets\\L_PET_FROM_OBJECT_SERVER.lua", PetFromObjectServer);
CHECK_SCRIPT("scripts\\02_server\\Pets\\L_DAMAGING_PET.lua", DamagingPets);
CHECK_SCRIPT("scripts\\02_server\\Map\\PR\\L_SPAWN_GRYPHON_SERVER.lua", SpawnGryphonServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\L_ACT_CANDLE.lua", FvCandle);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\L_ENEMY_RONIN_SPAWNER.lua", EnemyRoninSpawner);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_CAVALRY.lua", FvMaelstromCavalry);
CHECK_SCRIPT("scripts\\ai\\FV\\L_ACT_NINJA_TURRET_1.lua", ActNinjaTurret);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\L_FV_HORSEMEN_TRIGGER.lua", FvHorsemenTrigger);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_FLYING_CREVICE_DRAGON.lua", FvFlyingCreviceDragon);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_DRAGON.lua", FvMaelstromDragon);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_DRAGON_SMASHING_GOLEM_QB.lua", FvDragonSmashingGolemQb);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\General\\L_TREASURE_CHEST_DRAGON_SERVER.lua", TreasureChestDragonServer);
CHECK_SCRIPT("scripts\\ai\\GENERAL\\L_INSTANCE_EXIT_TRANSFER_PLAYER_TO_LAST_NON_INSTANCE.lua", InstanceExitTransferPlayerToLastNonInstance);
CHECK_SCRIPT("scripts\\ai\\FV\\L_NPC_FREE_GF_NINJAS.lua", FvFreeGfNinjas);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_PANDA_SPAWNER_SERVER.lua", FvPandaSpawnerServer);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_PANDA_SERVER.lua", FvPandaServer);
CHECK_SCRIPT("scripts\\zone\\PROPERTY\\FV\\L_ZONE_FV_PROPERTY.lua", ZoneFvProperty);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_BRICK_PUZZLE_SERVER.lua", FvBrickPuzzleServer);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_CONSOLE_LEFT_QUICKBUILD.lua", FvConsoleLeftQuickbuild);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_CONSOLE_RIGHT_QUICKBUILD.lua", FvConsoleRightQuickbuild);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua", FvFacilityBrick);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua", FvFacilityPipes);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua", ImgBrickConsoleQB);
CHECK_SCRIPT("scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua", ActParadoxPipeFix);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua", FvNinjaGuard);
CHECK_SCRIPT("scripts\\ai\\FV\\L_ACT_PASS_THROUGH_WALL.lua", FvPassThroughWall);
CHECK_SCRIPT("scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua", FvBounceOverWall);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\L_NPC_FONG.lua", FvFong);
CHECK_SCRIPT("scripts\\ai\\FV\\L_FV_MAELSTROM_GEYSER.lua", FvMaelstromGeyser);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\Racing\\RACE_SHIP_LAP_COLUMNS_SERVER.lua", RaceShipLapColumnsServer);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP1_SERVER.lua", FvRaceDragon);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP2_SERVER.lua", FvRaceDragon);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP3_SERVER.lua", FvRaceDragon);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_ABC_SERVER.lua", FvRacePillarABCServer);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_D_SERVER.lua", FvRacePillarDServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\Racing\\RACE_FIREBALLS.lua", RaceFireballs);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_EXPLODING_ASSET.lua", ExplodingAsset);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_WISHING_WELL_SERVER.lua", WishingWellServer);
CHECK_SCRIPT("scripts\\ai\\ACT\\L_ACT_PLAYER_DEATH_TRIGGER.lua", ActPlayerDeathTrigger);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_GROWING_FLOWER_SERVER.lua", GrowingFlower);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_TOKEN_CONSOLE_SERVER.lua", TokenConsoleServer);
CHECK_SCRIPT("scripts\\ai\\ACT\\FootRace\\L_ACT_BASE_FOOT_RACE.lua", BaseFootRaceManager);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_PROP_PLATFORM.lua", PropertyPlatform);
CHECK_SCRIPT("scripts\\02_server\\Map\\VE\\L_VE_BRICKSAMPLE_SERVER.lua", VeBricksampleServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_MAIL_BOX_SERVER.lua", MailBoxServer);
CHECK_SCRIPT("scripts\\ai\\ACT\\L_ACT_MINE.lua", ActMine);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_WANDERING_VENDOR.lua", WanderingVendor);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_CRATE_SERVER.lua", RaceImagineCrateServer);
CHECK_SCRIPT("scripts\\ai\\ACT\\L_ACT_VEHICLE_DEATH_TRIGGER.lua", ActVehicleDeathTrigger);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_POWERUP.lua", RaceImaginePowerup);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\Racing\\RACE_MAELSTROM_GEISER.lua", RaceMaelstromGeiser);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_SMASH_EGG_IMAGINE_SERVER.lua", FvRaceSmashEggImagineServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\FV\\Racing\\FV_RACING_COLUMNS.lua", FvRacingColumns);
CHECK_SCRIPT("scripts\\ai\\RACING\\OBJECTS\\RACE_SMASH_SERVER.lua", RaceSmashServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_SENTINELWALKWAY_SERVER.lua", NtSentinelWalkwayServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_PARADOXTELE_SERVER.lua", NtParadoxTeleServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_DARKITECT_REVEAL_SERVER.lua", NtDarkitectRevealServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_BANK_INTERACT_SERVER.lua", BankInteractServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_VENTURESPEEDPAD_SERVER.lua", NtVentureSpeedPadServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_VENTURE_CANNON_SERVER.lua", NtVentureCannonServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_SERVER.lua", NtCombatChallengeServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_DUMMY.lua", NtCombatChallengeDummy);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\\\L_NT_COMBAT_EXPLODING_TARGET.lua", NtCombatChallengeExplodingDummy);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_BASE_INTERACT_DROP_LOOT_SERVER.lua", BaseInteractDropLootServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_ASSEMBLYTUBE_SERVER.lua", NtAssemblyTubeServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_PARADOX_PANEL_SERVER.lua", NtParadoxPanelServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_IMAG_BEAM_BUFFER.lua", NtImagBeamBuffer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_BEAM_IMAGINATION_COLLECTORS.lua", NtBeamImaginationCollectors);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_DIRT_CLOUD_SERVER.lua", NtDirtCloudServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_CONSOLE_TELEPORT_SERVER.lua", NtConsoleTeleportServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_SPAWN_STEGO_SERVER.lua", SpawnStegoServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_SPAWN_SABERCAT_SERVER.lua", SpawnSaberCatServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_SPAWN_SHRAKE_SERVER.lua", SpawnShrakeServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_DUKE_SERVER.lua", NtDukeServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_HAEL_SERVER.lua", NtHaelServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_FACTION_SPY_SERVER.lua", NtFactionSpyServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_OVERBUILD_SERVER.lua", NtOverbuildServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_VANDA_SERVER.lua", NtVandaServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_FORCE_VOLUME_SERVER.lua", ForceVolumeServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_FRICTION_VOLUME_SERVER.lua", FrictionVolumeServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_XRAY_SERVER.lua", NtXRayServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua", NtSleepingGuard);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua", NTImagimeterVisibility);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_PIPE_VISIBILITY_SERVER.lua", NTPipeVisibilityServer);
CHECK_SCRIPT("scripts\\ai\\MINIGAME\\Objects\\MINIGAME_BLUE_MARK.lua", MinigameBlueMark);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_NAOMI_BREADCRUMB_SERVER.lua", NtNaomiBreadcrumbServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\NT\\L_NT_NAOMI_DIRT_SERVER.lua", NTNaomiDirtServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua", AmConsoleTeleportServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_FIN.lua", RandomSpawnerFin);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_PIT.lua", RandomSpawnerPit);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_STR.lua", RandomSpawnerStr);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_ZIP.lua", RandomSpawnerZip);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_MECH.lua", AmDarklingMech);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_BRIDGE.lua", AmBridge);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_DRAW_BRIDGE.lua", AmDrawBridge);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR.lua", AmShieldGenerator);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR_QUICKBUILD.lua", AmShieldGeneratorQuickbuild);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_DROPSHIP_COMPUTER.lua", AmDropshipComputer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SCROLL_READER_SERVER.lua", AmScrollReaderServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_TEMPLE_SKILL_VOLUME.lua", AmTemplateSkillVolume);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF.lua", EnemyNjBuff);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\AM\\L_AM_SKELETON_ENGINEER.lua", AmSkeletonEngineer);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL.lua", AmSkullkinDrill);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL_STAND.lua", AmSkullkinDrillStand);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_SKULLKIN_TOWER.lua", AmSkullkinTower);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\AM\\L_AM_NAMED_DARKLING_DRAGON.lua", AmDarklingDragon);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_APE.lua", BaseEnemyApe);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_BLUE_X.lua", AmBlueX);
CHECK_SCRIPT("scripts\\02_server\\Map\\AM\\L_TEAPOT_SERVER.lua", AmTeapotServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua", NjGarmadonCelebration);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_WU_NPC.lua", NjWuNPC);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_SCROLL_CHEST_SERVER.lua", NjScrollChestServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_COLE_NPC.lua", NjColeNPC);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_JAY_MISSION_ITEMS.lua", NjJayMissionItems);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_NPC_MISSION_SPINJITZU_SERVER.lua", NjNPCMissionSpinjitzuServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_ENEMY_SKELETON_SPAWNER.lua", EnemySkeletonSpawner);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_NJ_RAIL_SWITCH.lua", NjRailSwitch);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_ACTIVATORS_SERVER.lua", NjRailActivatorsServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_POST_SERVER.lua", NjRailPostServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\Ninjago\\L_ICE_RAIL_ACTIVATOR_SERVER.lua", NjIceRailActivator);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_FALLING_TILE.lua", FallingTile);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF_STUN_IMMUNITY.lua", EnemyNjBuff);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_IMAGINATION_SHRINE_SERVER.lua", ImaginationShrineServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_LIEUTENANT.lua", Lieutenant);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_RAIN_OF_ARROWS.lua", RainOfArrows);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_CAVE_PRISON_CAGE.lua", CavePrisonCage);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\boss_instance\\L_MONASTERY_BOSS_INSTANCE_SERVER.lua", NjMonastryBossInstance);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_CATAPULT_BOUNCER_SERVER.lua", CatapultBouncerServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_CATAPULT_BASE_SERVER.lua", CatapultBaseServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\Ninjago\\L_NJHUB_LAVA_PLAYER_DEATH_TRIGGER.lua", NjhubLavaPlayerDeathTrigger);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_MON_CORE_NOOK_DOORS.lua", MonCoreNookDoors);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua", MonCoreSmashableDoors);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua", MonCoreSmashableDoors);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_FLAME_JET_SERVER.lua", FlameJetServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_BURNING_TILE.lua", BurningTile);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_SPAWN_EARTH_PET_SERVER.lua", NjEarthDragonPetServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_EARTH_PET_SERVER.lua", NjEarthPetServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_DRAGON_EMBLEM_CHEST_SERVER.lua", NjDragonEmblemChestServer);
CHECK_SCRIPT("scripts\\02_server\\Map\\njhub\\L_NYA_MISSION_ITEMS.lua", NjNyaMissionitems);
CHECK_SCRIPT("scripts\\02_server\\DLU\\DLUVanityTeleportingObject.lua", DLUVanityTeleportingObject);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_STROMBIE.lua", AgSurvivalStromling);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARKLING_MECH.lua", AgSurvivalMech);
CHECK_SCRIPT("scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARK_SPIDERLING.lua", AgSurvivalSpiderling);
CHECK_SCRIPT("scripts\\EquipmentScripts\\Sunflower.lua", Sunflower);
CHECK_SCRIPT("scripts/EquipmentScripts/AnvilOfArmor.lua", AnvilOfArmor);
CHECK_SCRIPT("scripts/EquipmentScripts/FountainOfImagination.lua", FountainOfImagination);
CHECK_SCRIPT("scripts/EquipmentScripts/CauldronOfLife.lua", CauldronOfLife);
CHECK_SCRIPT("scripts\\02_server\\Equipment\\L_BOOTYDIG_SERVER.lua", BootyDigServer);
CHECK_SCRIPT("scripts\\EquipmentScripts\\PersonalFortress.lua", PersonalFortress);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_PROPERTY_DEVICE.lua", PropertyDevice);
CHECK_SCRIPT("scripts\\02_server\\Map\\General\\L_IMAG_BACKPACK_HEALS_SERVER.lua", ImaginationBackpackHealServer);
CHECK_SCRIPT("scripts\\ai\\GENERAL\\L_LEGO_DIE_ROLL.lua", LegoDieRoll);
CHECK_SCRIPT("scripts\\EquipmentScripts\\BuccaneerValiantShip.lua", BuccaneerValiantShip);
CHECK_SCRIPT("scripts\\EquipmentScripts\\FireFirstSkillonStartup.lua", FireFirstSkillonStartup);
CHECK_SCRIPT("scripts\\equipmenttriggers\\gempack.lua", GemPack);
CHECK_SCRIPT("scripts\\equipmenttriggers\\shardarmor.lua", ShardArmor);
CHECK_SCRIPT("scripts\\equipmenttriggers\\coilbackpack.lua", TeslaPack);
CHECK_SCRIPT("scripts\\EquipmentScripts\\stunImmunity.lua", StunImmunity);
CHECK_SCRIPT("scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_BROKEN.lua", RockHydrantBroken);
CHECK_SCRIPT("scripts\\ai\\NS\\L_NS_WH_FANS.lua", WhFans);
CHECK_SCRIPT("scripts\\zone\\LUPs\\WBL_generic_zone.lua", WblGenericZone);
CHECK_SCRIPT("scripts\\ai\\FV\\L_TRIGGER_GAS.lua", TriggerGas);
CHECK_SCRIPT("scripts\\ai\\FV\\L_ACT_NINJA_SENSEI.lua", ActNinjaSensei);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_1_BRONZE-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_1_SILVER-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_10_BRONZE-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_10_GOLD-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_10_SILVER-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_25_BRONZE-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_25_GOLD-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_25_SILVER-COIN-SPAWNER.lua", SpecialCoinSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER.lua", SpecialPowerupSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER-2PT.lua", SpecialPowerupSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_LIFE-POWERUP-SPAWNER.lua", SpecialPowerupSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_ARMOR-POWERUP-SPAWNER.lua", SpecialPowerupSpawner);
CHECK_SCRIPT("scripts\\ai\\SPEC\\L_SPECIAL_SPEED_BUFF_SPAWNER.lua", SpecialSpeedBuffSpawner);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_GF_RAT.lua", WildAndScared);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_GF_SNAIL.lua", WildAndScared);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_GF_GLOWBUG.lua", WildGfGlowbug);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_AMBIENT_CRAB.lua", WildAmbientCrab);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_PANTS.lua", WildPants);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_NINJA_BRICKS.lua", WildNinjaBricks);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_NINJA_STUDENT.lua", WildNinjaStudent);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_WILD_NINJA_SENSEI.lua", WildNinjaSensei);
CHECK_SCRIPT("scripts\\ai\\WILD\\L_LUP_generic_interact.lua", LupGenericInteract);
}
TEST(dScriptsTests, CacheCheck) {
Entity entity(LWOOBJID_EMPTY, EntityInfo{});
CHECK_CACHE("scripts\\ai\\WILD\\L_LUP_generic_interact.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua");
CHECK_CACHE("scripts\\ai\\NP\\L_NPC_NP_SPACEMAN_BOB.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_SPACE_STUFF.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_SHIP_PLAYER_SHOCK_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_IMAG_SMASHABLE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_STORY_BOX_INTERACT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_BINOCULARS.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_ALL_CRATE_CHICKEN.lua");
CHECK_CACHE("scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_SMASHABLE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\SS\\L_SS_MODULAR_BUILD_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\Property\\AG_Small\\L_ZONE_AG_PROPERTY.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_POI_MISSION.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_TOUCH_MISSION_UPDATE_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_MECH.lua");
CHECK_CACHE("scripts\\zone\\AG\\L_ZONE_AG_SURVIVAL.lua");
CHECK_CACHE("scripts\\02_server\\Objects\\L_BUFF_STATION_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_BUS_DOOR.lua");
CHECK_CACHE("scripts\\02_server\\Equipment\\L_MAESTROM_EXTRACTICATOR_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_AG_CAGED_BRICKS_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_NPC_WISP_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_NPC_EPSILON_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_TURRET.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_TURRET_FOR_SHIP.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_AG_LASER_SENSOR_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_LASER_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_FANS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_BIRDS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_REMOVE_RENTAL_GEAR.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_NPC_NJ_ASSISTANT_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_SALUTING_NPCS.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_JET_EFFECT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\AG\\L_BOSS_SPIDER_QUEEN_ENEMY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\Property\\AG_Small\\L_ENEMY_SPIDER_SPAWNER.lua");
CHECK_CACHE("scripts/02_server/Map/Property/AG_Small/L_ENEMY_SPIDER_SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_QB_Elevator.lua");
CHECK_CACHE("scripts\\ai\\PROPERTY\\AG\\L_AG_PROP_GUARD.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_AG_BUGSPRAYER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_NPC_AG_COURSE_STARTER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_GOAL.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_CANCEL.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG_Spider_Queen\\L_ZONE_AG_SPIDER_QUEEN.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG_Spider_Queen\\L_SPIDER_BOSS_TREASURE_CHEST_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_NPC_COWBOY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\Property\\AG_Med\\L_ZONE_AG_MED_PROPERTY.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_STROMBIE_PROPERTY.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_DARKLING_MECH.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_DARK_SPIDERLING.lua");
CHECK_CACHE("scripts\\ai\\PROPERTY\\L_PROP_GUARDS.lua");
CHECK_CACHE("scripts\\ai\\PROPERTY\\L_PROPERTY_FX_DAMAGE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AG\\L_NPC_PIRATE_SERVER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_PICNIC_BLANKET.lua");
CHECK_CACHE("scripts\\02_server\\Map\\Property\\L_PROPERTY_BANK_INTERACT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\VE\\L_VE_MECH.lua");
CHECK_CACHE("scripts\\02_server\\Map\\VE\\L_MISSION_CONSOLE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\VE\\L_EPSILON_SERVER.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_MODULAR_BUILD.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_GET_FACTION_MISSION_SERVER.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_QB_IMAGINATION_STATUE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NS\\CONCERT_CHOICEBUILD_MANAGER_SERVER.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_CONCERT_CHOICEBUILD.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_CONCERT_QUICKBUILD.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_STAGE_PLATFORMS.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_CONCERT_INSTRUMENT_QB.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_JONNY_FLAG_MISSION_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Objects\\L_STINKY_FISH_TARGET.lua");
CHECK_CACHE("scripts\\zone\\PROPERTY\\NS\\L_ZONE_NS_PROPERTY.lua");
CHECK_CACHE("scripts\\02_server\\Map\\Property\\NS_Med\\L_ZONE_NS_MED_PROPERTY.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NS\\L_NS_TOKEN_CONSOLE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NS\\L_NS_LUP_TELEPORT.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NS\\Waves\\L_ZONE_NS_WAVES.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HAMMERLING_ENEMY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_APE_ENEMY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_DARK_SPIDERLING_ENEMY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HORESEMEN_ENEMY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Minigame\\General\\L_MINIGAME_TREASURE_CHEST_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NS\\L_NS_LEGO_CLUB_DOOR.lua");
CHECK_CACHE("scripts/ai/NS/L_CL_RING.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_AMBIENTS.lua");
CHECK_CACHE("scripts\\ai\\NS\\NS_PP_01\\L_NS_PP_01_TELEPORT.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_QB_SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\AG\\L_AG_QB_Wall.lua");
CHECK_CACHE("scripts\\02_server\\Map\\GF\\L_GF_TORCH.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_SPECIAL_FIREPIT.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_ORGAN.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_BANANA.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_BANANA_CLUSTER.lua");
CHECK_CACHE("scripts/ai/GF/L_GF_JAILKEEP_MISSION.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_TRIGGER_AMBUSH.lua");
CHECK_CACHE("scripts\\02_server\\Map\\GF\\L_GF_CAPTAINS_CANNON.lua");
CHECK_CACHE("scripts\\02_server\\Map\\GF\\L_MAST_TELEPORT.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_JAIL_WALLS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_QB_ENEMY_STUNNER.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_PET_DIG_BUILD.lua");
CHECK_CACHE("scripts\\02_server\\Map\\GF\\L_SPAWN_LION_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_APE.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\General\\L_GF_APE_SMASHING_QB.lua");
CHECK_CACHE("scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_ARCHWAY.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_MAELSTROM_GEYSER.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_PIRATE_REP.lua");
CHECK_CACHE("scripts\\ai\\GF\\L_GF_PARROT_CRASH.lua");
CHECK_CACHE("scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua");
CHECK_CACHE("scripts\\ai\\MINIGAME\\SG_GF\\L_ZONE_SG_SERVER.lua");
CHECK_CACHE("scripts\\client\\ai\\PR\\L_PR_WHISTLE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\PR\\L_PR_SEAGULL_FLY.lua");
CHECK_CACHE("scripts\\ai\\PETS\\L_HYDRANT_SMASHABLE.lua");
CHECK_CACHE("scripts\\02_server\\map\\PR\\L_HYDRANT_BROKEN.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\PET_DIG_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua");
CHECK_CACHE("scripts\\client\\ai\\PR\\L_CRAB_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Pets\\L_PET_FROM_DIG_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Pets\\L_PET_FROM_OBJECT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Pets\\L_DAMAGING_PET.lua");
CHECK_CACHE("scripts\\02_server\\Map\\PR\\L_SPAWN_GRYPHON_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\L_ACT_CANDLE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\L_ENEMY_RONIN_SPAWNER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_CAVALRY.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_ACT_NINJA_TURRET_1.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\L_FV_HORSEMEN_TRIGGER.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_FLYING_CREVICE_DRAGON.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_DRAGON.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_DRAGON_SMASHING_GOLEM_QB.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\General\\L_TREASURE_CHEST_DRAGON_SERVER.lua");
CHECK_CACHE("scripts\\ai\\GENERAL\\L_INSTANCE_EXIT_TRANSFER_PLAYER_TO_LAST_NON_INSTANCE.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_NPC_FREE_GF_NINJAS.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_PANDA_SPAWNER_SERVER.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_PANDA_SERVER.lua");
CHECK_CACHE("scripts\\zone\\PROPERTY\\FV\\L_ZONE_FV_PROPERTY.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_BRICK_PUZZLE_SERVER.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_CONSOLE_LEFT_QUICKBUILD.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_CONSOLE_RIGHT_QUICKBUILD.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_ACT_PASS_THROUGH_WALL.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\L_NPC_FONG.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_FV_MAELSTROM_GEYSER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\Racing\\RACE_SHIP_LAP_COLUMNS_SERVER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP1_SERVER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP2_SERVER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP3_SERVER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_ABC_SERVER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_D_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\Racing\\RACE_FIREBALLS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_EXPLODING_ASSET.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_WISHING_WELL_SERVER.lua");
CHECK_CACHE("scripts\\ai\\ACT\\L_ACT_PLAYER_DEATH_TRIGGER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_GROWING_FLOWER_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_TOKEN_CONSOLE_SERVER.lua");
CHECK_CACHE("scripts\\ai\\ACT\\FootRace\\L_ACT_BASE_FOOT_RACE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_PROP_PLATFORM.lua");
CHECK_CACHE("scripts\\02_server\\Map\\VE\\L_VE_BRICKSAMPLE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_MAIL_BOX_SERVER.lua");
CHECK_CACHE("scripts\\ai\\ACT\\L_ACT_MINE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_WANDERING_VENDOR.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_CRATE_SERVER.lua");
CHECK_CACHE("scripts\\ai\\ACT\\L_ACT_VEHICLE_DEATH_TRIGGER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_POWERUP.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\Racing\\RACE_MAELSTROM_GEISER.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\FV_RACE_SMASH_EGG_IMAGINE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\FV\\Racing\\FV_RACING_COLUMNS.lua");
CHECK_CACHE("scripts\\ai\\RACING\\OBJECTS\\RACE_SMASH_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_SENTINELWALKWAY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_PARADOXTELE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_DARKITECT_REVEAL_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_BANK_INTERACT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_VENTURESPEEDPAD_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_VENTURE_CANNON_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_DUMMY.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\\\L_NT_COMBAT_EXPLODING_TARGET.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_BASE_INTERACT_DROP_LOOT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_ASSEMBLYTUBE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_PARADOX_PANEL_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_IMAG_BEAM_BUFFER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_BEAM_IMAGINATION_COLLECTORS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_DIRT_CLOUD_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_CONSOLE_TELEPORT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_SPAWN_STEGO_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_SPAWN_SABERCAT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_SPAWN_SHRAKE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_DUKE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_HAEL_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_FACTION_SPY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_OVERBUILD_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_VANDA_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_FORCE_VOLUME_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_FRICTION_VOLUME_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_XRAY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_PIPE_VISIBILITY_SERVER.lua");
CHECK_CACHE("scripts\\ai\\MINIGAME\\Objects\\MINIGAME_BLUE_MARK.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_NAOMI_BREADCRUMB_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\NT\\L_NT_NAOMI_DIRT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_FIN.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_PIT.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_STR.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_ZIP.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_MECH.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_BRIDGE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_DRAW_BRIDGE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR_QUICKBUILD.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_DROPSHIP_COMPUTER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SCROLL_READER_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_TEMPLE_SKILL_VOLUME.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\AM\\L_AM_SKELETON_ENGINEER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL_STAND.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_SKULLKIN_TOWER.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\AM\\L_AM_NAMED_DARKLING_DRAGON.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_APE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_BLUE_X.lua");
CHECK_CACHE("scripts\\02_server\\Map\\AM\\L_TEAPOT_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_WU_NPC.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_SCROLL_CHEST_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_COLE_NPC.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_JAY_MISSION_ITEMS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_NPC_MISSION_SPINJITZU_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_ENEMY_SKELETON_SPAWNER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_NJ_RAIL_SWITCH.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_ACTIVATORS_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_POST_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\Ninjago\\L_ICE_RAIL_ACTIVATOR_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_FALLING_TILE.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF_STUN_IMMUNITY.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_IMAGINATION_SHRINE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_LIEUTENANT.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_RAIN_OF_ARROWS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_CAVE_PRISON_CAGE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\boss_instance\\L_MONASTERY_BOSS_INSTANCE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_CATAPULT_BOUNCER_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_CATAPULT_BASE_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\Ninjago\\L_NJHUB_LAVA_PLAYER_DEATH_TRIGGER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_MON_CORE_NOOK_DOORS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_FLAME_JET_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_BURNING_TILE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_SPAWN_EARTH_PET_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_EARTH_PET_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_DRAGON_EMBLEM_CHEST_SERVER.lua");
CHECK_CACHE("scripts\\02_server\\Map\\njhub\\L_NYA_MISSION_ITEMS.lua");
CHECK_CACHE("scripts\\02_server\\DLU\\DLUVanityTeleportingObject.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_STROMBIE.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARKLING_MECH.lua");
CHECK_CACHE("scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARK_SPIDERLING.lua");
CHECK_CACHE("scripts\\EquipmentScripts\\Sunflower.lua");
CHECK_CACHE("scripts/EquipmentScripts/AnvilOfArmor.lua");
CHECK_CACHE("scripts/EquipmentScripts/FountainOfImagination.lua");
CHECK_CACHE("scripts/EquipmentScripts/CauldronOfLife.lua");
CHECK_CACHE("scripts\\02_server\\Equipment\\L_BOOTYDIG_SERVER.lua");
CHECK_CACHE("scripts\\EquipmentScripts\\PersonalFortress.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_PROPERTY_DEVICE.lua");
CHECK_CACHE("scripts\\02_server\\Map\\General\\L_IMAG_BACKPACK_HEALS_SERVER.lua");
CHECK_CACHE("scripts\\ai\\GENERAL\\L_LEGO_DIE_ROLL.lua");
CHECK_CACHE("scripts\\EquipmentScripts\\BuccaneerValiantShip.lua");
CHECK_CACHE("scripts\\EquipmentScripts\\FireFirstSkillonStartup.lua");
CHECK_CACHE("scripts\\equipmenttriggers\\gempack.lua");
CHECK_CACHE("scripts\\equipmenttriggers\\shardarmor.lua");
CHECK_CACHE("scripts\\equipmenttriggers\\coilbackpack.lua");
CHECK_CACHE("scripts\\EquipmentScripts\\stunImmunity.lua");
CHECK_CACHE("scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_BROKEN.lua");
CHECK_CACHE("scripts\\ai\\NS\\L_NS_WH_FANS.lua");
CHECK_CACHE("scripts\\zone\\LUPs\\WBL_generic_zone.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_TRIGGER_GAS.lua");
CHECK_CACHE("scripts\\ai\\FV\\L_ACT_NINJA_SENSEI.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_1_BRONZE-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_1_SILVER-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_10_BRONZE-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_10_GOLD-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_10_SILVER-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_25_BRONZE-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_25_GOLD-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_25_SILVER-COIN-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER-2PT.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_LIFE-POWERUP-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_ARMOR-POWERUP-SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\SPEC\\L_SPECIAL_SPEED_BUFF_SPAWNER.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_GF_RAT.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_GF_SNAIL.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_GF_GLOWBUG.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_AMBIENT_CRAB.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_PANTS.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_NINJA_BRICKS.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_NINJA_STUDENT.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_WILD_NINJA_SENSEI.lua");
CHECK_CACHE("scripts\\ai\\WILD\\L_LUP_generic_interact.lua");
}

View File

@@ -23,6 +23,11 @@ if(NOT WIN32)
target_include_directories(bcrypt PRIVATE "libbcrypt/include/bcrypt")
endif()
# Need to define this on Clang and GNU for 'strdup' support
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
target_compile_definitions(bcrypt PRIVATE "_POSIX_C_SOURCE=200809L")
endif()
target_include_directories(bcrypt INTERFACE "libbcrypt/include")
target_include_directories(bcrypt PRIVATE "libbcrypt/src")

View File

@@ -27,6 +27,8 @@
<location zone="1300" x="51.848" y="329.0" z="561.114" rw="-0.277656" rx="0.00" ry="0.960681" rz="0.00" />
<!--GF Pirate Camp-->
<location zone="1300" x="363.259" y="259.367" z="-210.834" rw="0.961918" rx="0.00" ry="-0.273340" rz="0.00" />
<!--FV Race Place-->
<location zone="1400" x="746.784" y="237.957" z="495.015" rw="-0.036648" rx="0.00" ry="0.999328" rz="0.00" />
<!--FV Great Tree-->
<location zone="1400" x="-194.288" y="381.275" z="-93.292" rw="0.935135" rx="0.00" ry="0.354292" rz="0.00" />
<!--FV Paradox Refinery-->