Explorar o código

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

Atemo %!s(int64=9) %!d(string=hai) anos
pai
achega
501751df39
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;