mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 10:45:27 +00:00
refactor(component): group the component files by the client's families
Physics/, Activity/ (activity, scripted activity, shooting gallery, quickbuild, minigame control, racing control base, racing control, gate rush), Vendor/, Character/ (what the client makes with a character, plus ghost, minifig and mission), Sound/ and Property/; the rest stays where it was. File moves only; DLU_COMPONENT_INCLUDE_DIRS gives every target the folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
37
dGame/dComponents/Property/PropertyVendorComponent.h
Normal file
37
dGame/dComponents/Property/PropertyVendorComponent.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "Entity.h"
|
||||
#include "Component.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
/**
|
||||
* The property guard that stands on a property before it's claimed, allows entities to attempt claiming this property.
|
||||
*/
|
||||
class PropertyVendorComponent final : public Component {
|
||||
public:
|
||||
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_VENDOR;
|
||||
explicit PropertyVendorComponent(Entity* parent, const int32_t componentID);
|
||||
|
||||
/**
|
||||
* Handles a use event from some entity, if the property is cleared this allows the entity to claim it
|
||||
* @param originator the entity that triggered this event
|
||||
*/
|
||||
bool OnRequestUse(GameMessages::RequestUseEvent& event);
|
||||
|
||||
/**
|
||||
* Handles a property data query after the property has been claimed, sending information about the property to the
|
||||
* triggering entity.
|
||||
* @param originator the entity that triggered the event
|
||||
* @param sysAddr the system address to send game message response to
|
||||
*/
|
||||
void OnQueryPropertyData(Entity* originator, const SystemAddress& sysAddr);
|
||||
|
||||
/**
|
||||
* Claims the property
|
||||
* @param originator the entity that attempted to claim the property
|
||||
* @param confirmed unused
|
||||
* @param lot unused
|
||||
* @param count unused
|
||||
*/
|
||||
void OnBuyFromVendor(Entity* originator, bool confirmed, LOT lot, uint32_t count);
|
||||
};
|
||||
Reference in New Issue
Block a user