/// <summary> /// Обрабатывает AType:10. Хранит всю информацию о событии AType 10 /// </summary> /// <param name="str">Принимает строку, в которой содержится информация о событии AType:10</param> public AType10(string str) { str = str.Replace('(', '{'); str = str.Replace(')', '}'); TICK = int.Parse(reg_tick.Match(str).Value); PLID = int.Parse(reg_plid.Match(str).Value); PID = int.Parse(reg_pid.Match(str).Value); BUL = int.Parse(reg_bul.Match(str).Value); SH = int.Parse(reg_sh.Match(str).Value); BOMB = int.Parse(reg_bomb.Match(str).Value); RCT = int.Parse(reg_rct.Match(str).Value); var strcoord = reg_coord.Match(str).Value.Split(new char[] { ',' }); XPos = double.Parse(SetApp.ReplaceSeparator(strcoord[0])); YPos = double.Parse(SetApp.ReplaceSeparator(strcoord[1])); ZPos = double.Parse(SetApp.ReplaceSeparator(strcoord[2])); IDS = reg_ids.Match(str).Value; LOGIN = reg_login.Match(str).Value; NAME = reg_name.Match(str).Value; TYPE = reg_type.Match(str).Value; COUNTRY = int.Parse(reg_country.Match(str).Value); FORM = int.Parse(reg_form.Match(str).Value); FIELD = int.Parse(reg_form.Match(str).Value); INAIR = int.Parse(reg_inair.Match(str).Value); PARENT = int.Parse(reg_parent.Match(str).Value); ICPL = int.Parse(reg_icpl.Match(str).Value); ISTSTART = int.Parse(reg_iststart.Match(str).Value); PAYLOAD = int.Parse(reg_payload.Match(str).Value); FUEL = double.Parse(SetApp.ReplaceSeparator(reg_fuel.Match(str).Value)); SKIN = reg_skin.Match(str).Value; WM = int.Parse(reg_wm.Match(str).Value); GameStatus = GameStatusPilot.Parking.ToString(); Banned = CheckBanned(); }
/// <summary> /// Обрабатывает AType:6. Хранит всю информацию о событии AType 6. Событие посадки. /// </summary> /// <param name="str">Принимает строку, в которой содержится информация о событии AType:6</param> public AType6(string str) { str = str.Replace('(', '{'); str = str.Replace(')', '}'); TICK = int.Parse(reg_tick.Match(str).Value); PID = int.Parse(reg_pid.Match(str).Value); var strcoord = reg_coord.Match(str).Value.Split(new char[] { ',' }); if (strcoord.Length > 1) { XPos = double.Parse(SetApp.ReplaceSeparator(strcoord[0])); YPos = double.Parse(SetApp.ReplaceSeparator(strcoord[1])); ZPos = double.Parse(SetApp.ReplaceSeparator(strcoord[2])); } }
/// <summary> /// Обрабатывает AType:8. Хранит всю информацию о событии AType8 /// </summary> /// <param name="str">Принимает строку, в которой содержится информация о событии AType:8</param> public AType8(string str) { str = str.Replace('(', '{'); str = str.Replace(')', '}'); TICK = int.Parse(reg_tick.Match(str).Value); COAL = int.Parse(reg_coal.Match(str).Value); OBJID = int.Parse(reg_objid.Match(str).Value); TYPE = int.Parse(reg_type.Match(str).Value); RES = int.Parse(reg_res.Match(str).Value); ICTYPE = int.Parse(reg_ictype.Match(str).Value); var strcoord = reg_coord.Match(str).Value.Split(new char[] { ',' }); if (strcoord.Length > 1) { XPos = double.Parse(SetApp.ReplaceSeparator(strcoord[0])); YPos = double.Parse(SetApp.ReplaceSeparator(strcoord[1])); ZPos = double.Parse(SetApp.ReplaceSeparator(strcoord[2])); } }
/// <summary> /// Обрабатывает AType:12. Хранит всю информацию о событии AType 12 /// </summary> /// <param name="str">Принимает строку, в которой содержится информация о событии AType:12</param> public AType12(string str) { str = str.Replace('(', '{'); str = str.Replace(')', '}'); TICK = int.Parse(reg_tick.Match(str).Value); ID = int.Parse(reg_id.Match(str).Value); TYPE = reg_type.Match(str).Value; COUNTRY = int.Parse(reg_country.Match(str).Value); NAME = reg_name.Match(str).Value; PID = int.Parse(reg_pid.Match(str).Value); var strcoord = reg_coord.Match(str).Value.Split(new char[] { ',' }); if (strcoord.Length > 1) { XPos = double.Parse(SetApp.ReplaceSeparator(strcoord[0])); YPos = double.Parse(SetApp.ReplaceSeparator(strcoord[1])); ZPos = double.Parse(SetApp.ReplaceSeparator(strcoord[2])); } TypeVeh = GetTypeAtype12(); }