Esempio n. 1
0
    public static void Entrar(byte Index)
    {
        // Previni que alguém que já está online de logar
        if (IsPlaying(Index))
        {
            return;
        }

        // Defines that the player is inside the Game
        Lists.TempPlayer[Index].Playing = true;

        // Envia todos os dados necessários
        Sending.Entrada(Index);
        Sending.Players_Data_Map(Index);
        Sending.Player_Experience(Index);
        Sending.Player_Inventory(Index);
        Sending.Player_Hotbar(Index);
        Sending.Items(Index);
        Sending.NPCs(Index);
        Sending.Map_Items(Index, Character(Index).Map);

        // Transports the player to his determined position
        Transportar(Index, Character(Index).Map, Character(Index).X, Character(Index).Y);

        // Enter the Game
        Sending.Entrar(Index);
        Sending.Message(Index, Lists.Server_Data.Message, Color.Blue);
    }