Jump to content
  • 0

i found Bug on TF_STEAL


rongrong

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  13
  • Reputation:   0
  • Joined:  11/03/22
  • Last Seen:  

Bug Description:  skill TF_STEAL ONLY obtain the first item on the mob's drop list (no matter how low the droprate is)

Condition:  1. PRE-RENEWAL Server.

                   2. Bug occurred when char's DEX < mob's DEX, and get right when char‘s DEX >= mob's DEX.

Possible Code:

    // base skill success chance (percentual)
    rate = (sd_status->dex - md_status->dex)/2 + skill_lv*6 + 4; // bug rate < 64
    rate += sd->bonus.add_steal_rate;

    if( rate < 1
#ifdef RENEWAL
        || rnd()%100 >= rate
#endif
    )
        return false;

    // Try dropping one item, in the order from first to last possible slot.
    // Droprate is affected by the skill success rate.

    for( i = 0; i < MAX_MOB_DROP; i++ )
        if( item_db.exists(md->db->dropitem[i].nameid) && !md->db->dropitem[i].steal_protected && rnd() % 10000 < md->db->dropitem[i].rate
#ifndef RENEWAL
        * rate/100.  // i cant find the bug
#endif
        )
            break;
    if( i == MAX_MOB_DROP )
        return false;

    itemid = md->db->dropitem[i].nameid;
    struct item tmp_item = {};
    tmp_item.nameid = itemid;
    tmp_item.amount = 1;
    tmp_item.identify = itemdb_isidentified(itemid);
    if( battle_config.skill_steal_random_options ){
        mob_setdropitem_option( &tmp_item, &md->db->dropitem[i] );
    }
    flag = pc_additem(sd,&tmp_item,1,LOG_TYPE_PICKDROP_PLAYER);

Edited by rongrong
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...