aboutsummaryrefslogtreecommitdiffstats
path: root/include/entities.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/entities.h')
-rw-r--r--include/entities.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/include/entities.h b/include/entities.h
index 6c8e658..545f0a4 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -52,6 +52,24 @@ enum BUILD_SUB{
STALL_TRADER = 71
};
+class BuySell{
+public:
+ int member;
+ union{
+ struct{
+ std::string item1;
+ std::string item2;
+ }trade;
+ struct{
+ enum type{BUY,SELL};
+ std::string item;
+ int price;
+ }cost;
+ };
+ BuySell(){}
+ ~BuySell(){}
+};
+
class World;
class Particles{
@@ -199,18 +217,7 @@ public:
class Merchant : public NPC{
public:
- union BSINV{
- struct EQUAL{
- std::string item1;
- std::string item2;
- };
-
- struct COST{
- std::string item;
- int price;
- };
- };
- std::vector<BSINV>bsinv;
+ std::vector<BuySell>bsinv;
void interact();
Merchant();