Exemplo n.º 1
0
        public static User FromSFSArray(ISFSArray sfsa, Room room)
        {
            User user = new SFSUser(sfsa.GetInt(0), sfsa.GetUtfString(1));

            user.PrivilegeId = sfsa.GetShort(2);
            if (room != null)
            {
                user.SetPlayerId(sfsa.GetShort(3), room);
            }
            ISFSArray sFSArray = sfsa.GetSFSArray(4);

            for (int i = 0; i < sFSArray.Size(); i++)
            {
                user.SetVariable(SFSUserVariable.FromSFSArray(sFSArray.GetSFSArray(i)));
            }
            return(user);
        }