mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 01:05:28 +00:00
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>
28 lines
766 B
C++
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__
|