Issue information

Issue ID
#2472
Status
Invalid
Severity
None
Started
Hercules Elf Bot
Nov 23, 2008 11:57
Last Post
Hercules Elf Bot
Apr 19, 2012 8:52
Confirmation
N/A

Hercules Elf Bot - Nov 23, 2008 11:57

Originally posted by [b]Naxan[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2472

I don't know very well if it's correct but I took a look in source code, and I saw "if negative then it depends of the level", but the value who is check is the rate of the item, and the rate is taken with "bonus2 bAddMonsterDropItem,itemid,rate" (and there are no difference with mimic, myst case and the other card when this script command is executed)

In mob.c :
QUOTE
if(sd->add_drop[i].rate < 0) {
//it's negative, then it should be multiplied. e.g. for Mimic,Myst Case Cards, etc
// rate = base_rate * (mob_level/10) + 1
drop_rate = -sd->add_drop[i].rate*(md->level/10)+1;
drop_rate = cap_value(drop_rate, battle_config.item_drop_adddrop_min, battle_config.item_drop_adddrop_max);
if (drop_rate > 10000) drop_rate = 10000;

add_drop.rate is found in pc.c (pc_bonus_item_drop)

QUOTE
Apply with rate of the server
if (battle_config.item_rate_adddrop != 100)
rate = rate*battle_config.item_rate_adddrop/100;
if (rate > -1)
rate = -1;

And stock into array
drop[i].rate = rate;


function (pc_bonus_item_drop) called in pc_bonus2, pc.c too
QUOTE
case SP_ADD_MONSTER_DROP_ITEM:
if (sd->state.lr_flag != 2)
pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, (1<<RC_BOSS)|(1<<RC_NONBOSS), val);
break;


val is the rate, and is called in script.c with bonus
QUOTE
case 2:
val2 = script_getnum(st,4);
pc_bonus2(sd, type, val1, val2);
break;


and val2 is the last element ask in the fonction bonus2 !

So I ask if the value of item_db should not be negative? For example, Should myst case effect be "bonus2 bAddMonsterDropItem,644,-30" and not "bonus2 bAddMonsterDropItem,644,30"?

Thanks for answer !

This post has been edited by Naxan: Nov 23 2008, 04:08 AM

Hercules Elf Bot - Jan 3, 2012 23:11

Originally posted by [b]Gepard[/b]
It's not a bug report.