Files
DarkflameServer/dGame/dComponents/Property/PropertyVendorComponent.h
Aaron Kimbrell 9a464ac35f 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>
2026-10-01 15:37:45 -05:00

38 lines
1.3 KiB
C++

#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);
};