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 | |
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
-rw-r--r-- | src/config/classes/general.h | 1 | ||||
-rw-r--r-- | src/config/classes/swordsman.h | 16 | ||||
-rw-r--r-- | src/map/Makefile.in | 2 | ||||
-rw-r--r-- | src/map/skill.c | 29 |
4 files changed, 18 insertions, 30 deletions
diff --git a/src/config/classes/general.h b/src/config/classes/general.h index aefbbbedb..6e6cc1425 100644 --- a/src/config/classes/general.h +++ b/src/config/classes/general.h @@ -19,6 +19,5 @@ /** * No settings past this point **/ -#include "swordsman.h" #endif // _CONFIG_GENERAL_H_ diff --git a/src/config/classes/swordsman.h b/src/config/classes/swordsman.h deleted file mode 100644 index a3638fd11..000000000 --- a/src/config/classes/swordsman.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder -#ifndef _CONFIG_SKILLS_SWORDS_H_ -#define _CONFIG_SKILLS_SWORDS_H_ -/** - * rAthena configuration file (http://rathena.org) - * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ - **/ - -/// Rune Knight -/// -/// maximum number of runes that a rune knight character can carry at any given time -/// default: 20 -#define MAX_RUNE 20 - -#endif // _CONFIG_SKILLS_SWORDS_H_ 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; |