mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Merge remote-tracking branch 'upstream/main' into more-cdclient-cleanup
This commit is contained in:
@@ -61,6 +61,6 @@ void CatapultBaseServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
// kill the bouncer
|
||||
GameMessages::SendNotifyClientObject(bouncer->GetObjectID(), u"TimeToDie");
|
||||
bouncer->Smash(self->GetObjectID(), VIOLENT);
|
||||
bouncer->Smash(self->GetObjectID(), eKillType::VIOLENT);
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ void CavePrisonCage::Setup(Entity* self, Spawner* spawner) {
|
||||
}
|
||||
|
||||
void CavePrisonCage::OnRebuildNotifyState(Entity* self, eRebuildState state) {
|
||||
if (state != eRebuildState::REBUILD_RESETTING) {
|
||||
if (state != eRebuildState::RESETTING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ void ImaginationShrineServer::OnUse(Entity* self, Entity* user) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rebuildComponent->GetState() == REBUILD_COMPLETED) {
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
// Use the shrine
|
||||
BaseUse(self, user);
|
||||
}
|
||||
|
@@ -44,6 +44,6 @@ void NjColeNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID,
|
||||
return;
|
||||
}
|
||||
|
||||
inventoryComponent->AddItem(16644, 1, eLootSourceType::LOOT_SOURCE_NONE);
|
||||
inventoryComponent->AddItem(16644, 1, eLootSourceType::NONE);
|
||||
}
|
||||
}
|
||||
|
@@ -4,11 +4,12 @@
|
||||
#include "Loot.h"
|
||||
#include "Entity.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
void NjDragonEmblemChestServer::OnUse(Entity* self, Entity* user) {
|
||||
auto* character = user->GetCharacter();
|
||||
if (character != nullptr) {
|
||||
character->SetPlayerFlag(NJ_WU_SHOW_DAILY_CHEST, false);
|
||||
character->SetPlayerFlag(ePlayerFlag::NJ_WU_SHOW_DAILY_CHEST, false);
|
||||
}
|
||||
|
||||
auto* destroyable = self->GetComponent<DestroyableComponent>();
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include "NjGarmadonCelebration.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
void NjGarmadonCelebration::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto* character = target->GetCharacter();
|
||||
@@ -9,8 +10,8 @@ void NjGarmadonCelebration::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!character->GetPlayerFlag(ePlayerFlags::NJ_GARMADON_CINEMATIC_SEEN)) {
|
||||
character->SetPlayerFlag(ePlayerFlags::NJ_GARMADON_CINEMATIC_SEEN, true);
|
||||
if (!character->GetPlayerFlag(ePlayerFlag::NJ_GARMADON_CINEMATIC_SEEN)) {
|
||||
character->SetPlayerFlag(ePlayerFlag::NJ_GARMADON_CINEMATIC_SEEN, true);
|
||||
|
||||
GameMessages::SendStartCelebrationEffect(target, target->GetSystemAddress(), GarmadonCelebrationID);
|
||||
}
|
||||
|
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
#include <map>
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
static std::map<std::u16string, uint32_t> ElementFlags = {
|
||||
{u"earth", ePlayerFlags::NJ_EARTH_SPINJITZU},
|
||||
{u"lightning", ePlayerFlags::NJ_LIGHTNING_SPINJITZU},
|
||||
{u"ice", ePlayerFlags::NJ_ICE_SPINJITZU},
|
||||
{u"fire", ePlayerFlags::NJ_FIRE_SPINJITZU}
|
||||
static std::map<std::u16string, ePlayerFlag> ElementFlags = {
|
||||
{u"earth", ePlayerFlag::NJ_EARTH_SPINJITZU},
|
||||
{u"lightning", ePlayerFlag::NJ_LIGHTNING_SPINJITZU},
|
||||
{u"ice", ePlayerFlag::NJ_ICE_SPINJITZU},
|
||||
{u"fire", ePlayerFlag::NJ_FIRE_SPINJITZU}
|
||||
};
|
||||
|
||||
static std::map<std::u16string, uint32_t> ElementMissions = {
|
||||
|
@@ -12,6 +12,6 @@ void NjScrollChestServer::OnUse(Entity* self, Entity* user) {
|
||||
playerInventory->RemoveItem(keyLOT, 1);
|
||||
|
||||
// Reward the player with the item set
|
||||
playerInventory->AddItem(rewardItemLOT, 1, eLootSourceType::LOOT_SOURCE_NONE);
|
||||
playerInventory->AddItem(rewardItemLOT, 1, eLootSourceType::NONE);
|
||||
}
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "eMissionState.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
|
||||
@@ -24,7 +25,7 @@ void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, e
|
||||
missionComponent->AcceptMission(subMissionID);
|
||||
}
|
||||
|
||||
character->SetPlayerFlag(ePlayerFlags::NJ_WU_SHOW_DAILY_CHEST, false);
|
||||
character->SetPlayerFlag(ePlayerFlag::NJ_WU_SHOW_DAILY_CHEST, false);
|
||||
|
||||
// Hide the chest
|
||||
for (auto* chest : EntityManager::Instance()->GetEntitiesInGroup(m_DragonChestGroup)) {
|
||||
@@ -37,7 +38,7 @@ void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, e
|
||||
case eMissionState::READY_TO_COMPLETE:
|
||||
case eMissionState::COMPLETE_READY_TO_COMPLETE:
|
||||
{
|
||||
character->SetPlayerFlag(NJ_WU_SHOW_DAILY_CHEST, true);
|
||||
character->SetPlayerFlag(ePlayerFlag::NJ_WU_SHOW_DAILY_CHEST, true);
|
||||
|
||||
// Show the chest
|
||||
for (auto* chest : EntityManager::Instance()->GetEntitiesInGroup(m_DragonChestGroup)) {
|
||||
|
@@ -226,21 +226,21 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co
|
||||
rebuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) {
|
||||
|
||||
switch (state) {
|
||||
case REBUILD_BUILDING:
|
||||
case eRebuildState::BUILDING:
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification,
|
||||
0, 0, counterWeight->GetObjectID(),
|
||||
BaseCounterweightQB + std::to_string(self->GetVar<uint32_t>(WaveNumberVariable)),
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
return;
|
||||
case REBUILD_INCOMPLETE:
|
||||
case eRebuildState::INCOMPLETE:
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), EndCinematicNotification,
|
||||
0, 0, LWOOBJID_EMPTY, "",
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
return;
|
||||
case REBUILD_RESETTING:
|
||||
case eRebuildState::RESETTING:
|
||||
ActivityTimerStart(self, SpawnCounterWeightTimer, 0.0f, 0.0f);
|
||||
return;
|
||||
case REBUILD_COMPLETED: {
|
||||
case eRebuildState::COMPLETED: {
|
||||
// TODO: Move the platform?
|
||||
|
||||
// The counterweight is actually a moving platform and we should listen to the last waypoint event here
|
||||
|
Reference in New Issue
Block a user