diff options
-rw-r--r-- | Changelog-Renewal.txt | 2 | ||||
-rw-r--r-- | src/map/script.c | 3 | ||||
-rw-r--r-- | src/map/skill.c | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Changelog-Renewal.txt b/Changelog-Renewal.txt index ed353115c..4d0faaaf6 100644 --- a/Changelog-Renewal.txt +++ b/Changelog-Renewal.txt @@ -1,5 +1,7 @@ Date Added +2010/12/27 + * Merged fixes from trunk for script command 'checkweight' (r14631) and skill-based item production (r14633). [Ai4rei] 2010/12/26 * Merged changes from trunk (r14496:14630). [Ai4rei] 2010/11/23 diff --git a/src/map/script.c b/src/map/script.c index 773f8d6c4..59a9b5448 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5411,6 +5411,7 @@ BUILDIN_FUNC(checkweight) if( id == NULL ) { ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was + script_pushint(st,0); return 1; } @@ -5420,6 +5421,7 @@ BUILDIN_FUNC(checkweight) if( amount < 1 ) { ShowError("buildin_checkweight: Invalid amount '%d'.\n", amount); + script_pushint(st,0); return 1; } @@ -5461,6 +5463,7 @@ BUILDIN_FUNC(checkweight) return 0; } + script_pushint(st,1); return 0; } diff --git a/src/map/skill.c b/src/map/skill.c index 3c4cbcd21..6b63c2b83 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10750,6 +10750,11 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger, if( i >= MAX_SKILL_PRODUCE_DB ) return 0; + if( pc_checkadditem(sd, nameid, qty) == ADDITEM_OVERAMOUNT ) + {// cannot carry the produced stuff + return 0; + } + if(trigger>=0){ if(trigger>20) { // Non-weapon, non-food item (itemlv must match) if(skill_produce_db[i].itemlv!=trigger) |