Pārlūkot izejas kodu

- corrected getequipid warning when nothing equipped
- getstatus should push -1 for infinite timer

Atemo 9 gadi atpakaļ
vecāks
revīzija
501751df39
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      src/map/script.c

+ 3 - 1
src/map/script.c

@@ -8408,7 +8408,7 @@ BUILDIN_FUNC(getequipid)
 	if( i < 0 )
 	{
 		script_pushint(st,-1);
-		return SCRIPT_CMD_FAILURE;
+		return SCRIPT_CMD_SUCCESS;
 	}
 
 	item = sd->inventory_data[i];
@@ -11168,6 +11168,8 @@ BUILDIN_FUNC(getstatus)
 				if( timer )
 				{// return the amount of time remaining
 					script_pushint(st, timer->tick - gettick());
+				} else {
+					script_pushint(st, -1);
 				}
 			}
 			break;