Cornwallis
Member
- Joined
- Jan 3, 2010
- Messages
- 480
- Reaction score
- 16
Figured this out myself
goto player.cpp and find
and replace with
Code:
Item* tool = getWeapon();
if(const Weapon* weapon = g_weapons->getWeapon(tool))
{
if(weapon->interruptSwing() && !canDoAction())
{
SchedulerTask* task = createSchedulerTask(getNextActionTime(), boost::bind(&Game::checkCreatureAttack, &g_game, getID()));
setNextActionTask(task);
}
else if((!hasCondition(CONDITION_EXHAUST, 3) || !weapon->hasExhaustion()) && weapon->useWeapon(this, tool, attackedCreature))
lastAttack = OTSYS_TIME();
}
else if(Weapon::useFist(this, attackedCreature))
lastAttack = OTSYS_TIME();
Code:
Item* tool = getWeapon();
if(const Weapon* weapon = g_weapons->getWeapon(tool))
{
if((!hasCondition(CONDITION_EXHAUST, 3) || !weapon->hasExhaustion()) && weapon->useWeapon(this, tool, attackedCreature))
lastAttack = OTSYS_TIME();
}
else if(Weapon::useFist(this, attackedCreature))
lastAttack = OTSYS_TIME();
Last edited: