Преглед изворни кода

- Removed redundant config after the Item Stacking System was added in r16279.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16535 54d463be-8e91-2dee-dedb-b68131a5f0ec
brianluau пре 12 година
родитељ
комит
d5b66f9177
4 измењених фајлова са 18 додато и 30 уклоњено
  1. 0 1
      src/config/classes/general.h
  2. 0 16
      src/config/classes/swordsman.h
  3. 1 1
      src/map/Makefile.in
  4. 17 12
      src/map/skill.c

+ 0 - 1
src/config/classes/general.h

@@ -19,6 +19,5 @@
 /**
  * No settings past this point
  **/
-#include "swordsman.h"
 
 #endif // _CONFIG_GENERAL_H_

+ 0 - 16
src/config/classes/swordsman.h

@@ -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_

+ 1 - 1
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)

+ 17 - 12
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;