]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/item.h
updated the Change log w/ new additions
[irc/gameservirc.git] / gameserv / item.h
index 6358089ae4fc6d0cc0750ee38d1fdbf074f51f57..4290e62b875e39917ee8f0b1888dfe0f652b0f42 100644 (file)
@@ -30,6 +30,7 @@ class item
 
   type getType() {return mytype;};
   void setType(type);
+  long int getID() {return id;};
 
   bool operator<(const item &right) const;
   bool operator>(const item &right) const;
@@ -38,7 +39,7 @@ class item
   item &operator=(const item &right);
   
  protected:
-  string myname;         // Name to use in game & sorting
+  string myname;         // Name to use in game
   long int myprice;      // How much does this item cost to buy (half to sell)
   int mymodifiers[8];    // Up to 8 different modifiers handled in the sub-classes
   int myuses;            // How many times this item can be used by default
@@ -68,6 +69,10 @@ class itemContainer
   item *getItem() {return myitem;};
   void setItem(item *);
 
+  int getUses() { return myuses; };
+  void setUses(int);
+  void use(Player *p);
+
  private:
   int myuses;              // How many times this item can be used
   item *myitem; 
@@ -113,6 +118,28 @@ class potion : public item
   void undo(Player *p);
 
  protected:
-  range myrange;
+  range myranges[8];
+};
+
+class tavernItem
+{
+ public:
+  tavernItem();
+  tavernItem(item *, int);
+
+
+  void setItem(item*);
+  item *getItem() { return myItem; };
+
+  void setLevel(int);
+  int getLevel() { return myLevel; };
+
+  bool visible(Player *);
+
+
+ private:
+
+  item *myItem; // The item this actually points to
+  int myLevel;    // The level the item shows up
 };
 #endif