Ir para conteúdo

Remover exp de summon


Posts Recomendados

Gostaria da ajuda de vocês pra remover a exp que o summon ganha, e fazer com que o player receba a exp toda, creio que seja nessa parte, mas como não tenho certeza e não quero arriscar tirar a exp party gostaria da ajuda de vcs, uso tfs 0.4 serv 8.71

void CreatureonTargetKilled(Creature* target){    if(target == this)        return;     double exp = target->getGainedExperience(this);    onGainExperience(exp, target, false);} bool CreatureonKilledCreature(Creature* target, DeathEntry& entry){    bool ret = true;    if(master)        ret = master->onKilledCreature(target, entry);     CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_KILL);    if(!entry.isLast())    {        for(CreatureEventListiterator it = killEvents.begin(); it != killEvents.end(); ++it)            (*it)->executeKill(this, target, entry);         return true;    }     for(CreatureEventListiterator it = killEvents.begin(); it != killEvents.end(); ++it)    {        if(!(*it)->executeKill(this, target, entry) && ret)            ret = false;    }     return ret;} void CreatureonGainExperience(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(ConfigManagerRATE_EXPERIENCE);     int16_t color = g_config.getNumber(ConfigManagerEXPERIENCE_COLOR);    if(color < 0)        color = random_range(0, 255);     stdstringstream ss;    ss << (uint64_t)gainExp;    g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str());} void CreatureonGainSharedExperience(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(ConfigManagerRATE_EXPERIENCE);     int16_t color = g_config.getNumber(ConfigManagerEXPERIENCE_COLOR);    if(color < 0)        color = random_range(0, 255);     stdstringstream ss;    ss << (uint64_t)gainExp;    g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str());}

 

Link para o comentário
Compartilhar em outros sites

9 horas atrás, balla1009 disse:

Gostaria da ajuda de vocês pra remover a exp que o summon ganha, e fazer com que o player receba a exp toda, creio que seja nessa parte, mas como não tenho certeza e não quero arriscar tirar a exp party gostaria da ajuda de vcs, uso tfs 0.4 serv 8.71

void CreatureonTargetKilled(Creature* target){    if(target == this)        return;     double exp = target->getGainedExperience(this);    onGainExperience(exp, target, false);} bool CreatureonKilledCreature(Creature* target, DeathEntry& entry){    bool ret = true;    if(master)        ret = master->onKilledCreature(target, entry);     CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_KILL);    if(!entry.isLast())    {        for(CreatureEventListiterator it = killEvents.begin(); it != killEvents.end(); ++it)            (*it)->executeKill(this, target, entry);         return true;    }     for(CreatureEventListiterator it = killEvents.begin(); it != killEvents.end(); ++it)    {        if(!(*it)->executeKill(this, target, entry) && ret)            ret = false;    }     return ret;} void CreatureonGainExperience(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(ConfigManagerRATE_EXPERIENCE);     int16_t color = g_config.getNumber(ConfigManagerEXPERIENCE_COLOR);    if(color < 0)        color = random_range(0, 255);     stdstringstream ss;    ss << (uint64_t)gainExp;    g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str());} void CreatureonGainSharedExperience(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(ConfigManagerRATE_EXPERIENCE);     int16_t color = g_config.getNumber(ConfigManagerEXPERIENCE_COLOR);    if(color < 0)        color = random_range(0, 255);     stdstringstream ss;    ss << (uint64_t)gainExp;    g_game.addAnimatedText(getPosition(), (uint8_t)color, ss.str());}

 

EU que é no onSharedExperience e no onTargetKilled, não tenho certeza

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...