Hallo, ich habe eine Frage und zwar habe ich EXP-Ring im Inventar (+50%) außerdem oben links (+50%) und Mount +50%
Ich bekomme allerdings nur Maximum 100% raus, wenn ich ein Mob töte, die weiteren 50% zählt er nicht mit....
Wo kann man das ändern?
Es geht um diesen Bonus POINT_MALL_EXPBONUS
Das ist meine char_battle.cpp
static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp)
{
if (test_server && iExp < 0)
{
to->ChatPacket(CHAT_TYPE_INFO, "exp(%d) overflow", iExp);
return;
}
// decrease/increase exp based on player<>mob level
rate_t lvFactor = static_cast<rate_t>(NEW_GET_LVDELTA(to->GetLevel(), from->GetLevel())) / 100.0L;
iExp *= lvFactor;
// start calculating rate exp bonus
int iBaseExp = iExp;
rate_t rateFactor = 100;
if (distribution_test_server)
rateFactor *= 3;
rateFactor += CPrivManager::instance().GetPriv(to, PRIV_EXP_PCT);
if (to->IsEquipUniqueItem(UNIQUE_ITEM_LARBOR_MEDAL))
rateFactor += 20;
if (to->GetMapIndex() >= 660000 && to->GetMapIndex() < 670000)
rateFactor += 20;
if (to->GetPoint(POINT_EXP_DOUBLE_BONUS))
if (number(1, 100) <= to->GetPoint(POINT_EXP_DOUBLE_BONUS))
rateFactor += 30;
if (to->IsEquipUniqueItem(UNIQUE_ITEM_DOUBLE_EXP))
rateFactor += 50;
switch (to->GetMountVnum())
{
case 20110:
case 20111:
case 20112:
case 20113:
if (to->IsEquipUniqueItem(71115) to->IsEquipUniqueItem(71117) to->IsEquipUniqueItem(71119)
to->IsEquipUniqueItem(71121) )
{
rateFactor += 10;
}
break;
case 20114:
case 20120:
case 20121:
case 20122:
case 20123:
case 20124:
case 20125:
rateFactor += 30;
break;
}
if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
rateFactor += 50;
if (to->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_EXP))
rateFactor += 50;
if (to->GetPoint(POINT_PC_BANG_EXP_BONUS) > 0)
{
if (to->IsPCBang())
rateFactor += to->GetPoint(POINT_PC_BANG_EXP_BONUS);
}
rateFactor += to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS);
rateFactor += to->GetPoint(POINT_RAMADAN_CANDY_BONUS_EXP);
rateFactor += to->GetPoint(POINT_MALL_EXPBONUS);
rateFactor += to->GetPoint(POINT_EXP);
// useless (never used except for china intoxication) = always 100
rateFactor = rateFactor * static_cast<rate_t>(CHARACTER_MANAGER::instance().GetMobExpRate(to))/100.0L;
// apply calculated rate bonus
iExp *= (rateFactor/100.0L);
if (test_server)
to->ChatPacket(CHAT_TYPE_INFO, "base_exp(%d) * rate(%Lf) = exp(%d)", iBaseExp, rateFactor/100.0L, iExp);
// you can get at maximum only 10% of the total required exp at once (so, you need to kill at least 10 mobs to level up) (useless)
iExp = MIN(to->GetNextExp() / 10, iExp);
// it recalculate the given exp if the player level is greater than the exp_table size (useless)
iExp = AdjustExpByLevel(to, iExp);
if (test_server)
to->ChatPacket(CHAT_TYPE_INFO, "exp+minGNE+adjust(%d)", iExp);
#ifdef NEW_PET_SYSTEM
if (to->GetNewPetSystem()) {
if (to->GetNewPetSystem()->IsActivePet() && to->GetNewPetSystem()->GetLevelStep() < 4) {
int tmpexp = iExp * 9 / 20;
iExp = iExp - tmpexp;
to->GetNewPetSystem()->SetExp(tmpexp, 0);
}
}