mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 15:17:46 +00:00
fix autoattack range
This commit is contained in:
parent
2ab91b89dc
commit
75e665675b
2 changed files with 5 additions and 4 deletions
|
@ -793,8 +793,8 @@ uint32_t Sapphire::Entity::Chara::getStatValue( Sapphire::Common::BaseParam base
|
||||||
|
|
||||||
case Common::BaseParam::AttackPower:
|
case Common::BaseParam::AttackPower:
|
||||||
{
|
{
|
||||||
value = m_baseStats.attack;
|
// todo: think this is right... not sure
|
||||||
break;
|
return getStatValue( Common::BaseParam::Strength );
|
||||||
}
|
}
|
||||||
|
|
||||||
case Common::BaseParam::AttackMagicPotency:
|
case Common::BaseParam::AttackMagicPotency:
|
||||||
|
|
|
@ -1105,9 +1105,10 @@ void Sapphire::Entity::Player::update( uint64_t tickCount )
|
||||||
{
|
{
|
||||||
if( actor->getId() == m_targetId && actor->getAsChara()->isAlive() && mainWeap )
|
if( actor->getId() == m_targetId && actor->getAsChara()->isAlive() && mainWeap )
|
||||||
{
|
{
|
||||||
|
auto chara = actor->getAsChara();
|
||||||
|
|
||||||
// default autoattack range
|
// default autoattack range
|
||||||
// TODO make this dependant on bnpc size
|
float range = 3.f + chara->getRadius();
|
||||||
uint32_t range = 7;
|
|
||||||
|
|
||||||
// default autoattack range for ranged classes
|
// default autoattack range for ranged classes
|
||||||
if( getClass() == ClassJob::Machinist ||
|
if( getClass() == ClassJob::Machinist ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue