mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
Changed quest exp logic and fixed a bug in gain exp message
This commit is contained in:
parent
7e953ad695
commit
342bd7d6ad
2 changed files with 2 additions and 3 deletions
|
@ -831,7 +831,7 @@ void Sapphire::Entity::Player::gainExp( uint32_t amount )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setExp( currentExp + amount );
|
setExp( currentExp + amount );
|
||||||
Service< World::Manager::PlayerMgr >::ref().onGainExp( *this, currentExp + amount );
|
Service< World::Manager::PlayerMgr >::ref().onGainExp( *this, amount );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,9 +179,8 @@ bool Sapphire::Entity::Player::giveQuestRewards( uint32_t questId, uint32_t opti
|
||||||
|
|
||||||
auto paramGrowth = exdData.getRow< Component::Excel::ParamGrow >( questInfo->data().ClassLevel );
|
auto paramGrowth = exdData.getRow< Component::Excel::ParamGrow >( questInfo->data().ClassLevel );
|
||||||
|
|
||||||
// TODO: use the correct formula, this one is wrong
|
|
||||||
uint32_t exp =
|
uint32_t exp =
|
||||||
( questInfo->data().Reward.ExpBonus * paramGrowth->data().EventExpRate * ( 45 + 5 * questInfo->data().ClassLevel ) ) / 100;
|
( questInfo->data().Reward.ExpBonus * paramGrowth->data().BaseExp * paramGrowth->data().EventExpRate ) / 100;
|
||||||
|
|
||||||
//exp = questInfo->data().Reward.ExpBonus;
|
//exp = questInfo->data().Reward.ExpBonus;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue