Jump to content
  • 0

Max EXP > 100%


beszurlp

Question

Hello, I have a question and namely I have EXP ring in inventory (+50%) also top left (+50%) and mount +50%.

However, I only get maximum 100% out when I kill a mob, it does not count the other 50% with....

Where is it possible to change this?

It's about this bonus POINT_MALL_EXPBONUS

 

This is my char_battle.cpp

Spoiler

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);

}

}

 

Edited by beszurlp
Link to post

1 answer to this question

Recommended Posts

  • 0
  • VIP

Search this in char.cpp

	case POINT_EXP_DOUBLE_BONUS: // 71
	case POINT_GOLD_DOUBLE_BONUS: // 72
	case POINT_ITEM_DROP_BONUS: // 73
	case POINT_POTION_BONUS: // 74
		if (GetPoint(type) + amount > 100) //here 100 is the maximum amount of % exp player get it
		{
			sys_err("BONUS exceeded over 100!! point type: %d name: %s amount %lld", type, GetName(), amount);
			amount = 100 - GetPoint(type);
		}

 

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.