Player::Player(const std::string& _name, ProtocolGame* p):
Creature(), transferContainer(ITEM_LOCKER), name(_name), nameDescription(_name), client(p)
{
if(client)
client->setPlayer(this);
pzLocked = isConnecting = addAttackSkillPoint = requestedOutfit = false;
saving = true;
lastAttackBlockType = BLOCK_NONE;
chaseMode = CHASEMODE_STANDSTILL;
fightMode = FIGHTMODE_ATTACK;
tradeState = TRADE_NONE;
accountManager = MANAGER_NONE;
guildLevel = GUILDLEVEL_NONE;
promotionLevel = walkTaskEvent = actionTaskEvent = nextStepEvent = bloodHitCount = shieldBlockCount = 0;
lastAttack = idleTime = marriage = blessings = balance = premiumDays = mana = manaMax = manaSpent = 0;
soul = guildId = levelPercent = magLevelPercent = magLevel = experience = damageImmunities = 0;
conditionImmunities = conditionSuppressions = groupId = vocation_id = managerNumber2 = town = skullEnd = 0;
lastLogin = lastLogout = lastIP = messageTicks = messageBuffer = nextAction = 0;
editListId = maxWriteLen = windowTextId = rankId = 0;
purchaseCallback = saleCallback = -1;
level = shootRange = 1;
rates[SKILL__MAGLEVEL] = rates[SKILL__LEVEL] = 1.0f;
soulMax = 100;
capacity = 400.00;
stamina = STAMINA_MAX;
lastLoad = lastPing = lastPong = OTSYS_TIME();
writeItem = NULL;
group = NULL;
editHouse = NULL;
shopOwner = NULL;
tradeItem = NULL;
tradePartner = NULL;
walkTask = NULL;
[B]Hey = 0;[/B]
setVocation(0);
setParty(NULL);
transferContainer.setParent(NULL);
for(int32_t i = 0; i < 11; i++)
{
inventory[i] = NULL;
inventoryAbilities[i] = false;
}
for(int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i)
{
skills[i][SKILL_LEVEL] = 10;
skills[i][SKILL_TRIES] = skills[i][SKILL_PERCENT] = 0;
rates[i] = 1.0f;
}
for(int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i)
varSkills[i] = 0;
for(int32_t i = STAT_FIRST; i <= STAT_LAST; ++i)
varStats[i] = 0;
for(int32_t i = LOSS_FIRST; i <= LOSS_LAST; ++i)
lossPercent[i] = 100;
for(int8_t i = 0; i <= 13; i++)
talkState[i] = false;
#ifdef __ENABLE_SERVER_DIAGNOSTIC__
playerCount++;
#endif
}