]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/item.cpp
Implemented the definitions for the new items class and added some declarations into...
[irc/gameservirc.git] / gameserv / item.cpp
index 455ca2b827a38b6ae33579912e662ed5ab149299..d98d744fb3687529dc78de8f67dd577752883ae5 100644 (file)
@@ -1,6 +1,4 @@
 #include "item.h"
-#include "extern.h"
-#include <string.h>
 
 item::item(char *name, int p, int uses, int m1, int m2, int m3, int m4, int m5, int m6, int m7, int m8)
 {
@@ -36,6 +34,26 @@ item::~item()
 {
 }
 
+bool item::operator<(const item &right) const
+{
+  return myname < right.myname;
+}
+
+bool item::operator>(const item &right) const
+{
+  return myname > right.myname;
+}
+
+bool item::operator==(const item &right) const
+{
+  return myname == right.myname;
+}
+
+bool item::operator!=(const item &right) const
+{
+  return myname != right.myname;
+}
+
 bool weapon::use(Player *p)
 {
   //  weapon(char *name, int p=0, int uses = -1, int strength=0, int defense=0, int maxhp=0)