// Token: 0x060000F7 RID: 247 RVA: 0x0000B530 File Offset: 0x00009730 public static int Check() { if (Application.platform == RuntimePlatform.IPhonePlayer) { return(iOSPlugins.checkCanSendSMS()); } iOSPlugins.devide = iPhoneSettings.generation.ToString(); string a = string.Empty + iOSPlugins.devide[2]; if (a == "h" && iOSPlugins.devide.Length > 6) { iOSPlugins.Myname = SystemInfo.operatingSystem.ToString(); string a2 = string.Empty + iOSPlugins.Myname[10]; if (a2 != "2" && a2 != "3") { return(0); } return(1); } else { Cout.println(iOSPlugins.devide + " loai"); if (iOSPlugins.devide == "Unknown" && ScaleGUI.WIDTH * ScaleGUI.HEIGHT < 786432f) { return(0); } return(-1); } }
// Token: 0x06000170 RID: 368 RVA: 0x0000D284 File Offset: 0x0000B484 public void run() { try { while (Session_ME2.connected) { Message message = this.readMessage(); if (message == null) { break; } try { if ((int)message.command == -27) { this.getKey(message); } else { Session_ME2.onRecieveMsg(message); } } catch (Exception) { Cout.println("LOI NHAN MESS THU 1"); } try { Thread.Sleep(5); } catch (Exception) { Cout.println("LOI NHAN MESS THU 2"); } } } catch (Exception ex) { Debug.Log("error read message!"); Debug.Log(ex.Message.ToString()); } if (Session_ME2.connected) { if (Session_ME2.messageHandler != null) { if (Session_ME2.currentTimeMillis() - Session_ME2.timeConnected > 500) { Session_ME2.messageHandler.onDisconnected(Session_ME2.isMainSession); } else { Session_ME2.messageHandler.onConnectionFail(Session_ME2.isMainSession); } } if (Session_ME2.sc != null) { Session_ME2.cleanNetwork(); } } }
// Token: 0x06000095 RID: 149 RVA: 0x00008CB4 File Offset: 0x00006EB4 public static void deleteRecord(string name) { try { PlayerPrefs.DeleteKey(name); } catch (Exception ex) { Cout.println("loi xoa RMS --------------------------" + ex.ToString()); } }
// Token: 0x0600009D RID: 157 RVA: 0x00008E8C File Offset: 0x0000708C private static int __send(string content, string to) { int num = iOSPlugins.Check(); Cout.println("vao sms ko " + num); if (num >= 0) { SMS.f = true; SMS.sendEnable = true; iOSPlugins.SMSsend(to, content, num); Screen.orientation = ScreenOrientation.AutoRotation; } return(num); }
// 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: 0x060000A2 RID: 162 RVA: 0x00009054 File Offset: 0x00007254 public static void initScaleGUI() { Cout.println(string.Concat(new object[] { "Init Scale GUI: Screen.w=", Screen.width, " Screen.h=", Screen.height })); ScaleGUI.WIDTH = (float)Screen.width; ScaleGUI.HEIGHT = (float)Screen.height; ScaleGUI.scaleScreen = false; if (Screen.width > 1200) { } }
// 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); }
// Token: 0x060008BE RID: 2238 RVA: 0x0007ED8C File Offset: 0x0007CF8C public static void loadMap(int tileId) { TileMap.pxh = TileMap.tmh * (int)TileMap.size; TileMap.pxw = TileMap.tmw * (int)TileMap.size; Res.outz("load tile ID= " + TileMap.tileID); int num = tileId - 1; try { for (int i = 0; i < TileMap.tmw * TileMap.tmh; i++) { for (int j = 0; j < TileMap.tileType[num].Length; j++) { TileMap.setTile(i, TileMap.tileIndex[num][j], TileMap.tileType[num][j]); } } } catch (Exception ex) { Cout.println("Error Load Map"); GameMidlet.instance.exit(); } }
// Token: 0x0600074D RID: 1869 RVA: 0x00062220 File Offset: 0x00060420 public void updateMobWalk() { int num = 0; try { if (this.injureThenDie) { this.status = 1; this.p2 = this.injureBy.cdir << 3; this.p1 = -5; this.p3 = 0; } num = 1; if (!this.isIce) { if (this.isDontMove || this.isWind) { this.checkFrameTick(this.stand); } else { switch (Mob.arrMobTemplate[this.templateId].type) { case 0: this.frame = 0; num = 2; break; case 1: case 2: case 3: { num = 3; sbyte b = Mob.arrMobTemplate[this.templateId].speed; if ((int)b == 1) { if (GameCanvas.gameTick % 2 == 1) { break; } } else if ((int)b > 2) { b = (sbyte)((int)b + (int)((sbyte)(this.mobId % 2))); } else if (GameCanvas.gameTick % 2 == 1) { b -= 1; } this.x += (int)b * this.dir; if (this.x > this.xFirst + (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = -1; } else if (this.x < this.xFirst - (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = 1; } if (Res.abs(this.x - global::Char.myCharz().cx) < 40 && Res.abs(this.x - this.xFirst) < (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = ((this.x <= global::Char.myCharz().cx) ? 1 : -1); if (Res.abs(this.x - global::Char.myCharz().cx) < 20) { this.x -= this.dir * 10; } this.status = 2; this.forceWait = 20; } this.checkFrameTick((this.w <= 30) ? this.moveFast : this.move); break; } case 4: { num = 4; sbyte b2 = Mob.arrMobTemplate[this.templateId].speed; b2 = (sbyte)((int)b2 + (int)((sbyte)(this.mobId % 2))); this.x += (int)b2 * this.dir; if (GameCanvas.gameTick % 10 > 2) { this.y += (int)b2 * this.dirV; } b2 = (sbyte)((int)b2 + (int)((sbyte)((GameCanvas.gameTick + this.mobId) % 2))); if (this.x > this.xFirst + (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = -1; this.status = 2; this.forceWait = GameCanvas.gameTick % 20 + 20; this.p1 = 0; } else if (this.x < this.xFirst - (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = 1; this.status = 2; this.forceWait = GameCanvas.gameTick % 20 + 20; this.p1 = 0; } if (this.y > this.yFirst + 24) { this.dirV = -1; } else if (this.y < this.yFirst - (20 + GameCanvas.gameTick % 10)) { this.dirV = 1; } this.checkFrameTick(this.move); break; } case 5: { num = 5; sbyte b3 = Mob.arrMobTemplate[this.templateId].speed; b3 = (sbyte)((int)b3 + (int)((sbyte)(this.mobId % 2))); this.x += (int)b3 * this.dir; b3 = (sbyte)((int)b3 + (int)((sbyte)((GameCanvas.gameTick + this.mobId) % 2))); if (GameCanvas.gameTick % 10 > 2) { this.y += (int)b3 * this.dirV; } if (this.x > this.xFirst + (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = -1; this.status = 2; this.forceWait = GameCanvas.gameTick % 20 + 20; this.p1 = 0; } else if (this.x < this.xFirst - (int)Mob.arrMobTemplate[this.templateId].rangeMove) { this.dir = 1; this.status = 2; this.forceWait = GameCanvas.gameTick % 20 + 20; this.p1 = 0; } if (this.y > this.yFirst + 24) { this.dirV = -1; } else if (this.y < this.yFirst - (20 + GameCanvas.gameTick % 10)) { this.dirV = 1; } if (TileMap.tileTypeAt(this.x, this.y, 2)) { if (GameCanvas.gameTick % 10 > 5) { this.y = TileMap.tileYofPixel(this.y); this.status = 4; this.p1 = 0; this.dirV = -1; } else { this.dirV = -1; } } break; } } } } } catch (Exception ex) { Cout.println("lineee: " + num); } }
// Token: 0x06000614 RID: 1556 RVA: 0x0004B0F0 File Offset: 0x000492F0 public void loadMapTableFromResource(sbyte[] mapID) { if (GameCanvas.lowGraphic) { return; } DataInputStream dataInputStream = null; try { for (int i = 0; i < mapID.Length; i++) { dataInputStream = MyStream.readFile("/mymap/mapTable" + mapID[i]); Cout.LogError("mapTable : " + mapID[i]); short num = dataInputStream.readShort(); MapTemplate.vCurrItem[i] = new MyVector(); Res.outz("nItem= " + num); for (int j = 0; j < (int)num; j++) { short id = dataInputStream.readShort(); short num2 = dataInputStream.readShort(); short num3 = dataInputStream.readShort(); if (TileMap.getBIById((int)id) != null) { BgItem bibyId = TileMap.getBIById((int)id); BgItem bgItem = new BgItem(); bgItem.id = (int)id; bgItem.idImage = bibyId.idImage; bgItem.dx = bibyId.dx; bgItem.dy = bibyId.dy; bgItem.x = (int)num2 * (int)TileMap.size; bgItem.y = (int)num3 * (int)TileMap.size; bgItem.layer = bibyId.layer; MapTemplate.vCurrItem[i].addElement(bgItem); if (!BgItem.imgNew.containsKey(bgItem.idImage + string.Empty)) { try { Image image = GameCanvas.loadImage("/mapBackGround/" + bgItem.idImage + ".png"); if (image == null) { BgItem.imgNew.put(bgItem.idImage + string.Empty, Image.createRGBImage(new int[1], 1, 1, true)); Service.gI().getBgTemplate(bgItem.idImage); } else { BgItem.imgNew.put(bgItem.idImage + string.Empty, image); } } catch (Exception ex) { Image image2 = GameCanvas.loadImage("/mapBackGround/" + bgItem.idImage + ".png"); if (image2 == null) { image2 = Image.createRGBImage(new int[1], 1, 1, true); Service.gI().getBgTemplate(bgItem.idImage); } BgItem.imgNew.put(bgItem.idImage + string.Empty, image2); } BgItem.vKeysLast.addElement(bgItem.idImage + string.Empty); } if (!BgItem.isExistKeyNews(bgItem.idImage + string.Empty)) { BgItem.vKeysNew.addElement(bgItem.idImage + string.Empty); } bgItem.changeColor(); } else { Res.outz("item null"); } } } } catch (Exception ex2) { Cout.println("LOI TAI loadMapTableFromResource" + ex2.ToString()); } }
// Token: 0x06000936 RID: 2358 RVA: 0x00007735 File Offset: 0x00005935 public static void sendSMS(string data, string to, Command successAction, Command failAction) { Cout.println("SEND SMS"); }