mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-28 20:27:46 +00:00
Corrected sprint duration when in/out of combat.
This commit is contained in:
parent
3624b9e30b
commit
4c6c40bf70
1 changed files with 12 additions and 1 deletions
|
@ -18,9 +18,20 @@ public:
|
||||||
if( !sourceChara->isPlayer() )
|
if( !sourceChara->isPlayer() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int32_t duration;
|
||||||
|
|
||||||
|
if ( sourceChara->getAsPlayer()->isInCombat() )
|
||||||
|
{
|
||||||
|
duration = 10000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
duration = 20000;
|
||||||
|
}
|
||||||
|
|
||||||
action.getEffectbuilder()->applyStatusEffect( sourceChara, 50, 30 );
|
action.getEffectbuilder()->applyStatusEffect( sourceChara, 50, 30 );
|
||||||
|
|
||||||
sourceChara->getAsPlayer()->addStatusEffectByIdIfNotExist( 50, 20000, *sourceChara, 30 );
|
sourceChara->getAsPlayer()->addStatusEffectByIdIfNotExist( 50, duration, *sourceChara, 30 );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue