bank = 500;
hp = 10;
maxhp = 10;
- strength = 0;
- defense = 0;
- arm = 1;
- wea = 1;
+ strength = 2;
+ defense = 1;
level = 1;
forest_fights = forestfights;
player_fights = 3;
lastcommand = 0;
lastlogin = 0;
setAlive(this);
+ w = NULL;
+ a = NULL;
inventory->clear();
}
maxhp = right->maxhp;
strength = right->strength;
defense = right->defense;
- arm = right->arm;
- wea = right->wea;
level = right->level;
forest_fights = right->forest_fights;
player_fights = right->player_fights;
client = right->client;
lastcommand = right->lastcommand;
lastlogin = right->lastlogin;
+ w = right->w;
+ a = right->a;
}
else
{
flags &= ~flag;
return getFlags();
}
+
+void Player::setWeapon(item &weap)
+{
+ w = &weap;
+}
+void Player::setArmor(item &arm)
+{
+ a = &arm;
+}