mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Rename RebuildComponent to QuickbuildComponent
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "CavePrisonCage.h"
|
||||
#include "EntityManager.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "Character.h"
|
||||
#include "dZoneManager.h"
|
||||
@@ -68,14 +68,14 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) {
|
||||
|
||||
self->SetVar<LWOOBJID>(u"Counterweight", counterweight->GetObjectID());
|
||||
|
||||
auto* rebuildComponent = counterweight->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = counterweight->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent != nullptr) {
|
||||
rebuildComponent->AddRebuildStateCallback([this, self](eRebuildState state) {
|
||||
if (quickBuildComponent != nullptr) {
|
||||
quickBuildComponent->AddRebuildStateCallback([this, self](eRebuildState state) {
|
||||
OnRebuildNotifyState(self, state);
|
||||
});
|
||||
|
||||
rebuildComponent->AddRebuildCompleteCallback([this, self](Entity* user) {
|
||||
quickBuildComponent->AddRebuildCompleteCallback([this, self](Entity* user) {
|
||||
// The counterweight is a simple mover, which is not implemented, so we'll just set it's position
|
||||
auto* counterweight = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"Counterweight"));
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
#include "ImaginationShrineServer.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
|
||||
void ImaginationShrineServer::OnUse(Entity* self, Entity* user) {
|
||||
// If the rebuild component is complete, use the shrine
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
|
||||
|
||||
if (rebuildComponent == nullptr) {
|
||||
if (quickBuildComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
if (quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
// Use the shrine
|
||||
BaseUse(self, user);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "NjMonastryBossInstance.h"
|
||||
#include "RebuildComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
@@ -221,9 +221,9 @@ void NjMonastryBossInstance::HandleLedgedFrakjawSpawned(Entity* self, Entity* le
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* counterWeight) {
|
||||
auto* rebuildComponent = counterWeight->GetComponent<RebuildComponent>();
|
||||
if (rebuildComponent != nullptr) {
|
||||
rebuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) {
|
||||
auto* quickBuildComponent = counterWeight->GetComponent<QuickBuildComponent>();
|
||||
if (quickBuildComponent != nullptr) {
|
||||
quickBuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) {
|
||||
|
||||
switch (state) {
|
||||
case eRebuildState::BUILDING:
|
||||
|
Reference in New Issue
Block a user