- Fixed the pc_additem weight check breaking when your current weight is above your max.
- Some minor cleanups. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11621 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
21b1d27fb7
commit
fe0c93c77b
@ -2826,7 +2826,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
|
||||
|
||||
data = itemdb_search(item_data->nameid);
|
||||
w = data->weight*amount;
|
||||
if(w > sd->max_weight - sd->weight)
|
||||
if(sd->weight + w > sd->max_weight)
|
||||
return 2;
|
||||
|
||||
i = MAX_INVENTORY;
|
||||
|
@ -5892,8 +5892,11 @@ BUILDIN_FUNC(countitem)
|
||||
nameid = conv_num(st,data);
|
||||
|
||||
if (nameid < 500) {
|
||||
if(battle_config.error_log) ShowError("wrong item ID : countitem(%i)\n", nameid);
|
||||
script_reportsrc(st);
|
||||
if(battle_config.error_log)
|
||||
{
|
||||
ShowError("wrong item ID : countitem(%i)\n", nameid);
|
||||
script_reportsrc(st);
|
||||
}
|
||||
script_pushint(st,0);
|
||||
return 1;
|
||||
}
|
||||
|
@ -8775,7 +8775,7 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
|
||||
|
||||
if((skill == AM_POTIONPITCHER ||
|
||||
skill == CR_SLIMPITCHER ||
|
||||
skill == CR_CULTIVATION) && i != lv%11 - 1)//TODO huh? what is this for? [FlavioJS]
|
||||
skill == CR_CULTIVATION) && i != lv%11 - 1)//TODO huh? what is this for? [FlavioJS] //These itemsdo not need a check versus ALL their item requirements, but only versus the item in the same slot position (eg: lv1 requires only item[0], lv5 requires only item[4]) [Skotlex]
|
||||
continue;
|
||||
|
||||
index[i] = pc_search_inventory(sd,itemid[i]);
|
||||
|
@ -3366,6 +3366,7 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan
|
||||
{
|
||||
if(!sc || !sc->count)
|
||||
return cap_value(batk,0,USHRT_MAX);
|
||||
|
||||
if(sc->data[SC_INCBASEATK].timer!=-1)
|
||||
batk += sc->data[SC_INCBASEATK].val1;
|
||||
if(sc->data[SC_ATKPOTION].timer!=-1)
|
||||
@ -3464,6 +3465,7 @@ static signed short status_calc_critical(struct block_list *bl, struct status_ch
|
||||
{
|
||||
if(!sc || !sc->count)
|
||||
return cap_value(critical,10,SHRT_MAX);
|
||||
|
||||
if (sc->data[SC_INCCRI].timer!=-1)
|
||||
critical += sc->data[SC_INCCRI].val2;
|
||||
if (sc->data[SC_EXPLOSIONSPIRITS].timer!=-1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user