Jump to content
  • 0

Regarding [VIP System] about vip_drop_increase:


Jayz

Question


  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  395
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

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

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

The drop increase for VIP is globally for items and cards. But yeah this is great feature im we can somehow exclude which item type.

Link to comment
Share on other sites

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.

×
×
  • Create New...