Я только начинаю разбираться в C# и наткнулся на такой код, пару дней использования Google не дало результата
package YoPackage
{
// cServer.cs
function _connectToGameServer()
{
// already connected
hack("yo::connectToGameServer" SPC $tmp::pendingSpawnGeoID);
if(!isObject(ServerConnection))
{
error("no ServerConnection object");
return;
}
// check loading status
if(!ServerConnection.initPatchesDone)
{
echo("Waiting for managers init");
return;
}
if(!ServerConnection.initManagersDone)
{
echo("Waiting for patches done");
return;
}
ServerConnection.initStartupDone = true;
commandToPeer(ServerConnection, 'ClientReadyToEnterGame');
}
// serverConnection.cs
function startConnection(%addr)
{
hack("yo::startConnection(" @ %addr @ ")"); //###
loadLoadingGui(GetMessageIDText(1340)); //Waiting for Server
// obtain IP address
%addrSpaced = strreplace(%addr, ":", " ");
if(getWordCount(%addrSpaced) != 2)
{
error("invalid address");
return;
}
%ip = getWord(%addrSpaced, 0);
$tmp::regionServerIP = %ip;
connect(%addr);
}
// cServer.cs
function peerCmdCS(%peer, %serverPort, %accountHash)
{
$tmp::contentServerPort = %serverPort;
$tmp::contentServerHash = %accountHash;
schedule(32, PlayGui, connectToContentServer);
loadLoadingGui(GetMessageIDText(1523)); //Patching World
}