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