summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/script.c7
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c2
4 files changed, 9 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5db1502c1..9c55f5d9b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -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;
diff --git a/src/map/script.c b/src/map/script.c
index 28cb7ed7e..4d8c820cf 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -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;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 157a7abda..f991275a6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -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]);
diff --git a/src/map/status.c b/src/map/status.c
index 3b6d0460a..ddc3ce745 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -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)