]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/player.cpp
Added a file pouch.h which contains an inventory class Pouch to be used for carrying...
[irc/gameservirc.git] / gameserv / player.cpp
index 3677e7c67a081301ddc415148b8069370cb742bf..55aa9204bf06e05446b29faa249959381899409e 100644 (file)
@@ -1,4 +1,6 @@
 #include "player.h"
+#include "pouch.h"
+#include "extern.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -18,12 +20,13 @@ void Player::reset()
     weapon = 1;
     level = 1;
     alive = 1;
-    forest_fights = 100;
+    forest_fights = forestfights;
     player_fights = 3;
     fight = NULL;
     master = NULL;
     battle = NULL;
     flags = 0;
+    inventory.reset();
 }
 
 Player::Player(aClient *user)
@@ -157,3 +160,9 @@ long int Player::remFlag(long int flag)
     return getFlags();
 }
 
+Pouch::Pouch(int h, int s, int d)
+{
+    setHealing(h);
+    setStrength(s);
+    setDefense(d);
+}