Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool Player::gainExperience(double& gainExp, Creature* target)
- {
- if(!rateExperience(gainExp, target))
- return false;
- //soul regeneration
- if(gainExp >= level)
- {
- if(Condition* condition = Condition::createCondition(
- CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
- {
- condition->setParam(CONDITIONPARAM_SOULGAIN,
- vocation->getGainAmount(GAIN_SOUL));
- condition->setParam(CONDITIONPARAM_SOULTICKS,
- (vocation->getGainTicks(GAIN_SOUL) * 1000));
- addCondition(condition);
- }
- }
- addExperience((uint64_t)gainExp);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment