* Merged fixes from trunk for script command 'checkweight' (r14631) and skill-based item production (r14633).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/renewal@14634 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ai4rei 2010-12-27 11:30:00 +00:00
parent 2b6f273e92
commit 0ac09ae0aa
3 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,7 @@
Date Added Date Added
2010/12/27
* Merged fixes from trunk for script command 'checkweight' (r14631) and skill-based item production (r14633). [Ai4rei]
2010/12/26 2010/12/26
* Merged changes from trunk (r14496:14630). [Ai4rei] * Merged changes from trunk (r14496:14630). [Ai4rei]
2010/11/23 2010/11/23

View File

@ -5411,6 +5411,7 @@ BUILDIN_FUNC(checkweight)
if( id == NULL ) if( id == NULL )
{ {
ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was
script_pushint(st,0);
return 1; return 1;
} }
@ -5420,6 +5421,7 @@ BUILDIN_FUNC(checkweight)
if( amount < 1 ) if( amount < 1 )
{ {
ShowError("buildin_checkweight: Invalid amount '%d'.\n", amount); ShowError("buildin_checkweight: Invalid amount '%d'.\n", amount);
script_pushint(st,0);
return 1; return 1;
} }
@ -5461,6 +5463,7 @@ BUILDIN_FUNC(checkweight)
return 0; return 0;
} }
script_pushint(st,1);
return 0; return 0;
} }

View File

@ -10750,6 +10750,11 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
if( i >= MAX_SKILL_PRODUCE_DB ) if( i >= MAX_SKILL_PRODUCE_DB )
return 0; return 0;
if( pc_checkadditem(sd, nameid, qty) == ADDITEM_OVERAMOUNT )
{// cannot carry the produced stuff
return 0;
}
if(trigger>=0){ if(trigger>=0){
if(trigger>20) { // Non-weapon, non-food item (itemlv must match) if(trigger>20) { // Non-weapon, non-food item (itemlv must match)
if(skill_produce_db[i].itemlv!=trigger) if(skill_produce_db[i].itemlv!=trigger)