Jump to content
  • 0

Regarding [VIP System] about vip_drop_increase:


Question

Posted (edited)

How to exclude the item_rate_card on

vip_drop_increase:
I can't find any hint how can i exclude the item_rate_card on this src
if (pc_isvip(sd)) { // Increase item drop rate for VIP.
				// Unsure how the VIP and other bonuses should stack, this is additive.
				drop_rate_bonus += battle_config.vip_drop_increase;
				cap = battle_config.drop_rate_cap_vip;
			} else
				cap = battle_config.drop_rate_cap;

			drop_rate = (int)( 0.5 + drop_rate * drop_rate_bonus / 100. );

			// Now limit the drop rate to never be exceed the cap (default: 90%), unless it is originally above it already.
			if( drop_rate > cap && base_rate < cap ){
				drop_rate = cap;
			}

 

Edited by Jayz

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

in the mob_dead(...)

search for 

drop_rate = mob_getdroprate(src, md->db, md->db->dropitem[i].rate, drop_modifier);

replace with

if (it->type == IT_CARD)
	drop_rate = md->db->dropitem[i].rate;
else
	drop_rate = mob_getdroprate(src, md->db, md->db->dropitem[i].rate, drop_modifier);

hmm... nvm this actually removed all modifier.

 

 

it probably better if you pass the item type into 

drop_rate = mob_getdroprate(src, md->db, md->db->dropitem[i].rate, drop_modifier, it);

then

int mob_getdroprate(struct block_list *src, std::shared_ptr<s_mob_db> mob, int base_rate, int drop_modifier,struct item_data it)

then add the item type checking to skip if its card and is vip

if (pc_isvip(sd) && it->type != IT_CARD) { // Increase item drop rate for VIP.

 

Edited by Emistry
  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...