Beispiel #1
0
    // Token: 0x06000893 RID: 2195 RVA: 0x0007D1F0 File Offset: 0x0007B3F0
    public override void switchToMe()
    {
        GameCanvas.connect();
        GameScr.cmy = 0;
        GameScr.cmx = 0;
        this.initCommand();
        ServerListScreen.isWait = false;
        GameCanvas.loginScr     = null;
        string text = Rms.loadRMSString("ResVersion");

        if (((text == null || !(text != string.Empty)) ? -1 : int.Parse(text)) > 0)
        {
            ServerListScreen.loadScreen = true;
            GameCanvas.loadBG(0);
        }
        ServerListScreen.bigOk = true;
        this.cmd[2 + this.nCmdPlay].caption = mResources.server + ": " + ServerListScreen.nameServer[ServerListScreen.ipSelect];
        this.center = new Command(string.Empty, this, this.cmd[ServerListScreen.selected].idAction, null);
        this.cmd[1 + this.nCmdPlay].caption = mResources.change_account;
        if (this.cmd.Length == 4 + this.nCmdPlay)
        {
            this.cmd[3 + this.nCmdPlay].caption = mResources.option;
        }
        base.switchToMe();
    }
 // Token: 0x060002B3 RID: 691 RVA: 0x000157E0 File Offset: 0x000139E0
 public static void blendcurrBg(short id, Image img)
 {
     for (int i = 0; i < TileMap.vCurrItem.size(); i++)
     {
         BgItem bgItem = (BgItem)TileMap.vCurrItem.elementAt(i);
         if (bgItem.idImage == id && !bgItem.isNotBlend() && (int)bgItem.layer != 2 && (int)bgItem.layer != 4 && !BgItem.imgNew.containsKey(bgItem.idImage + "blend" + bgItem.layer))
         {
             sbyte[] array = Rms.loadRMS(string.Concat(new object[]
             {
                 "x",
                 mGraphics.zoomLevel,
                 "blend",
                 id,
                 "layer",
                 bgItem.layer
             }));
             if (array == null)
             {
                 BgItem.imgNew.put(bgItem.idImage + "blend" + bgItem.layer, BgItemMn.blendImage(img, (int)bgItem.layer, (int)bgItem.idImage));
             }
             else
             {
                 Image v = Image.createImage(array, 0, array.Length);
                 BgItem.imgNew.put(bgItem.idImage + "blend" + bgItem.layer, v);
             }
         }
     }
 }
 // Token: 0x060002AE RID: 686 RVA: 0x00014E98 File Offset: 0x00013098
 public void changeColor()
 {
     if (!this.isNotBlend() && (int)this.layer != 2 && (int)this.layer != 4 && !BgItem.imgNew.containsKey(this.idImage + "blend" + this.layer))
     {
         Image image = (Image)BgItem.imgNew.get(this.idImage + string.Empty);
         if (image != null && image.getRealImageWidth() > 4)
         {
             sbyte[] array = Rms.loadRMS(string.Concat(new object[]
             {
                 "x",
                 mGraphics.zoomLevel,
                 "blend",
                 this.idImage,
                 "layer",
                 this.layer
             }));
             if (array == null)
             {
                 BgItem.imgNew.put(this.idImage + "blend" + this.layer, BgItemMn.blendImage(image, (int)this.layer, (int)this.idImage));
             }
             else
             {
                 Image v = Image.createImage(array, 0, array.Length);
                 BgItem.imgNew.put(this.idImage + "blend" + this.layer, v);
             }
         }
     }
 }
 // Token: 0x0600012B RID: 299 RVA: 0x0000BDF4 File Offset: 0x00009FF4
 private void FixedUpdate()
 {
     Rms.update();
     this.count++;
     if (this.count < 10)
     {
         return;
     }
     this.setsizeChange();
     this.updateCount++;
     ipKeyboard.update();
     GameMidlet.gameCanvas.update();
     Image.update();
     DataInputStream.update();
     SMS.update();
     Net.update();
     Main.f++;
     if (Main.f > 8)
     {
         Main.f = 0;
     }
     if (!Main.isPC)
     {
         int num = 1 / Main.a;
     }
 }
Beispiel #5
0
 // Token: 0x060008A0 RID: 2208 RVA: 0x0007DB4C File Offset: 0x0007BD4C
 public override void update()
 {
     if (SplashScr.splashScrStat == 30 && !this.isCheckConnect)
     {
         this.isCheckConnect = true;
         if (Rms.loadRMSInt("isPlaySound") != -1)
         {
             GameCanvas.isPlaySound = (Rms.loadRMSInt("isPlaySound") == 1);
         }
         if (GameCanvas.isPlaySound)
         {
             SoundMn.gI().loadSound(TileMap.mapID);
         }
         SoundMn.gI().getStrOption();
         if (Rms.loadRMSInt("svselect") == -1)
         {
             ServerListScreen.loadIP();
         }
         else
         {
             ServerListScreen.loadIP();
         }
     }
     SplashScr.splashScrStat++;
     ServerListScreen.updateDeleteData();
 }
Beispiel #6
0
    // Token: 0x060003DE RID: 990 RVA: 0x0001E0A0 File Offset: 0x0001C2A0
    public void readImage()
    {
        int num = 0;

        try
        {
            DataInputStream dataInputStream = new DataInputStream(Rms.loadRMS("NR_image"));
            short           num2            = dataInputStream.readShort();
            SmallImage.smallImg = new int[(int)num2][];
            for (int i = 0; i < SmallImage.smallImg.Length; i++)
            {
                SmallImage.smallImg[i] = new int[5];
            }
            for (int j = 0; j < (int)num2; j++)
            {
                num++;
                SmallImage.smallImg[j][0] = dataInputStream.readUnsignedByte();
                SmallImage.smallImg[j][1] = (int)dataInputStream.readShort();
                SmallImage.smallImg[j][2] = (int)dataInputStream.readShort();
                SmallImage.smallImg[j][3] = (int)dataInputStream.readShort();
                SmallImage.smallImg[j][4] = (int)dataInputStream.readShort();
            }
        }
        catch (Exception ex)
        {
            Cout.LogError3(string.Concat(new object[]
            {
                "Loi readImage: ",
                ex.ToString(),
                "i= ",
                num
            }));
        }
    }
        // Token: 0x060006E0 RID: 1760 RVA: 0x0005C1C4 File Offset: 0x0005A3C4
        public static void checkRMS()
        {
            MyVector myVector = new MyVector();

            sbyte[] array = Rms.loadRMS("ImageSource");
            if (array == null)
            {
                Service.gI().imageSource(myVector);
                return;
            }
            ImageSource.vRms = new MyVector();
            DataInputStream dataInputStream = new DataInputStream(array);

            if (dataInputStream == null)
            {
                return;
            }
            try
            {
                short    num    = dataInputStream.readShort();
                string[] array2 = new string[(int)num];
                sbyte[]  array3 = new sbyte[(int)num];
                for (int i = 0; i < (int)num; i++)
                {
                    array2[i] = dataInputStream.readUTF();
                    array3[i] = dataInputStream.readByte();
                    ImageSource.vRms.addElement(new ImageSource(array2[i], array3[i]));
                }
                dataInputStream.close();
            }
            catch (Exception ex)
            {
                ex.StackTrace.ToString();
            }
            Res.outz(string.Concat(new object[]
            {
                "vS size= ",
                ImageSource.vSource.size(),
                " vRMS size= ",
                ImageSource.vRms.size()
            }));
            for (int j = 0; j < ImageSource.vSource.size(); j++)
            {
                ImageSource imageSource = (ImageSource)ImageSource.vSource.elementAt(j);
                if (!ImageSource.isExistID(imageSource.id))
                {
                    myVector.addElement(imageSource);
                }
            }
            for (int k = 0; k < ImageSource.vRms.size(); k++)
            {
                ImageSource imageSource2 = (ImageSource)ImageSource.vRms.elementAt(k);
                if ((int)ImageSource.getVersionRMSByID(imageSource2.id) != (int)ImageSource.getCurrVersionByID(imageSource2.id))
                {
                    myVector.addElement(imageSource2);
                }
            }
            Service.gI().imageSource(myVector);
        }
 /// <summary>
 /// Add a set of evaluation metrics to the set of observations.
 /// </summary>
 /// <param name="metrics">The observed regression evaluation metric</param>
 public override void Add(RegressionMetrics metrics)
 {
     L1.Add(metrics.MeanAbsoluteError);
     L2.Add(metrics.MeanSquaredError);
     Rms.Add(metrics.RootMeanSquaredError);
     LossFn.Add(metrics.LossFunction);
     RSquared.Add(metrics.RSquared);
 }
Beispiel #9
0
 // Token: 0x06000091 RID: 145 RVA: 0x00008BBC File Offset: 0x00006DBC
 public static void clearAll()
 {
     Cout.LogError3("clean rms");
     foreach (FileInfo fileInfo in new DirectoryInfo(Rms.GetiPhoneDocumentsPath() + "/").GetFiles())
     {
         fileInfo.Delete();
     }
 }
Beispiel #10
0
 // Token: 0x06000085 RID: 133 RVA: 0x00003B02 File Offset: 0x00001D02
 public static sbyte[] loadRMS(string filename)
 {
     if (Thread.CurrentThread.Name == Main.mainThreadName)
     {
         return(Rms.__loadRMS(filename));
     }
     return(Rms._loadRMS(filename));
 }
 /// <summary>
 /// Add a set of evaluation metrics to the set of observations.
 /// </summary>
 /// <param name="metrics">The observed regression evaluation metric</param>
 public override void Add(RegressionMetrics metrics)
 {
     L1.Add(metrics.L1);
     L2.Add(metrics.L2);
     Rms.Add(metrics.Rms);
     LossFn.Add(metrics.LossFn);
     RSquared.Add(metrics.RSquared);
 }
Beispiel #12
0
 // Token: 0x060008A1 RID: 2209 RVA: 0x0007DBF8 File Offset: 0x0007BDF8
 public static void loadIP()
 {
     if (Rms.loadRMSInt("svselect") == -1)
     {
         int num = 0;
         if ((int)mResources.language > 0)
         {
             for (int i = 0; i < (int)mResources.language; i++)
             {
                 num += ServerListScreen.lengthServer[i];
             }
         }
         if ((int)ServerListScreen.serverPriority == -1)
         {
             ServerListScreen.ipSelect = num + Res.random(0, ServerListScreen.lengthServer[(int)mResources.language]);
         }
         else
         {
             ServerListScreen.ipSelect = (int)ServerListScreen.serverPriority;
         }
         Rms.saveRMSInt("svselect", ServerListScreen.ipSelect);
         GameMidlet.IP   = ServerListScreen.address[ServerListScreen.ipSelect];
         GameMidlet.PORT = (int)ServerListScreen.port[ServerListScreen.ipSelect];
         mResources.loadLanguague(ServerListScreen.language[ServerListScreen.ipSelect]);
         LoginScr.serverName = ServerListScreen.nameServer[ServerListScreen.ipSelect];
         GameCanvas.connect();
     }
     else
     {
         ServerListScreen.ipSelect = Rms.loadRMSInt("svselect");
         string text  = Rms.loadRMSString("acc");
         string text2 = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect);
         if ((text == null || text.Equals(string.Empty)) && (text2 == null || text2.Equals(string.Empty)))
         {
             int num2 = 0;
             if ((int)mResources.language > 0)
             {
                 for (int j = 0; j < (int)mResources.language; j++)
                 {
                     num2 += ServerListScreen.lengthServer[j];
                 }
             }
             if ((int)ServerListScreen.serverPriority == -1)
             {
                 ServerListScreen.ipSelect = num2 + Res.random(0, ServerListScreen.lengthServer[(int)mResources.language]);
             }
             else
             {
                 ServerListScreen.ipSelect = (int)ServerListScreen.serverPriority;
             }
         }
         GameMidlet.IP   = ServerListScreen.address[ServerListScreen.ipSelect];
         GameMidlet.PORT = (int)ServerListScreen.port[ServerListScreen.ipSelect];
         mResources.loadLanguague(ServerListScreen.language[ServerListScreen.ipSelect]);
         LoginScr.serverName = ServerListScreen.nameServer[ServerListScreen.ipSelect];
         GameCanvas.connect();
     }
 }
Beispiel #13
0
 // Token: 0x06000092 RID: 146 RVA: 0x00008C0C File Offset: 0x00006E0C
 public static void DeleteStorage(string path)
 {
     try
     {
         File.Delete(Rms.GetiPhoneDocumentsPath() + "/" + path);
     }
     catch (Exception ex)
     {
     }
 }
Beispiel #14
0
    // Token: 0x0600008F RID: 143 RVA: 0x00008AF8 File Offset: 0x00006CF8
    private static void __saveRMS(string filename, sbyte[] data)
    {
        string     text       = Rms.GetiPhoneDocumentsPath() + "/" + filename;
        FileStream fileStream = new FileStream(text, FileMode.Create);

        fileStream.Write(ArrayCast.cast(data), 0, data.Length);
        fileStream.Flush();
        fileStream.Close();
        Main.setBackupIcloud(text);
    }
Beispiel #15
0
    // Token: 0x06000098 RID: 152 RVA: 0x00008D58 File Offset: 0x00006F58
    public static string loadIP()
    {
        string text = Rms.loadRMSString("NRIPlink");

        if (text == null)
        {
            return(null);
        }
        return(text);
    }
Beispiel #16
0
 // Token: 0x06000084 RID: 132 RVA: 0x00003AD4 File Offset: 0x00001CD4
 public static void saveRMS(string filename, sbyte[] data)
 {
     if (Thread.CurrentThread.Name == Main.mainThreadName)
     {
         Rms.__saveRMS(filename, data);
     }
     else
     {
         Rms._saveRMS(filename, data);
     }
 }
Beispiel #17
0
 // Token: 0x06000096 RID: 150 RVA: 0x00008CF8 File Offset: 0x00006EF8
 public static void clearRMS()
 {
     Rms.deleteRecord("data");
     Rms.deleteRecord("dataVersion");
     Rms.deleteRecord("map");
     Rms.deleteRecord("mapVersion");
     Rms.deleteRecord("skill");
     Rms.deleteRecord("killVersion");
     Rms.deleteRecord("item");
     Rms.deleteRecord("itemVersion");
 }
Beispiel #18
0
 // Token: 0x06000129 RID: 297 RVA: 0x00004074 File Offset: 0x00002274
 public void doClearRMS()
 {
     if (!Main.isPC)
     {
         return;
     }
     if (Rms.loadRMSInt("lastZoomlevel") != mGraphics.zoomLevel)
     {
         Rms.clearAll();
         Rms.saveRMSInt("lastZoomlevel", mGraphics.zoomLevel);
         Rms.saveRMSInt("levelScreenKN", this.level);
     }
 }
 // Token: 0x0600070C RID: 1804 RVA: 0x0005D9BC File Offset: 0x0005BBBC
 protected void doRegister(string user)
 {
     this.isFAQ = false;
     GameCanvas.startWaitDlg(mResources.CONNECTING);
     GameCanvas.connect();
     GameCanvas.startWaitDlg(mResources.REGISTERING);
     this.passRe = this.tfPass.getText();
     Service.gI().requestRegister(user, this.tfPass.getText(), Rms.loadRMSString("userAo" + ServerListScreen.ipSelect), Rms.loadRMSString("passAo" + ServerListScreen.ipSelect), GameMidlet.VERSION);
     Rms.saveRMSString("acc", user);
     Rms.saveRMSString("pass", this.tfPass.getText());
     this.t             = 20;
     this.isRegistering = true;
 }
Beispiel #20
0
 // Token: 0x0600008D RID: 141 RVA: 0x00008ABC File Offset: 0x00006CBC
 public static void saveRMSInt(string file, int x)
 {
     try
     {
         Rms.saveRMS(file, new sbyte[]
         {
             (sbyte)x
         });
     }
     catch (Exception ex)
     {
     }
 }
Beispiel #21
0
 // Token: 0x0600008B RID: 139 RVA: 0x00008A38 File Offset: 0x00006C38
 public static void update()
 {
     if (Rms.status == 2)
     {
         Rms.status = 1;
         Rms.__saveRMS(Rms.filename, Rms.data);
         Rms.status = 0;
     }
     else if (Rms.status == 3)
     {
         Rms.status = 1;
         Rms.data   = Rms.__loadRMS(Rms.filename);
         Rms.status = 0;
     }
 }
    // Token: 0x06000708 RID: 1800 RVA: 0x0005D638 File Offset: 0x0005B838
    public void setUserPass()
    {
        string text = Rms.loadRMSString("acc");

        if (text != null && !text.Equals(string.Empty))
        {
            this.tfUser.setText(text);
        }
        string text2 = Rms.loadRMSString("pass");

        if (text2 != null && !text2.Equals(string.Empty))
        {
            this.tfPass.setText(text2);
        }
    }
 // Token: 0x06000712 RID: 1810 RVA: 0x0005DD84 File Offset: 0x0005BF84
 public void savePass()
 {
     if (this.isCheck)
     {
         Rms.saveRMSInt("check", 1);
         Rms.saveRMSString("acc", this.tfUser.getText().ToLower().Trim());
         Rms.saveRMSString("pass", this.tfPass.getText().ToLower().Trim());
     }
     else
     {
         Rms.saveRMSInt("check", 2);
         Rms.saveRMSString("acc", string.Empty);
         Rms.saveRMSString("pass", string.Empty);
     }
 }
Beispiel #24
0
    // Token: 0x06000088 RID: 136 RVA: 0x000088C8 File Offset: 0x00006AC8
    public static void saveRMSString(string filename, string data)
    {
        DataOutputStream dataOutputStream = new DataOutputStream();

        try
        {
            dataOutputStream.writeUTF(data);
            Rms.saveRMS(filename, dataOutputStream.toByteArray());
            dataOutputStream.close();
        }
        catch (Exception ex)
        {
            Cout.println(ex.StackTrace);
        }
    }
 // Token: 0x060003F3 RID: 1011 RVA: 0x0001EBCC File Offset: 0x0001CDCC
 public void soundToolOption()
 {
     GameCanvas.isPlaySound = !GameCanvas.isPlaySound;
     if (GameCanvas.isPlaySound)
     {
         Panel.strCauhinh[0] = mResources.turnOffSound;
         SoundMn.gI().loadSound(TileMap.mapID);
         Rms.saveRMSInt("isPlaySound", 1);
     }
     else
     {
         Panel.strCauhinh[0] = mResources.turnOnSound;
         SoundMn.gI().closeSound();
         Rms.saveRMSInt("isPlaySound", 0);
     }
 }
Beispiel #26
0
 // Token: 0x06000090 RID: 144 RVA: 0x00008B40 File Offset: 0x00006D40
 private static sbyte[] __loadRMS(string filename)
 {
     sbyte[] result;
     try
     {
         FileStream fileStream = new FileStream(Rms.GetiPhoneDocumentsPath() + "/" + filename, FileMode.Open);
         byte[]     array      = new byte[fileStream.Length];
         fileStream.Read(array, 0, array.Length);
         fileStream.Close();
         sbyte[] array2 = ArrayCast.cast(array);
         result = ArrayCast.cast(array);
     }
     catch (Exception ex)
     {
         result = null;
     }
     return(result);
 }
 // Token: 0x06000706 RID: 1798 RVA: 0x0005D570 File Offset: 0x0005B770
 public static void getServerLink()
 {
     try
     {
         if (!LoginScr.isTryGetIPFromWap)
         {
             Command    command    = new Command();
             ActionChat actionChat = delegate(string str)
             {
                 try
                 {
                     if (str == null)
                     {
                         return;
                     }
                     if (str == string.Empty)
                     {
                         return;
                     }
                     Rms.saveIP(str);
                     if (!str.Contains(":"))
                     {
                         return;
                     }
                     int    num  = str.IndexOf(":");
                     string text = str.Substring(0, num);
                     string s    = str.Substring(num + 1);
                     GameMidlet.IP   = text;
                     GameMidlet.PORT = int.Parse(s);
                     Session_ME.gI().connect(text, int.Parse(s));
                     LoginScr.isTryGetIPFromWap = true;
                 }
                 catch (Exception ex)
                 {
                 }
             };
             command.actionChat = actionChat;
             Net.connectHTTP("http://27.0.14.75/game/ngocrong031_t.php", command);
         }
     }
     catch (Exception ex)
     {
     }
 }
        // Token: 0x060006E4 RID: 1764 RVA: 0x0005C498 File Offset: 0x0005A698
        public static void saveRMS()
        {
            DataOutputStream dataOutputStream = new DataOutputStream();

            try
            {
                dataOutputStream.writeShort((short)ImageSource.vSource.size());
                for (int i = 0; i < ImageSource.vSource.size(); i++)
                {
                    dataOutputStream.writeUTF(((ImageSource)ImageSource.vSource.elementAt(i)).id);
                    dataOutputStream.writeByte(((ImageSource)ImageSource.vSource.elementAt(i)).version);
                }
                Rms.saveRMS("ImageSource", dataOutputStream.toByteArray());
                dataOutputStream.close();
            }
            catch (Exception ex)
            {
                ex.StackTrace.ToString();
            }
        }
Beispiel #29
0
    // Token: 0x06000086 RID: 134 RVA: 0x00008864 File Offset: 0x00006A64
    public static string loadRMSString(string fileName)
    {
        sbyte[] array = Rms.loadRMS(fileName);
        if (array == null)
        {
            return(null);
        }
        DataInputStream dataInputStream = new DataInputStream(array);

        try
        {
            string result = dataInputStream.readUTF();
            dataInputStream.close();
            return(result);
        }
        catch (Exception ex)
        {
            Cout.println(ex.StackTrace);
        }
        return(null);
    }
Beispiel #30
0
    // Token: 0x06000890 RID: 2192 RVA: 0x0007D118 File Offset: 0x0007B318
    public static void saveIP()
    {
        DataOutputStream dataOutputStream = new DataOutputStream();

        try
        {
            dataOutputStream.writeByte(mResources.language);
            dataOutputStream.writeByte((sbyte)ServerListScreen.nameServer.Length);
            for (int i = 0; i < ServerListScreen.nameServer.Length; i++)
            {
                dataOutputStream.writeUTF(ServerListScreen.nameServer[i]);
                dataOutputStream.writeUTF(ServerListScreen.address[i]);
                dataOutputStream.writeShort(ServerListScreen.port[i]);
                dataOutputStream.writeByte(ServerListScreen.language[i]);
            }
            dataOutputStream.writeByte(ServerListScreen.serverPriority);
            Rms.saveRMS("NRlink2", dataOutputStream.toByteArray());
            dataOutputStream.close();
            SplashScr.loadIP();
        }
        catch (Exception)
        {
        }
    }