소스 검색

* Fixed @item2 and script command 'getitem2' not taking MAX_REFINE define into consideration (bugreport:4804).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14739 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 년 전
부모
커밋
015d2ae95c
3개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/atcommand.c
  3. 1 1
      src/map/script.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/03/08
+	* Fixed @item2 and script command 'getitem2' not taking MAX_REFINE define into consideration (bugreport:4804). [Ai4rei]
 	* Fixed @str/@agi/@vit/@int/@dex/@luk commands setting a stat to 0 (rather than 1), when exact amount is subtracted (bugreport:4803, since r14493). [Ai4rei]
 2011/03/07
 	* Cleaned up packet dumping code. [Ai4rei]

+ 2 - 2
src/map/atcommand.c

@@ -1673,8 +1673,8 @@ ACMD_FUNC(item2)
 			}
 			if (item_data->type == IT_PETARMOR)
 				refine = 0;
-			if (refine > 10)
-				refine = 10;
+			if (refine > MAX_REFINE)
+				refine = MAX_REFINE;
 		} else {
 			identify = 1;
 			refine = attr = 0;

+ 1 - 1
src/map/script.c

@@ -5694,7 +5694,7 @@ BUILDIN_FUNC(getitem2)
 		if (item_data == NULL)
 			return -1;
 		if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR){
-			if(ref > 10) ref = 10;
+			if(ref > MAX_REFINE) ref = MAX_REFINE;
 		}
 		else if(item_data->type==IT_PETEGG) {
 			iden = 1;