What this function should to do??
This function will be executed when the player gain exp (by killing monster or by a function)
It would be cool if you could return false and that you can add extra exp etc..
yes, with TRUE and FALSE booleans
maybe can be make in this function of player.cpp
[cpp]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;
}[/cpp]
or maybe in creature.cpp
[cpp]void Creature:

nGainExperience(double& gainExp, Creature* target, bool multiplied)
{
if(gainExp <= 0)
return;
if(master)
{
gainExp = gainExp / 2;
master->onGainExperience(gainExp, target, multiplied);
}
else if(!multiplied)
gainExp *= g_config.getDouble(ConfigManager::RATE_EXPERIENCE);
int16_t color = g_config.getNumber(ConfigManager::EXPERIENCE_COLOR);
if(color < 0)
color = random_range(0, 255);
std::stringstream ss;
ss << (uint64_t)gainExp;
g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str());
}
void Creature:

nGainSharedExperience(double& gainExp, Creature* target, bool multiplied)
{
if(gainExp <= 0)
return;
if(master)
{
gainExp = gainExp / 2;
master->onGainSharedExperience(gainExp, target, multiplied);
}
else if(!multiplied)
gainExp *= g_config.getDouble(ConfigManager::RATE_EXPERIENCE);
int16_t color = g_config.getNumber(ConfigManager::EXPERIENCE_COLOR);
if(color < 0)
color = random_range(0, 255);
std::stringstream ss;
ss << (uint64_t)gainExp;
g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str());
}[/cpp]