CL
programação

{Ajuda} Adaptar código para TFS 0.4

Por Clarym, 23 de mar. de 2016 em Programação

tfs 0.4
18
4.9k
ClarymC
29 de março de 2016 às 18:11

up


up

TerSaidT
31 de março de 2016 às 01:12

tenta

uint32_t Player::getAttackSpeed() const
{
int32_t SpeedAttack;
     return std::ceil(((weapon && weapon->getAttackSpeed() != 0) ? weapon->getAttackSpeed() * (1 - (getSkill(SKILL_FIST, SKILL_LEVEL) * 0.00375)) : (vocation->getAttackSpeed() / std::max((size_t)1, getWeapons().size()) * (1 - (getSkill(SKILL_FIST, SKILL_LEVEL) * 0.00375)))));
if (SpeedAttack < 500) {
     return 500;
}   else {
     return (uint32_t) SpeedAttack;
    }
}

1 mês depois...
ClarymC
19 de abril de 2016 às 10:05
Em ‎31‎/‎03‎/‎2016 at 01:12, TerSaid disse:

tenta

uint32_t Player::getAttackSpeed() const{int32_t SpeedAttack;     return std::ceil(((weapon && weapon->getAttackSpeed() != 0) ? weapon->getAttackSpeed() * (1 - (getSkill(SKILL_FIST, SKILL_LEVEL) * 0.00375)) : (vocation->getAttackSpeed() / std::max((size_t)1, getWeapons().size()) * (1 - (getSkill(SKILL_FIST, SKILL_LEVEL) * 0.00375)))));if (SpeedAttack < 500) {     return 500;}   else {     return (uint32_t) SpeedAttack;    }}

Não deu erro, mas o atributo do item não funcionou