diff --git a/CMakeVariables.txt b/CMakeVariables.txt index bbed7d46..01e03d87 100644 --- a/CMakeVariables.txt +++ b/CMakeVariables.txt @@ -6,7 +6,7 @@ LICENSE=AGPL-3.0 # The network version. # 171023 - Darkflame Universe client # 171022 - Unmodded client -NET_VERSION=171023 +NET_VERSION=171022 # Debugging # __dynamic=1 # Set __dynamic to 1 to enable the -rdynamic flag for the linker, yielding some symbols in crashlogs. diff --git a/README.md b/README.md index d724be24..6e27cbe0 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,12 @@ git clone --recursive https://github.com/DarkflameUniverse/DarkflameServer Some tools utilized to streamline the setup process require Python 3, make sure you have it installed. -**Choosing the right version for your client** + +### Choosing the right version for your client DLU clients identify themselves using a higher version number than the regular live clients out there. This was done make sure that older and incomplete clients wouldn't produce false positive bug reports for us, and because we made bug fixes and new content for the client. -If you're using a DLU client, then you don't need to change anything. But if you're using any other client, you'll have to go into the "CMakeVariables.txt" file and change it to match your client's version. (likely 171022) +If you're using a DLU client you'll have to go into the "CMakeVariables.txt" file and change the NET_VERSION variable to 171023 to match the modified client's version number. ### Linux builds Make sure packages like `gcc`, `cmake`, and `zlib` are installed. Depending on the distribution, these packages might already be installed. Note that on systems like Ubuntu, you will need the `zlib1g-dev` package so that the header files are available. @@ -77,7 +78,7 @@ sudo ln -s /usr/local/mysql-connector-c++/lib64/libssl.1.1.dylib /path/to/build/ sudo ln -s /usr/local/mysql-connector-c++/lib64/libcrypto.1.1.dylib /path/to/build/folder/libcrypto.1.1.dylib ``` -### Windows builds (native) +### Windows builds (native) (CURRENTLY BROKEN ONCE COMPILED) Ensure that you have either the [MSVC](https://visualstudio.microsoft.com/vs/) or the [Clang](https://github.com/llvm/llvm-project/releases/) (recommended) compiler installed. You will also need to install [CMake](https://cmake.org/download/). **Build the repository** diff --git a/dCommon/Diagnostics.cpp b/dCommon/Diagnostics.cpp index c64d4c18..5963400d 100644 --- a/dCommon/Diagnostics.cpp +++ b/dCommon/Diagnostics.cpp @@ -2,8 +2,9 @@ // If we're on Win32, we'll include our minidump writer #ifdef _WIN32 -#include + #include +#include #include "Game.h" #include "dLogger.h" diff --git a/dGame/UserManager.cpp b/dGame/UserManager.cpp index 54b39c9f..5418e9f3 100644 --- a/dGame/UserManager.cpp +++ b/dGame/UserManager.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "Database.h" #include "Game.h" @@ -25,38 +26,46 @@ UserManager * UserManager::m_Address = nullptr; uint32_t FindCharShirtID(uint32_t shirtColor, uint32_t shirtStyle); uint32_t FindCharPantsID(uint32_t pantsColor); +inline void StripCR(std::string& str) { + str.erase(std::remove(str.begin(), str.end(), '\r'), str.end()); +} + void UserManager::Initialize() { std::string firstNamePath = "./res/names/minifigname_first.txt"; - std::string middleNamePath = "./res/names/minifigname_middle.txt"; - std::string lastNamePath = "./res/names/minifigname_last.txt"; - std::string line; + std::string middleNamePath = "./res/names/minifigname_middle.txt"; + std::string lastNamePath = "./res/names/minifigname_last.txt"; + std::string line; - std::fstream fnFile(firstNamePath, std::ios::in); - std::fstream mnFile(middleNamePath, std::ios::in); - std::fstream lnFile(lastNamePath, std::ios::in); + std::fstream fnFile(firstNamePath, std::ios::in); + std::fstream mnFile(middleNamePath, std::ios::in); + std::fstream lnFile(lastNamePath, std::ios::in); - while (std::getline(fnFile, line, '\n')) { + while (std::getline(fnFile, line, '\n')) { std::string name = line; - m_FirstNames.push_back(name); - } + StripCR(name); + m_FirstNames.push_back(name); + } - while (std::getline(mnFile, line, '\n')) { + while (std::getline(mnFile, line, '\n')) { std::string name = line; - m_MiddleNames.push_back(name); - } + StripCR(name); + m_MiddleNames.push_back(name); + } - while (std::getline(lnFile, line, '\n')) { + while (std::getline(lnFile, line, '\n')) { std::string name = line; - m_LastNames.push_back(name); - } + StripCR(name); + m_LastNames.push_back(name); + } - fnFile.close(); - mnFile.close(); - lnFile.close(); + fnFile.close(); + mnFile.close(); + lnFile.close(); //Load our pre-approved names: std::fstream chatList("./res/chatplus_en_us.txt", std::ios::in); while (std::getline(chatList, line, '\n')) { + StripCR(line); m_PreapprovedNames.push_back(line); } diff --git a/dScripts/NjMonastryBossInstance.cpp b/dScripts/NjMonastryBossInstance.cpp index 8c7f8e9e..faf92edd 100644 --- a/dScripts/NjMonastryBossInstance.cpp +++ b/dScripts/NjMonastryBossInstance.cpp @@ -16,7 +16,7 @@ // // // // // // // void NjMonastryBossInstance::OnStartup(Entity *self) { - auto spawnerNames = std::vector { LedgeFrakjawSpawner, LowerFrakjawSpawner, BaseEnemiesSpawner + std::to_string(1), + auto spawnerNames = std::vector { LedgeFrakjawSpawner, LowerFrakjawSpawner, BaseEnemiesSpawner + std::to_string(1), BaseEnemiesSpawner + std::to_string(2), BaseEnemiesSpawner + std::to_string(3), BaseEnemiesSpawner + std::to_string(4), CounterweightSpawner }; diff --git a/dZoneManager/Zone.cpp b/dZoneManager/Zone.cpp index 68adb943..95bb07bc 100644 --- a/dZoneManager/Zone.cpp +++ b/dZoneManager/Zone.cpp @@ -42,7 +42,15 @@ void Zone::LoadZoneIntoMemory() { m_ZonePath = m_ZoneFilePath.substr(0, m_ZoneFilePath.rfind('/') + 1); if (m_ZoneFilePath == "ERR") return; + // try to open with regular cased path first std::ifstream file(m_ZoneFilePath, std::ios::binary); + if (!file) { + // if that fails try the path in lowercase + std::transform(m_ZoneFilePath.begin(), m_ZoneFilePath.end(), m_ZoneFilePath.begin(), ::tolower); + + file.open(m_ZoneFilePath, std::ios::binary); + } + if (file) { BinaryIO::BinaryRead(file, m_ZoneFileFormatVersion); @@ -171,8 +179,7 @@ std::string Zone::GetFilePathForZoneID() { CDZoneTableTable * zoneTable = CDClientManager::Instance()->GetTable("ZoneTable"); const CDZoneTable* zone = zoneTable->Query(this->GetZoneID().GetMapID()); if (zone != nullptr) { - std::string toReturn = "./res/maps/" + zone->zoneName; - std::transform(toReturn.begin(), toReturn.end(), toReturn.begin(), ::tolower); + std::string toReturn = "./res/maps/" + zone->zoneName; return toReturn; } diff --git a/migrations/cdserver/0_nt_footrace.sql b/migrations/cdserver/0_nt_footrace.sql index 32330f1d..2019f07d 100644 --- a/migrations/cdserver/0_nt_footrace.sql +++ b/migrations/cdserver/0_nt_footrace.sql @@ -1,5 +1,3 @@ --- changes the NT foot race such that it does not share the - BEGIN TRANSACTION; UPDATE ComponentsRegistry SET component_id = 1901 WHERE id = 12916; diff --git a/migrations/cdserver/1_fix_overbuild_mission.sql b/migrations/cdserver/1_fix_overbuild_mission.sql index 1a4cd34f..9862d166 100644 --- a/migrations/cdserver/1_fix_overbuild_mission.sql +++ b/migrations/cdserver/1_fix_overbuild_mission.sql @@ -1,2 +1 @@ --- Fixes the overbuild mission that has the wrong target, therefore not being completable UPDATE Missions SET target_objectID = 12259 WHERE id = 1177; diff --git a/resources/worldconfig.ini b/resources/worldconfig.ini index b4f485f8..e5932ec7 100644 --- a/resources/worldconfig.ini +++ b/resources/worldconfig.ini @@ -6,7 +6,7 @@ mysql_password= # URL to the code repository for the hosted server # If you fork this repository and/or make changes to the code, reflect that here to comply with AGPLv3 -source=https://github.com/DarkflameUniverse/DLUv3 +source=https://github.com/DarkflameUniverse/DarkflameServer # Port to the chat server, same as in chatconfig.ini chat_server_port=2005 diff --git a/vanity/NPC.xml b/vanity/NPC.xml index 53b639d3..3bb5ae9f 100644 --- a/vanity/NPC.xml +++ b/vanity/NPC.xml @@ -380,6 +380,20 @@ + + + 8613, 13000, 7570 + + The red parrot can be very difficult to find! + Some say there are elephants in this forest. + I think I may be lost... + I'm feeling a bit emotionally conflicted right now + + + + + + 4523, 2517, 11909 @@ -423,4 +437,4 @@ :D :P - \ No newline at end of file +