mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 05:53:34 +00:00
Styling edits
This commit is contained in:
parent
e81acb4c67
commit
ad5c679d2d
@ -30,8 +30,8 @@ void RocketLaunchLupComponent::OnUse(Entity* originator) {
|
|||||||
auto* characterComponent = originator->GetComponent<CharacterComponent>();
|
auto* characterComponent = originator->GetComponent<CharacterComponent>();
|
||||||
|
|
||||||
if (!inventoryComponent || !characterComponent) return;
|
if (!inventoryComponent || !characterComponent) return;
|
||||||
Item* rocket = nullptr;
|
|
||||||
rocket = inventoryComponent->FindItemById(characterComponent->GetLastRocketItemID());
|
Item* rocket = inventoryComponent->FindItemById(characterComponent->GetLastRocketItemID());
|
||||||
if (!rocket) return;
|
if (!rocket) return;
|
||||||
|
|
||||||
rocket->Equip(true);
|
rocket->Equip(true);
|
||||||
|
@ -15,9 +15,22 @@ public:
|
|||||||
RocketLaunchLupComponent(Entity* parent);
|
RocketLaunchLupComponent(Entity* parent);
|
||||||
~RocketLaunchLupComponent() override;
|
~RocketLaunchLupComponent() override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles an OnUse event from some entity, preparing it for launch to some other world
|
||||||
|
* Builds m_LUPWorlds
|
||||||
|
* @param originator the entity that triggered the event
|
||||||
|
*/
|
||||||
void OnUse(Entity* originator) override;
|
void OnUse(Entity* originator) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles an OnUse event from some entity, preparing it for launch to some other world
|
||||||
|
*
|
||||||
|
* @param originator the entity that triggered the event
|
||||||
|
* @param index index of the world that was selected
|
||||||
|
* @param sysAddr the address to send gamemessage responses to
|
||||||
|
*/
|
||||||
void OnSelectWorld(Entity* originator, uint32_t index, const SystemAddress& sysAddr);
|
void OnSelectWorld(Entity* originator, uint32_t index, const SystemAddress& sysAddr);
|
||||||
private:
|
private:
|
||||||
|
// vector of the LUP World Zone IDs, built from CDServer's LUPZoneIDs table
|
||||||
std::vector<LWOMAPID> m_LUPWorlds {};
|
std::vector<LWOMAPID> m_LUPWorlds {};
|
||||||
};
|
};
|
||||||
|
@ -2733,7 +2733,7 @@ void GameMessages::HandleEnterProperty(RakNet::BitStream* inStream, Entity* enti
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto rocketLaunchLupComponent = entity->GetComponent<RocketLaunchLupComponent>();
|
auto rocketLaunchLupComponent = entity->GetComponent<RocketLaunchLupComponent>();
|
||||||
if (rocketLaunchLupComponent) {
|
if (rocketLaunchLupComponent != nullptr) {
|
||||||
rocketLaunchLupComponent->OnSelectWorld(player, index, sysAddr);
|
rocketLaunchLupComponent->OnSelectWorld(player, index, sysAddr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user