mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 01:38:20 +00:00
Renamed RocketLaunchLUP to MultiZoneEntrance (#1185)
This commit is contained in:
parent
f4f13e081a
commit
d893ecddeb
@ -101,7 +101,7 @@ enum class eReplicaComponentType : uint32_t {
|
||||
TRADE,
|
||||
USER_CONTROL,
|
||||
IGNORE_LIST,
|
||||
ROCKET_LAUNCH_LUP,
|
||||
MULTI_ZONE_ENTRANCE,
|
||||
BUFF_REAL, // the real buff component, should just be name BUFF
|
||||
INTERACTION_MANAGER,
|
||||
DONATION_VENDOR,
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "Component.h"
|
||||
#include "ControllablePhysicsComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "RocketLaunchLupComponent.h"
|
||||
#include "MultiZoneEntranceComponent.h"
|
||||
#include "CharacterComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "BuffComponent.h"
|
||||
@ -451,9 +451,9 @@ void Entity::Initialize() {
|
||||
m_Components.insert(std::make_pair(eReplicaComponentType::INVENTORY, comp));
|
||||
}
|
||||
// if this component exists, then we initialize it. it's value is always 0
|
||||
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ROCKET_LAUNCH_LUP, -1) != -1) {
|
||||
auto comp = new RocketLaunchLupComponent(this);
|
||||
m_Components.insert(std::make_pair(eReplicaComponentType::ROCKET_LAUNCH_LUP, comp));
|
||||
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::MULTI_ZONE_ENTRANCE, -1) != -1) {
|
||||
auto comp = new MultiZoneEntranceComponent(this);
|
||||
m_Components.insert(std::make_pair(eReplicaComponentType::MULTI_ZONE_ENTRANCE, comp));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp"
|
||||
"RebuildComponent.cpp"
|
||||
"RenderComponent.cpp"
|
||||
"RigidbodyPhantomPhysicsComponent.cpp"
|
||||
"RocketLaunchLupComponent.cpp"
|
||||
"MultiZoneEntranceComponent.cpp"
|
||||
"RocketLaunchpadControlComponent.cpp"
|
||||
"ScriptedActivityComponent.cpp"
|
||||
"ShootingGalleryComponent.cpp"
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "RocketLaunchLupComponent.h"
|
||||
#include "MultiZoneEntranceComponent.h"
|
||||
#include "RocketLaunchpadControlComponent.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "CharacterComponent.h"
|
||||
|
||||
RocketLaunchLupComponent::RocketLaunchLupComponent(Entity* parent) : Component(parent) {
|
||||
MultiZoneEntranceComponent::MultiZoneEntranceComponent(Entity* parent) : Component(parent) {
|
||||
m_Parent = parent;
|
||||
std::string zoneString = GeneralUtils::UTF16ToWTF8(m_Parent->GetVar<std::u16string>(u"MultiZoneIDs"));
|
||||
std::stringstream ss(zoneString);
|
||||
@ -14,9 +14,9 @@ RocketLaunchLupComponent::RocketLaunchLupComponent(Entity* parent) : Component(p
|
||||
}
|
||||
}
|
||||
|
||||
RocketLaunchLupComponent::~RocketLaunchLupComponent() {}
|
||||
MultiZoneEntranceComponent::~MultiZoneEntranceComponent() {}
|
||||
|
||||
void RocketLaunchLupComponent::OnUse(Entity* originator) {
|
||||
void MultiZoneEntranceComponent::OnUse(Entity* originator) {
|
||||
auto* rocket = originator->GetComponent<CharacterComponent>()->RocketEquip(originator);
|
||||
if (!rocket) return;
|
||||
|
||||
@ -24,7 +24,7 @@ void RocketLaunchLupComponent::OnUse(Entity* originator) {
|
||||
GameMessages::SendPropertyEntranceBegin(m_Parent->GetObjectID(), m_Parent->GetSystemAddress());
|
||||
}
|
||||
|
||||
void RocketLaunchLupComponent::OnSelectWorld(Entity* originator, uint32_t index) {
|
||||
void MultiZoneEntranceComponent::OnSelectWorld(Entity* originator, uint32_t index) {
|
||||
auto* rocketLaunchpadControlComponent = m_Parent->GetComponent<RocketLaunchpadControlComponent>();
|
||||
if (!rocketLaunchpadControlComponent) return;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "Component.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
@ -9,16 +8,16 @@
|
||||
* Component that handles the LUP/WBL rocket launchpad that can be interacted with to travel to WBL worlds.
|
||||
*
|
||||
*/
|
||||
class RocketLaunchLupComponent : public Component {
|
||||
class MultiZoneEntranceComponent : public Component {
|
||||
public:
|
||||
static const eReplicaComponentType ComponentType = eReplicaComponentType::ROCKET_LAUNCH_LUP;
|
||||
static const eReplicaComponentType ComponentType = eReplicaComponentType::MULTI_ZONE_ENTRANCE;
|
||||
|
||||
/**
|
||||
* Constructor for this component, builds the m_LUPWorlds vector
|
||||
* @param parent parent that contains this component
|
||||
*/
|
||||
RocketLaunchLupComponent(Entity* parent);
|
||||
~RocketLaunchLupComponent() override;
|
||||
MultiZoneEntranceComponent(Entity* parent);
|
||||
~MultiZoneEntranceComponent() override;
|
||||
|
||||
/**
|
||||
* Handles an OnUse event from some entity, preparing it for launch to some other world
|
@ -13,7 +13,7 @@
|
||||
#include "ChatPackets.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "PropertyEntranceComponent.h"
|
||||
#include "RocketLaunchLupComponent.h"
|
||||
#include "MultiZoneEntranceComponent.h"
|
||||
#include "dServer.h"
|
||||
#include "PacketUtils.h"
|
||||
#include "eObjectWorldState.h"
|
||||
@ -94,7 +94,7 @@ void RocketLaunchpadControlComponent::OnUse(Entity* originator) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* rocketLaunchLUP = m_Parent->GetComponent<RocketLaunchLupComponent>();
|
||||
auto* rocketLaunchLUP = m_Parent->GetComponent<MultiZoneEntranceComponent>();
|
||||
if (rocketLaunchLUP) {
|
||||
return;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "dConfig.h"
|
||||
#include "TeamManager.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "RocketLaunchLupComponent.h"
|
||||
#include "MultiZoneEntranceComponent.h"
|
||||
#include "eUnequippableActiveType.h"
|
||||
#include "eMovementPlatformState.h"
|
||||
#include "LeaderboardManager.h"
|
||||
@ -2795,9 +2795,9 @@ void GameMessages::HandleEnterProperty(RakNet::BitStream* inStream, Entity* enti
|
||||
return;
|
||||
}
|
||||
|
||||
auto rocketLaunchLupComponent = entity->GetComponent<RocketLaunchLupComponent>();
|
||||
if (rocketLaunchLupComponent != nullptr) {
|
||||
rocketLaunchLupComponent->OnSelectWorld(player, index);
|
||||
auto multiZoneEntranceComponent = entity->GetComponent<MultiZoneEntranceComponent>();
|
||||
if (multiZoneEntranceComponent != nullptr) {
|
||||
multiZoneEntranceComponent->OnSelectWorld(player, index);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user