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

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

Atemo пре 9 година
родитељ
комит
501751df39
1 измењених фајлова са 3 додато и 1 уклоњено
  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;