mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
Merge branch 'main' into Log-Line-Cleaning
This commit is contained in:
commit
975654f8e2
@ -487,3 +487,9 @@ if(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC")
|
||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_dependencies(MasterServer WorldServer)
|
||||||
|
add_dependencies(MasterServer AuthServer)
|
||||||
|
add_dependencies(MasterServer ChatServer)
|
||||||
|
endif()
|
@ -12,6 +12,20 @@
|
|||||||
"description": "Sets build and install directories",
|
"description": "Sets build and install directories",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"generator": "Unix Makefiles"
|
"generator": "Unix Makefiles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-default",
|
||||||
|
"displayName": "Windows only Configure Settings",
|
||||||
|
"description": "Sets build and install directories",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"architecture": {
|
||||||
|
"value": "x64",
|
||||||
|
"strategy": "external"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"buildPresets": [
|
"buildPresets": [
|
||||||
|
@ -49,6 +49,15 @@ Make sure packages like `gcc`, `cmake`, and `zlib` are installed. Depending on t
|
|||||||
cmake must be version 3.12 or higher!
|
cmake must be version 3.12 or higher!
|
||||||
|
|
||||||
**Build the repository**
|
**Build the repository**
|
||||||
|
|
||||||
|
You can either run `build.sh` when in the root folder of the repository:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Or manually run the commands used in `build.sh`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create the build directory, preserving it if it already exists
|
# Create the build directory, preserving it if it already exists
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
// CPPLinq
|
// CPPLinq
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define NOMINMAX
|
||||||
|
// windows.h has min and max macros that breaks cpplinq
|
||||||
|
#endif
|
||||||
#include "cpplinq.hpp"
|
#include "cpplinq.hpp"
|
||||||
|
|
||||||
#pragma warning (disable : 4244) //Disable double to float conversion warnings
|
#pragma warning (disable : 4244) //Disable double to float conversion warnings
|
||||||
|
@ -71,7 +71,7 @@ void BuffComponent::Update(float deltaTime)
|
|||||||
buff.second.tickTime = buff.second.tick;
|
buff.second.tickTime = buff.second.tick;
|
||||||
buff.second.stacks--;
|
buff.second.stacks--;
|
||||||
|
|
||||||
SkillComponent::HandleUnmanaged(buff.second.behaviorID, m_Parent->GetObjectID());
|
SkillComponent::HandleUnmanaged(buff.second.behaviorID, m_Parent->GetObjectID(), buff.second.source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,9 +481,9 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
|
|||||||
delete bitStream;
|
delete bitStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID target)
|
void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID target, LWOOBJID source)
|
||||||
{
|
{
|
||||||
auto* context = new BehaviorContext(target);
|
auto* context = new BehaviorContext(source);
|
||||||
|
|
||||||
context->unmanaged = true;
|
context->unmanaged = true;
|
||||||
context->caster = target;
|
context->caster = target;
|
||||||
@ -496,7 +496,7 @@ void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID t
|
|||||||
|
|
||||||
delete bitStream;
|
delete bitStream;
|
||||||
|
|
||||||
delete context;
|
delete context;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkillComponent::HandleUnCast(const uint32_t behaviorId, const LWOOBJID target)
|
void SkillComponent::HandleUnCast(const uint32_t behaviorId, const LWOOBJID target)
|
||||||
|
@ -158,8 +158,9 @@ public:
|
|||||||
* Computes a server-side skill calculation without an associated entity.
|
* Computes a server-side skill calculation without an associated entity.
|
||||||
* @param behaviorId the root behavior ID of the skill
|
* @param behaviorId the root behavior ID of the skill
|
||||||
* @param target the explicit target of the skill
|
* @param target the explicit target of the skill
|
||||||
|
* @param source the explicit source of the skill
|
||||||
*/
|
*/
|
||||||
static void HandleUnmanaged(uint32_t behaviorId, LWOOBJID target);
|
static void HandleUnmanaged(uint32_t behaviorId, LWOOBJID target, LWOOBJID source = LWOOBJID_EMPTY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Computes a server-side skill uncast calculation without an associated entity.
|
* Computes a server-side skill uncast calculation without an associated entity.
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
#include "SkillComponent.h"
|
#include "SkillComponent.h"
|
||||||
#include "VanityUtilities.h"
|
#include "VanityUtilities.h"
|
||||||
#include "GameConfig.h"
|
#include "GameConfig.h"
|
||||||
|
#include "ScriptedActivityComponent.h"
|
||||||
|
|
||||||
void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr) {
|
void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr) {
|
||||||
std::string chatCommand;
|
std::string chatCommand;
|
||||||
@ -384,6 +385,13 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chatCommand == "resurrect") {
|
if (chatCommand == "resurrect") {
|
||||||
|
ScriptedActivityComponent* scriptedActivityComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent<ScriptedActivityComponent>();
|
||||||
|
|
||||||
|
if (scriptedActivityComponent) { // check if user is in activity world and if so, they can't resurrect
|
||||||
|
ChatPackets::SendSystemMessage(sysAddr, u"You cannot resurrect in an activity world.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GameMessages::SendResurrect(entity);
|
GameMessages::SendResurrect(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,28 +126,9 @@ Packet* dServer::ReceiveFromMaster() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//When we handle these packets in World instead dServer, we just return the packet's pointer.
|
//When we handle these packets in World instead dServer, we just return the packet's pointer.
|
||||||
case MSG_MASTER_REQUEST_PERSISTENT_ID_RESPONSE: {
|
|
||||||
return packet;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case MSG_MASTER_SESSION_KEY_RESPONSE: {
|
|
||||||
return packet;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case MSG_MASTER_SHUTDOWN : {
|
|
||||||
return packet;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case MSG_MASTER_AFFIRM_TRANSFER_REQUEST: {
|
|
||||||
return packet;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
mLogger->Log("dServer", "Unknown packet ID from master: %i\n", packet->data[3]);
|
|
||||||
|
return packet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ void AgSpaceStuff::OnStartup(Entity* self) {
|
|||||||
|
|
||||||
self->SetVar(u"ShakeObject", ref->GetObjectID());
|
self->SetVar(u"ShakeObject", ref->GetObjectID());
|
||||||
|
|
||||||
self->AddTimer("ShipShakeIdle", 1.0f);
|
self->AddTimer("ShipShakeIdle", 2.0f);
|
||||||
self->SetVar(u"RandomTime", 10);
|
self->SetVar(u"RandomTime", 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user