• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

A small problem with the attack speed dependent on the skill

vvafel

New Member
Joined
Mar 5, 2010
Messages
22
Reaction score
0
Location
Poland.
Hi I have a problem with taking the attack speed dependent on the skill fist.
Server is Devland 8.0
You need to rewrite a piece player.ccp:

uint32_t Player::getAttackSpeed()
{
return vocation->getAttackSpeed();
}
void Player:nAttacking(uint32_t interval)
{
if(attackTicks < getAttackSpeed()){
attackTicks += interval;
}
Creature:nAttacking(interval);
}
void Player::doAttacking(uint32_t interval)
{
if(getAttackSpeed() <= attackTicks){
bool result = false;
Item* tool = getWeapon();
const Weapon* weapon = g_weapons->getWeapon(tool);
if(weapon && weapon->checkLastAction(this, 100)){
attackTicks = 0;
result = weapon->useWeapon(this, tool, attackedCreature);
}
else{
attackTicks = 0;
result = Weapon::useFist(this, attackedCreature);
}
if(!result){
//make next instant
attackTicks = getAttackSpeed();
}
}
}

If someone knew how to do this in advance thanks.
Vvafel
 
Code:
return vocation->getAttackSpeed() - getSkill(SKILL_NAME (eg. FIST), SKILL_LEVEL) * 1/* 1 = power u can increase it*/;
 
Back
Top