Exemplo n.º 1
0
    /**
     * 登录--只知道Mac地址
     */
    public Role Login(string mac)
    {
        // 获取Mac地址账号
        MacAccount macAccount = GetMacAccount(mac);

        return(Login(mac, macAccount.lastPlatformId, macAccount.lastServerId));
    }
Exemplo n.º 2
0
    /**
     * 登录--选了平台,服务器ID
     */
    public Role Login(string mac, int platformId, int serverId)
    {
        // 获取Mac地址账号
        MacAccount macAccount = GetMacAccount();

        // 保存最后一次登录信息
        macAccount.SetLast(platformId, serverId);


        // 获取平台账号
        PlatformAccount platformAccount = GetPlatformAccount();

        // 保存最后一次登录信息
        platformAccount.SetLast(serverId);



        // 获取服务器
        GameServer server = GetServer(serverId);
        // 登录游戏服务器
        Role role = server.Login();

        // return 角色信息
        return(role);
    }