diff options
author | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-30 09:15:12 +0000 |
---|---|---|
committer | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-30 09:15:12 +0000 |
commit | c1af98341a057da28d80615f6bb325ef1d24e2d2 (patch) | |
tree | 24562bd22f1ede8062c7514352ad4153caccbe9d /src/map | |
parent | d5b0b8a2d33541d03f6ede756b1dc7948aecd39e (diff) | |
download | hercules-c1af98341a057da28d80615f6bb325ef1d24e2d2.tar.gz hercules-c1af98341a057da28d80615f6bb325ef1d24e2d2.tar.bz2 hercules-c1af98341a057da28d80615f6bb325ef1d24e2d2.tar.xz hercules-c1af98341a057da28d80615f6bb325ef1d24e2d2.zip |
- Removed redundant config after the Item Stacking System was added in r16279.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16535 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/Makefile.in | 2 | ||||
-rw-r--r-- | src/map/skill.c | 29 |
2 files changed, 18 insertions, 13 deletions
diff --git a/src/map/Makefile.in b/src/map/Makefile.in index a1f1bbd03..8e97221a7 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -27,7 +27,7 @@ MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \ log.h mail.h date.h unit.h homunculus.h mercenary.h quest.h instance.h mapreg.h \ buyingstore.h searchstore.h duel.h pc_groups.h \ ../config/core.h ../config/renewal.h ../config/secure.h ../config/const.h \ - ../config/classes/general.h ../config/classes/swordsman.h elemental.h + ../config/classes/general.h elemental.h HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) diff --git a/src/map/skill.c b/src/map/skill.c index f93d5b772..1483919f0 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -15347,22 +15347,27 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in } if( skill_id == RK_RUNEMASTERY ) { int temp_qty, skill_lv = pc_checkskill(sd,skill_id); + data = itemdb_search(nameid); + if( skill_lv == 10 ) temp_qty = 1 + rnd()%3; else if( skill_lv > 5 ) temp_qty = 1 + rnd()%2; else temp_qty = 1; - for( i = 0; i < MAX_INVENTORY; i++ ) { - if( sd->status.inventory[i].nameid == nameid ) { - if( sd->status.inventory[i].amount >= MAX_RUNE ) { - clif_msgtable(sd->fd,0x61b); - return 0; - } else { - /** - * the amount fits, say we got temp_qty 4 and 19 runes, we trim temp_qty to 1. - **/ - if( temp_qty + sd->status.inventory[i].amount >= MAX_RUNE ) - temp_qty = MAX_RUNE - sd->status.inventory[i].amount; + + if (data->stack.inventory) { + for( i = 0; i < MAX_INVENTORY; i++ ) { + if( sd->status.inventory[i].nameid == nameid ) { + if( sd->status.inventory[i].amount >= data->stack.amount ) { + clif_msgtable(sd->fd,0x61b); + return 0; + } else { + /** + * the amount fits, say we got temp_qty 4 and 19 runes, we trim temp_qty to 1. + **/ + if( temp_qty + sd->status.inventory[i].amount >= data->stack.amount ) + temp_qty = data->stack.amount - sd->status.inventory[i].amount; + } + break; } - break; } } qty = temp_qty; |