summaryrefslogtreecommitdiff
path: root/src/playerinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/playerinfo.h')
-rw-r--r--src/playerinfo.h46
1 files changed, 37 insertions, 9 deletions
diff --git a/src/playerinfo.h b/src/playerinfo.h
index 3214e64e..fabce6ea 100644
--- a/src/playerinfo.h
+++ b/src/playerinfo.h
@@ -66,6 +66,14 @@ class Equipment;
class Inventory;
class Item;
+enum BuySellState
+{
+ BUYSELL_NONE,
+ BUYSELL_CHOOSING,
+ BUYSELL_BUYING,
+ BUYSELL_SELLING
+};
+
/**
* Special information storage structure.
*/
@@ -168,6 +176,31 @@ namespace PlayerInfo
*/
Item *getEquipment(unsigned int slot);
+// -- Buy/Sell/Trade ----------------------------------------------------------
+
+ /**
+ * Returns true if the player is involved in a buy, sell, or related
+ * interaction, false otherwise.
+ */
+ BuySellState getBuySellState();
+
+ /**
+ * Sets whether the player is currently involved in a buy, sell, or related
+ * interaction.
+ */
+ void setBuySellState(BuySellState buySellState);
+
+ /**
+ * Returns true if the player is involved in a trade at the moment, false
+ * otherwise.
+ */
+ bool isTrading();
+
+ /**
+ * Sets whether the player is currently involved in trade or not.
+ */
+ void setTrading(bool trading);
+
// --- Specials ---------------------------------------------------------------
/**
@@ -188,20 +221,15 @@ namespace PlayerInfo
void setBackend(const PlayerInfoBackend &backend);
/**
- * Does necessary updates every tick.
- */
- void logic();
-
- /**
- * Returns true if the player is involved in a trade at the moment, false
+ * Returns true if the player is involved in a NPC interaction, false
* otherwise.
*/
- bool isTrading();
+ bool isTalking();
/**
- * Sets whether the player is currently involved in trade or not.
+ * Does necessary updates every tick.
*/
- void setTrading(bool trading);
+ void logic();
/**
* Initializes some internals.