Files
DarkflameServer/dGame/dComponents/Vendor/AchievementVendorComponent.h
Aaron Kimbrell c710e1d3a9 refactor(component): vendors share the client's base vendor component
LWOBaseVendorComponent is the base of the client's vendor, donation vendor and
achievement vendor; DLU's vendor logic becomes BaseVendorComponent with
VendorComponent, DonationVendorComponent and AchievementVendorComponent all
built on it (the last two derived from VendorComponent before). Nothing sent
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 15:43:13 -05:00

28 lines
766 B
C++

#ifndef __ACHIEVEMENTVENDORCOMPONENT__H__
#define __ACHIEVEMENTVENDORCOMPONENT__H__
#include "BaseVendorComponent.h"
#include "eReplicaComponentType.h"
#include <set>
#include <map>
class Entity;
class AchievementVendorComponent final : public BaseVendorComponent {
public:
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::ACHIEVEMENT_VENDOR;
AchievementVendorComponent(Entity* parent, const int32_t componentID);
void LoadDataFromTemplate() override;
void RefreshInventory(bool isCreation = false) override;
bool SellsItem(Entity* buyer, const LOT lot);
void Buy(Entity* buyer, LOT lot, uint32_t count);
private:
std::map<LWOOBJID,std::set<LOT>> m_PlayerPurchasableItems;
};
#endif //!__ACHIEVEMENTVENDORCOMPONENT__H__