#include "extern.h"
#include "flags.h"
#include <string>
+#include <stdio.h>
using namespace std;
delete output;
#endif
}
+void Player::setPassword(const char *p)
+{
+ static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV\
+WXYZ0123456789./";
+ static char salt[3];
+
+ salt[0] = saltChars[rand() % strlen(saltChars)];
+ salt[1] = saltChars[rand() % strlen(saltChars)];
+ salt[2] = '\0';
+
+ password = crypt(p, salt);
+}
void Player::setData(Player *right)
{
weapon.erase();
death.erase();
strength = 0;
+ defense = 0;
exp = 0;
gold = 0;
maxhp = hp = 0;
weapon = m->weapon;
death = m->death;
strength = m->strength;
+ defense = m->defense;
maxhp = m->maxhp;
hp = m->hp;
gold = m->gold;
weapon = m.weapon;
death = m.death;
strength = m.strength;
+ defense = m.defense;
maxhp = m.maxhp;
hp = m.hp;
gold = m.gold;