mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 21:43:35 +00:00
Merge branch 'main' of github.com:TheNoim/DarkflameServer
This commit is contained in:
commit
a59ea5e245
@ -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.
|
||||
|
@ -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**
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
// If we're on Win32, we'll include our minidump writer
|
||||
#ifdef _WIN32
|
||||
#include <Dbghelp.h>
|
||||
|
||||
#include <Windows.h>
|
||||
#include <Dbghelp.h>
|
||||
|
||||
#include "Game.h"
|
||||
#include "dLogger.h"
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <fstream>
|
||||
#include <future>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
// // // // // // //
|
||||
|
||||
void NjMonastryBossInstance::OnStartup(Entity *self) {
|
||||
auto spawnerNames = std::vector { LedgeFrakjawSpawner, LowerFrakjawSpawner, BaseEnemiesSpawner + std::to_string(1),
|
||||
auto spawnerNames = std::vector<std::string> { LedgeFrakjawSpawner, LowerFrakjawSpawner, BaseEnemiesSpawner + std::to_string(1),
|
||||
BaseEnemiesSpawner + std::to_string(2), BaseEnemiesSpawner + std::to_string(3),
|
||||
BaseEnemiesSpawner + std::to_string(4), CounterweightSpawner };
|
||||
|
||||
|
@ -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<CDZoneTableTable>("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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -380,6 +380,20 @@
|
||||
<location x="284.538" y="260.627" z="-506.692" rw="0.819721" rx="0" ry="0.572763" rz="0" />
|
||||
</locations>
|
||||
</zone>
|
||||
</npc>
|
||||
<npc name="HappyAngryCatfish - Explorer" lot="2279">
|
||||
<equipment>8613, 13000, 7570</equipment>
|
||||
<phrases>
|
||||
<phrase>The red parrot can be very difficult to find!</phrase>
|
||||
<phrase>Some say there are elephants in this forest.</phrase>
|
||||
<phrase>I think I may be lost...</phrase>
|
||||
<phrase>I'm feeling a bit emotionally conflicted right now</phrase>
|
||||
</phrases>
|
||||
<zone id="1300">
|
||||
<locations>
|
||||
<location x="-171.217" y="246.482" z="-147.05" rw="-0.203118" rx="0" ry="0.979154" rz="0" />
|
||||
</locations>
|
||||
</zone>
|
||||
</npc>
|
||||
<npc name="Max - Developer" lot="9749">
|
||||
<equipment>4523, 2517, 11909</equipment>
|
||||
@ -423,4 +437,4 @@
|
||||
<phrase>:D</phrase>
|
||||
<phrase>:P</phrase>
|
||||
</partyphrases>
|
||||
</npcs>
|
||||
</npcs>
|
||||
|
Loading…
Reference in New Issue
Block a user