Explorar el Código

* 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).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14738 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei hace 14 años
padre
commit
ed0711d6a1
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/atcommand.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2011/03/08
+	* 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]
 	- Replaced utils function 'dump' with 'WriteDump' (files) and 'ShowDump' (console), and used those to replace inlined code in clif (related r10947).

+ 1 - 1
src/map/atcommand.c

@@ -3009,7 +3009,7 @@ ACMD_FUNC(param)
 	status[4] = &sd->status.dex;
 	status[5] = &sd->status.luk;
 
-	if(value < 0 && *status[i] < -value)
+	if(value < 0 && *status[i] <= -value)
 	{
 		new_value = 1;
 	}