Merge branch 'DarkflameUniverse:main' into main

This commit is contained in:
Nils Bergmann 2022-01-02 16:08:18 +01:00 committed by GitHub
commit 4d6991ea4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 27 deletions

View File

@ -487,3 +487,9 @@ if(UNIX)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC")
endif(UNIX)
if(WIN32)
add_dependencies(MasterServer WorldServer)
add_dependencies(MasterServer AuthServer)
add_dependencies(MasterServer ChatServer)
endif()

View File

@ -12,6 +12,20 @@
"description": "Sets build and install directories",
"binaryDir": "${sourceDir}/build",
"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": [

View File

@ -10,6 +10,10 @@
#include <map>
// CPPLinq
#ifdef _WIN32
#define NOMINMAX
// windows.h has min and max macros that breaks cpplinq
#endif
#include "cpplinq.hpp"
#pragma warning (disable : 4244) //Disable double to float conversion warnings

View File

@ -71,7 +71,7 @@ void BuffComponent::Update(float deltaTime)
buff.second.tickTime = buff.second.tick;
buff.second.stacks--;
SkillComponent::HandleUnmanaged(buff.second.behaviorID, m_Parent->GetObjectID());
SkillComponent::HandleUnmanaged(buff.second.behaviorID, m_Parent->GetObjectID(), buff.second.source);
}
}

View File

@ -481,9 +481,9 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
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->caster = target;
@ -496,7 +496,7 @@ void SkillComponent::HandleUnmanaged(const uint32_t behaviorId, const LWOOBJID t
delete bitStream;
delete context;
delete context;
}
void SkillComponent::HandleUnCast(const uint32_t behaviorId, const LWOOBJID target)

View File

@ -158,8 +158,9 @@ public:
* Computes a server-side skill calculation without an associated entity.
* @param behaviorId the root behavior ID 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.

View File

@ -61,6 +61,7 @@
#include "SkillComponent.h"
#include "VanityUtilities.h"
#include "GameConfig.h"
#include "ScriptedActivityComponent.h"
void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr) {
std::string chatCommand;
@ -384,6 +385,13 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
}
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);
}

View File

@ -126,28 +126,8 @@ Packet* dServer::ReceiveFromMaster() {
}
//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:
mLogger->Log("Server", "Unknown packet ID from master: %i\n", packet->data[3]);
return packet;
}
}
}

View File

@ -20,7 +20,7 @@ void AgSpaceStuff::OnStartup(Entity* self) {
self->SetVar(u"ShakeObject", ref->GetObjectID());
self->AddTimer("ShipShakeIdle", 1.0f);
self->AddTimer("ShipShakeIdle", 2.0f);
self->SetVar(u"RandomTime", 10);
}