fix npc wandering crashing the entire server >_<

This commit is contained in:
SilicaAndPina 2021-02-15 17:28:53 +13:00
parent 0cf1665a11
commit 6322b2d2b6

View file

@ -177,6 +177,8 @@ namespace HISP.Game
if (GameServer.GetUsersAt(this.X, this.Y, true, true).Length > 0)
return;
if (UdlrScriptPos > UDLRScript.Length)
UdlrScriptPos = 0;
switch (UDLRScript.ToLower()[UdlrScriptPos])
{
@ -198,10 +200,8 @@ namespace HISP.Game
break;
}
if (UdlrScriptPos > UDLRScript.Length)
UdlrScriptPos = 0;
else
UdlrScriptPos++;
UdlrScriptPos++;
}
}