Jump to content

Recommended Posts

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 comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 113

      Ulthar SF V2 (TMP4 Base)

    2. 2

      Feeding game source to LLM

    3. 0

      Target Information System

    4. 2

      Feeding game source to LLM

    5. 2

      anti exp explanation pls

    6. 2

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.