/// <summary> /// 数据库检查时候的事建 /// </summary> /// <param name="arg">当前类型</param> /// <param name="dbInfo">数据库类型</param> /// <param name="type">检查类型</param> /// <param name="lstSQL">SQL语句</param> public void OnCheckEvent(object arg, DBInfo dbInfo, CheckEvent type, List <string> lstSQL) { if (type == CheckEvent.RelationBeginCheck) { lstSQL.Add("PRAGMA foreign_keys = ON;"); } }
/// <summary> /// 删除执行前事件 /// </summary> /// <param name="name">事件名称</param> /// <param name="tense">时态</param> /// <param name="stage">阶段</param> /// <returns>删除成功返回true,是失败返回false</returns> public bool Del(string name, string tense = null, string stage = null) { var bl = false; if (string.IsNullOrEmpty(stage)) { CheckEvent.Del(name, tense); RunEvent.Del(name, tense); RenderEvent.Del(name, tense); bl = true; } else { switch (stage.ToLower()) { case "check": CheckEvent.Del(name, tense); break; case "run": RunEvent.Del(name, tense); break; case "render": RenderEvent.Del(name, tense); break; } } return(bl); }
/// <summary> /// 获取事件 /// </summary> /// <param name="name">事件名称</param> /// <param name="tense">时态</param> /// <param name="stage">阶段</param> /// <returns>返回执行前事件</returns> public List <EventConfig> Get(string name, string tense = null, string stage = null) { List <EventConfig> list = new List <EventConfig>(); if (string.IsNullOrEmpty(stage)) { list.Add(CheckEvent.Get(name, tense)); list.Add(RunEvent.Get(name, tense)); list.Add(RenderEvent.Get(name, tense)); } else { switch (stage.ToLower()) { case "check": list.Add(CheckEvent.Get(name, tense)); break; case "run": list.Add(RunEvent.Get(name, tense)); break; case "render": list.Add(RenderEvent.Get(name, tense)); break; } } return(list); }
private void CheckIsEquipped(vEquipArea arg0, vItem arg1) { for (int i = 0; i < itemChecks.Count; i++) { CheckEvent check = itemChecks[i]; CheckItem(check); } }
/// <summary> /// 执行事件(异步) /// </summary> /// <param name="tag">标签</param> /// <param name="target">目标</param> /// <returns>返回执行结果</returns> public async Task <object> RunAsync(string tag, string target) { var ret = await CheckEvent.RunAsync(tag, target); if (ret == null) { ret = await RunEvent.RunAsync(tag, target, ret); } var result = await RenderEvent.RunAsync(tag, target, ret); if (result != null) { ret = result; } return(ret); }
/// <summary> /// 执行事件 /// </summary> /// <param name="tag">标签</param> /// <param name="target">目标</param> /// <returns>返回执行结果</returns> public object Run(string tag, string target) { var ret = CheckEvent.Run(tag, target); if (ret == null) { ret = RunEvent.Run(tag, target, ret); } var result = RenderEvent.Run(tag, target, ret); if (result != null) { ret = result; } return(ret); }
private void CheckItem(CheckEvent check) { bool _isEquipped = itemManager.ItemIsEquiped(check._itemID); if (_isEquipped != check.isEquipped) { check.isEquipped = _isEquipped; if (check.isEquipped) { check.onIsItemEquipped.Invoke(); } else { check.onIsItemUnequipped.Invoke(); } } }
/// <summary> /// Check if a new version is available. This calls the event callback /// upon completion. /// </summary> /// <param name="checkEvent"></param> public void Check(CheckEvent checkEvent) { // This uses wget because .NET is not working with Github for some reason // when I test. It gets mad about SSL and even with some extra workarounds // it still never does anything. Wget will also be used for the update // process, so this fits Process p = CreateWgetProcess(); String version; p.Start(); p.WaitForExit(); try { version = File.ReadAllText("UPDATE.txt"); } catch (Exception e) { checkEvent(false, String.Format("Failed to check for updates {0}", e.Message)); return; } if (version == null) { version = ""; } version = version.Trim(); if (version == "") { checkEvent(false, "No response from Github"); return; } if (IsNewerVersion(GRemoteDialog.Version, version)) { checkEvent(true, String.Format("Version {0} is available on Github", version)); } else { checkEvent(false, "Already up to date"); } }
public static void WakePlayer(IHubContext context, PlayerSetup.Player player, Room.Room room) { if (player.Status == PlayerSetup.Player.PlayerStatus.Sleeping) { player.Status = PlayerSetup.Player.PlayerStatus.Standing; context.SendToClient("You wake and stand up", player.HubGuid); foreach (var character in room?.players) { if (player != character) { var roomMessage = $"{ Helpers.ReturnName(player, character, string.Empty)} wakes and stands up."; context.SendToClient(roomMessage, character.HubGuid); } } if (!string.IsNullOrEmpty(room.EventWake)) { Event.ParseCommand(room.EventWake, player, null, room, "wake"); } foreach (var mob in room.mobs) { if (!string.IsNullOrEmpty(mob.EventWake)) { Event.ParseCommand(mob.EventWake, player, mob, room, "wake"); } } Command.ParseCommand("look", player, room); CheckEvent.FindEvent(CheckEvent.EventType.Wake, player, "awakening awake"); } else { context.SendToClient("You are already awake", player.HubGuid); } }
/// <summary> /// 设置执行前事件 /// </summary> /// <param name="cg">事件配置模型</param> /// <returns>设置成功返回true,是失败返回false</returns> public void Set(EventConfig cg) { if (string.IsNullOrEmpty(cg.Stage)) { cg.Stage = "run"; } cg.Stage = cg.Stage.ToLower(); switch (cg.Stage) { case "check": CheckEvent.Set(cg); break; case "run": RunEvent.Set(cg); break; case "render": RenderEvent.Set(cg); break; } }
/// <summary> /// 数据库检查时候的事建 /// </summary> /// <param name="arg">当前类型</param> /// <param name="dbInfo">数据库类型</param> /// <param name="type">检查类型</param> /// <param name="lstSQL">SQL语句</param> public void OnCheckEvent(object arg, DBInfo dbInfo, CheckEvent type, List <string> lstSQL) { }
/// <summary> /// Wears an item /// </summary> /// <param name="player">The Player</param> /// <param name="itemToWear">Item to wear</param> public static void WearItem(Player player, string itemToWear, bool wield = false) { var room = Cache.getRoom(player); if (string.IsNullOrEmpty(itemToWear)) { HubContext.SendToClient("Wear what?", player.HubGuid); return; } var oldPlayer = player; if (!itemToWear.Equals("all", StringComparison.CurrentCultureIgnoreCase)) { var findObject = Events.FindNth.Findnth(itemToWear); int nth = findObject.Key; string itemToFind = findObject.Value; var foundItem = FindItem.Item(player.Inventory, nth, itemToFind, Item.ItemLocation.Inventory); // player.Inventory.Find(i => i.name.ToLower().Contains(itemToWear.ToLower())); if (foundItem == null) { if (wield) { HubContext.SendToClient("You do not have that item to wield.", player.HubGuid); return; } HubContext.SendToClient("You do not have that item to wear.", player.HubGuid); return; } foundItem.location = Item.ItemLocation.Worn; var slot = Enum.GetName(typeof(Item.EqSlot), foundItem.slot); //TODO: WTF is this? var eqLocation = player.Equipment.GetType().GetProperty(slot); if (slot == null) { return; } // Log error? What the hell is eqLocation? var hasValue = eqLocation.GetValue(player.Equipment); if (hasValue.ToString() != "Nothing") { RemoveItem(player, hasValue.ToString(), true); } eqLocation.SetValue(player.Equipment, foundItem.name); if (foundItem.ArmorRating != null) { player.ArmorRating += foundItem.ArmorRating.Armour; } if (!wield || !slot.Equals(Item.EqSlot.Wielded.ToString())) { HubContext.SendToClient("You wear " + foundItem.name, player.HubGuid); var result = AvsAnLib.AvsAn.Query(foundItem.name); string article = result.Article; foreach (var character in room.players) { if (player != character) { var roomMessage = $"{ Helpers.ReturnName(player, character, string.Empty)} wears {article} {foundItem.name}"; HubContext.SendToClient(roomMessage, character.HubGuid); } } //Wear event CheckEvent.FindEvent(CheckEvent.EventType.Wear, player, foundItem.name); } else { HubContext.SendToClient("You wield " + foundItem.name, player.HubGuid); var result = AvsAnLib.AvsAn.Query(foundItem.name); string article = result.Article; foreach (var character in room.players) { if (player != character) { var roomMessage = $"{ Helpers.ReturnName(player, character, string.Empty)} wields {article} {foundItem.name}"; HubContext.SendToClient(roomMessage, character.HubGuid); } } } Score.UpdateUiInventory(player); Score.ReturnScoreUI(player); } else { var listOfItemsWorn = string.Empty; foreach (var item in player.Inventory.Where(x => x.location.Equals(Item.ItemLocation.Inventory))) { if (item.location == Item.ItemLocation.Inventory && item.equipable == true) { var slot = Enum.GetName(typeof(Item.EqSlot), item.slot); //TODO: WTF is this? if (slot != null) { var eqLocation = player.Equipment.GetType().GetProperty(slot); if (eqLocation != null) { var hasValue = eqLocation.GetValue(player.Equipment); if (hasValue.ToString() != "Nothing") { RemoveItem(player, hasValue.ToString(), true); } } item.location = Item.ItemLocation.Worn; eqLocation.SetValue(player.Equipment, item.name); if (item.ArmorRating != null) { player.ArmorRating += item.ArmorRating.Armour; } listOfItemsWorn += $" {item.name}"; if (!wield || !slot.Equals("wield", StringComparison.CurrentCultureIgnoreCase)) { var result = AvsAnLib.AvsAn.Query(item.name); string article = result.Article; HubContext.SendToClient("You wear " + article + item.name, player.HubGuid); foreach (var character in room.players) { if (player != character) { var roomMessage = $"{ Helpers.ReturnName(player, character, string.Empty)} wears {article} {item.name}"; HubContext.SendToClient(roomMessage, character.HubGuid); } } } else { var result = AvsAnLib.AvsAn.Query(item.name); string article = result.Article; HubContext.SendToClient("You wield " + article + item.name, player.HubGuid); foreach (var character in room.players) { if (player != character) { var roomMessage = $"{ Helpers.ReturnName(player, character, string.Empty)} wields {article} {item.name}"; HubContext.SendToClient(roomMessage, character.HubGuid); } } } } } } CheckEvent.FindEvent(CheckEvent.EventType.Wear, player, listOfItemsWorn); } Score.UpdateUiInventory(player); Score.ReturnScoreUI(player); Cache.updatePlayer(player, oldPlayer); }
public void HandleHandHistory(string handHistory) { _summary = false; ResetOpponentsEvent?.Invoke(); foreach (var line in handHistory.Split('\n')) { if (line.Contains("Seat") && !line.Contains("button") && !_summary) { var split = line.Split(':'); var name = split[1].Substring(1, split[1].IndexOf('(') - 2); if (name == Controller.User.UserName) { continue; } if (!Controller.Opponents.ContainsKey(name)) { Controller.Opponents[name] = new Opponent { Name = name, HandsPlayed = 1 } } ; else { Controller.Opponents[name].HandsPlayed++; Controller.Opponents[name].InPlay = true; } } else if (line.Contains("HOLE") || line.Contains("FLOP") || line.Contains("TURN") || line.Contains("RIVER") || line.Contains("SHOW DOWN") || line.Contains("SUMMARY")) { var split = line.Split(' '); SetHandHistoryStateEvent?.Invoke(split[1]); if (line.Contains("SUMMARY")) { _summary = true; } } else if (line.Contains(Controller.User.UserName) && line.Contains("collected")) { SetHandWonEvent?.Invoke(); } else if (line.Contains(Controller.User.UserName)) { if (line.Contains("calls")) { CallEvent?.Invoke(); } else if (line.Contains("bets")) { BetEvent?.Invoke(); } else if (line.Contains("raises")) { RaiseEvent?.Invoke(); } else if (line.Contains("checks")) { CheckEvent?.Invoke(); } else if (line.Contains("folds")) { FoldEvent?.Invoke(); } } else if (line.Contains("Hand #")) { var split = line.Split(' '); SetHandNumEvent?.Invoke(split[2]); } else if (line.Contains("calls")) { var user = line.Split(':')[0]; OpponentCallEvent?.Invoke(user); } else if (line.Contains("checks")) { var user = line.Split(':')[0]; OpponentCheckEvent?.Invoke(user); } else if (line.Contains("bets")) { var user = line.Split(':')[0]; OpponentBetEvent?.Invoke(user); } else if (line.Contains("raises")) { var user = line.Split(':')[0]; OpponentRaiseEvent?.Invoke(user); } else if (line.Contains("folds")) { var user = line.Split(':')[0]; OpponentFoldEvent?.Invoke(user); } } }
public static string[] SplitedString; // The Splited String public static void ReadAsync(string Command) { SplitedString = Command.Split(' '); // The Splited String // Format the current Taiyou Line for (int i = 0; i < SplitedString.Length; i++) { // FORMATATION SplitedString[i] = SplitedString[i].Replace("%N", Environment.NewLine); // New Line for (int i2 = 0; i2 < GlobalVars_String_Names.Count; i2++) { SplitedString[i] = SplitedString[i].Replace("$STRING_" + GlobalVars_String_Names[i2] + "$", GlobalVars_String_Content[i2].Replace(" ", "")); } for (int i2 = 0; i2 < GlobalVars_Bool_Names.Count; i2++) { SplitedString[i] = SplitedString[i].Replace("$BOOL_" + GlobalVars_Bool_Names[i2] + "$", Convert.ToString(GlobalVars_Bool_Content[i2])); } for (int i2 = 0; i2 < GlobalVars_Int_Names.Count; i2++) { SplitedString[i] = SplitedString[i].Replace("$INT_" + GlobalVars_Int_Names[i2] + "$", Convert.ToString(GlobalVars_Int_Content[i2])); } for (int i2 = 0; i2 < GlobalVars_Float_Names.Count; i2++) { SplitedString[i] = SplitedString[i].Replace("$FLOAT_" + GlobalVars_Float_Names[i2] + "$", Convert.ToString(GlobalVars_Float_Content[i2])); } if (SplitedString[i].Contains("%RANDOM%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // Number 2 Random RND = new Random(); SplitedString[i] = SplitedString[i].Replace("%RANDOM%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(RND.Next(Convert.ToInt32(Arg1), Convert.ToInt32(Arg2)))); } if (SplitedString[i].Contains("%ADD%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // Number 2 int MathResult = Convert.ToInt32(Arg1) + Convert.ToInt32(Arg2); SplitedString[i] = SplitedString[i].Replace("%ADD%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(MathResult)); } if (SplitedString[i].Contains("%DECREASE%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // Number 2 int MathResult = Convert.ToInt32(Arg1) - Convert.ToInt32(Arg2); SplitedString[i] = SplitedString[i].Replace("%DECREASE%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(MathResult)); } if (SplitedString[i].Contains("%MULTIPLY%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // MultiplyTimes int MathResult = Convert.ToInt32(Arg1) * Convert.ToInt32(Arg2); SplitedString[i] = SplitedString[i].Replace("%MULTIPLY%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(MathResult)); } if (SplitedString[i].Contains("%DIVIDE%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // Number 2 int MathResult = Convert.ToInt32(Arg1) / Convert.ToInt32(Arg2); SplitedString[i] = SplitedString[i].Replace("%DIVIDE%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(MathResult)); } if (SplitedString[i].Contains("%DIFERENCE%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // Number 2 int MathResult = Math.Abs(Convert.ToInt32(Arg1) - Convert.ToInt32(Arg2)); SplitedString[i] = SplitedString[i].Replace("%DIFERENCE%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(MathResult)); } if (SplitedString[i].Contains("%PERCENTAGE%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Number 1 string Arg2 = SubSplitedString[3]; // Number 2 int MathResult = (int)Math.Round((double)(100 * Convert.ToInt32(Arg1)) / Convert.ToInt32(Arg2)); SplitedString[i] = SplitedString[i].Replace("%PERCENTAGE%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(MathResult)); } if (SplitedString[i].Contains("%LOCATION_OF%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // Render Type string Arg2 = SubSplitedString[3]; // Render Name string Arg3 = SubSplitedString[4]; // Value Type Rectangle RectObject = GlobalVars_Rectangle_Content[RenderQuee.Main.RenderCommand_RectangleVar.IndexOf(Arg2)]; int RenderNameIndex = -1; if (Arg1 == "SPRITE") { RenderNameIndex = RenderQuee.Main.RenderCommand_Name.IndexOf(Arg2); } ; if (Arg1 == "TEXT") { RenderNameIndex = RenderQuee.Main.TextRenderCommand_Name.IndexOf(Arg2); } ; int ValToReturn = 0; if (Arg3 == "X" && Arg1 == "SPRITE") { ValToReturn = RectObject.X; } ; if (Arg3 == "X" && Arg1 == "TEXT") { ValToReturn = RenderQuee.Main.TextRenderCommand_X[RenderNameIndex]; } if (Arg3 == "Y" && Arg1 == "SPRITE") { ValToReturn = RectObject.Y; } ; if (Arg3 == "Y" && Arg1 == "TEXT") { ValToReturn = RenderQuee.Main.TextRenderCommand_Y[RenderNameIndex]; } ; if (Arg3 == "W" && Arg1 == "SPRITE") { ValToReturn = RectObject.Width; } ; if (Arg3 == "H" && Arg1 == "SPRITE") { ValToReturn = RectObject.Height; } ; SplitedString[i] = SplitedString[i].Replace("%LOCATION_OF%" + Arg1 + "%" + Arg2 + "%" + Arg3 + "%", Convert.ToString(ValToReturn)); } if (SplitedString[i].Contains("%COLOR_VALUE%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string Arg1 = SubSplitedString[2]; // ColorVarName string Arg2 = SubSplitedString[3]; // CodeName int ColorVarIndex = GlobalVars_Color_Names.IndexOf(Arg1); string ValToReturn = "0"; if (ColorVarIndex == -1) { throw new Exception("Color Variable [" + Arg1 + "] does not exist."); } if (Arg2.Equals("R")) { ValToReturn = Convert.ToString(GlobalVars_Color_Content[ColorVarIndex].R); } ; if (Arg2.Equals("G")) { ValToReturn = Convert.ToString(GlobalVars_Color_Content[ColorVarIndex].G); } ; if (Arg2.Equals("B")) { ValToReturn = Convert.ToString(GlobalVars_Color_Content[ColorVarIndex].B); } ; if (Arg2.Equals("A")) { ValToReturn = Convert.ToString(GlobalVars_Color_Content[ColorVarIndex].A); } ; if (Arg2.Equals("ALL")) { ValToReturn = GlobalVars_Color_Content[ColorVarIndex].R + "," + GlobalVars_Color_Content[ColorVarIndex].G + "," + GlobalVars_Color_Content[ColorVarIndex].B + "," + GlobalVars_Color_Content[ColorVarIndex].A; } ; SplitedString[i] = SplitedString[i].Replace("%COLOR_VALUE%" + Arg1 + "%" + Arg2 + "%", Convert.ToString(ValToReturn)); } if (SplitedString[i].Contains("%LIST_VALUE%")) { string[] SubSplitedString = SplitedString[i].Split('%'); string ValToReturn = "null_or_incorrect"; string Arg1 = SubSplitedString[2]; // ListType string Arg2 = SubSplitedString[3]; // ListName string Arg3 = SubSplitedString[4]; // Index if (Arg1.Equals("STRING")) { int ListNameIndex = GlobalVars_StringList_Names.IndexOf(Arg2); int Index = Convert.ToInt32(Arg3); ValToReturn = GlobalVars_StringList_Content[ListNameIndex][Index]; } if (Arg1.Equals("INT")) { int ListNameIndex = GlobalVars_IntList_Names.IndexOf(Arg2); int Index = Convert.ToInt32(Arg3); ValToReturn = Convert.ToString(GlobalVars_IntList_Content[ListNameIndex][Index]); } if (Arg1.Equals("COLOR")) { int ListNameIndex = GlobalVars_ColorList_Names.IndexOf(Arg2); int Index = Convert.ToInt32(Arg3); Color ColorGetted = GlobalVars_ColorList_Content[ListNameIndex][Index]; string ColorCodeToReturn = ColorGetted.R + "," + ColorGetted.G + "," + ColorGetted.B + "," + ColorGetted.A; ValToReturn = ColorCodeToReturn; } if (Arg1.Equals("FLOAT")) { int ListNameIndex = GlobalVars_FloatList_Names.IndexOf(Arg2); int Index = Convert.ToInt32(Arg3); ValToReturn = Convert.ToString(GlobalVars_FloatList_Content[ListNameIndex][Index]); } if (Arg1.Equals("RECTANGLE")) { int ListNameIndex = GlobalVars_RectangleList_Names.IndexOf(Arg2); int Index = Convert.ToInt32(Arg3); Rectangle RectGetted = GlobalVars_RectangleList_Content[ListNameIndex][Index]; string RectangleCode = RectGetted.X + "," + RectGetted.Y + "," + RectGetted.Width + "," + RectGetted.Height; ValToReturn = Convert.ToString(RectangleCode); } SplitedString[i] = SplitedString[i].Replace("%LIST_VALUE%" + Arg1 + "%" + Arg2 + "%" + Arg3 + "%", Convert.ToString(ValToReturn)); } } // Begin Command Interpretation if (SplitedString[0].Equals("0x0")) { Clear.Initialize(); } if (SplitedString[0].Equals("0x1")) { Call.Initialize(SplitedString[1]); } if (SplitedString[0].Equals("0x2")) { Write.Initialize(SplitedString[1]); } if (SplitedString[0].Equals("0x3")) { WriteLine.Initialize(SplitedString[1]); } if (SplitedString[0].Equals("0x4")) { WriteFile.Initialize(SplitedString[1], SplitedString[2]); } if (SplitedString[0].Equals("0x5")) { TaiyouIF.Initialize(SplitedString); } if (SplitedString[0].Equals("0x6")) { Abort.Initialize(); } if (SplitedString[0].Equals("0x7")) { Declare.Initialize(SplitedString); } if (SplitedString[0].Equals("0x8")) { WriteVar.Initialize(SplitedString); } if (SplitedString[0].Equals("0x9")) { MathOP.Intialize(SplitedString); } if (SplitedString[0].Equals("1x0")) { Goto.Initialize(SplitedString); } if (SplitedString[0].Equals("1x1")) { FileExists.Initialize(SplitedString); } if (SplitedString[0].Equals("1x2")) { ReadFile.Intialize(SplitedString); } if (SplitedString[0].Equals("1x3")) { DirectoryExists.Initialize(SplitedString); } if (SplitedString[0].Equals("1x4")) { DownloadServerString.Initialize(SplitedString); } if (SplitedString[0].Equals("1x5")) { CopyFile.Initialize(SplitedString); } if (SplitedString[0].Equals("1x6")) { MoveFile.Initialize(SplitedString); } if (SplitedString[0].Equals("1x7")) { DeleteFile.Initialize(SplitedString); } if (SplitedString[0].Equals("1x8")) { AddRenderQuee.Initialize(SplitedString); } if (SplitedString[0].Equals("1x9")) { AddEvent.Initialize(SplitedString); } if (SplitedString[0].Equals("2x0")) { CheckEvent.Initialize(SplitedString); } if (SplitedString[0].Equals("2x1")) { ChangeWindowPropertie.Initialize(SplitedString); } if (SplitedString[0].Equals("2x2")) { Colision.Initialize(SplitedString); } if (SplitedString[0].Equals("2x3")) { Reload.Initialize(SplitedString); } if (SplitedString[0].Equals("2x4")) { GetKeyPressed.Initialize(SplitedString); } if (SplitedString[0].Equals("2x5")) { AddRenderTextQuee.Initialize(SplitedString); } if (SplitedString[0].Equals("2x6")) { ChangeRenderProp.Initialize(SplitedString); } if (SplitedString[0].Equals("2x7")) { ChangeBackgroundColor.Initialize(SplitedString); } if (SplitedString[0].Equals("2x8")) { Undeclare.Initialize(SplitedString); } if (SplitedString[0].Equals("2x9")) { SendBGMCommand.Initialize(SplitedString); } if (SplitedString[0].Equals("3x0")) { MasterVolume.Initialize(SplitedString); } if (SplitedString[0].Equals("3x1")) { LanguageSystemManager.Initialize(SplitedString); } if (SplitedString[0].Equals("3x2")) { // FIXME Not Working //VarMath.Initialize(SplitedString); } if (Global.IsLowLevelDebugEnabled) { for (int i = 0; i < SplitedString.Length; i++) { Console.Write(SplitedString[i] + " "); } Console.Write("\n"); } }
void SetIEvent() { //StaffShop0Button BuySellCheckEvent Staff0Event = new BuySellCheckEvent(StaffShop0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood3Price) }, new List <IAbility>() { new PositiveAbility(Game.User.Bottom, new Item(EItemIdentify.Bottom, "2540", "Красні кросівки", new BitmapImage(new Uri(System.IO.Path.GetFullPath(@"..\..\Img\StaffsPart\Bottom\Male\RedSneakersBottom.png"))))), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Staff0Event.Start(Game); BuySellCheckEvent Staff1Event = new BuySellCheckEvent(StaffShop1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood3Price) }, new List <IAbility>() { new PositiveAbility(Game.User.Bottom, new Item(EItemIdentify.Bottom, "2550", "Красні кросівки", new BitmapImage(new Uri(System.IO.Path.GetFullPath(@"..\..\Img\StaffsPart\Bottom\Male\RedSneakersBottom.png"))))), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Staff1Event.Start(Game); //їжа CheckEvent Food0Event = new CheckEvent(Food0Button, new List <IAbility>() { new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new PositiveAbility(Game.User.Food, new FoodStat(7)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Food1Event = new CheckEvent(Food1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Food1Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, new UAH(100)), new NegativeAbility(Game.User.Mood, new MoodStat(3)), new NegativeAbility(Game.User.Hp, new HpStat(3)), new PositiveAbility(Game.User.Food, new FoodStat(15)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Food2Event = new CheckEvent(Food2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Food2Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, new UAH(500)), new PositiveAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(2)), new PositiveAbility(Game.User.Food, new FoodStat(35)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Food3Event = new CheckEvent(Food3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Food3Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, new UAH(3000)), new PositiveAbility(Game.User.Mood, new MoodStat(8)), new PositiveAbility(Game.User.Hp, new HpStat(6)), new PositiveAbility(Game.User.Food, new FoodStat(55)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Food0Event.Start(Game); Food1Event.Start(Game); Food2Event.Start(Game); Food3Event.Start(Game); //настрій CheckEvent Mood0Event = new CheckEvent(Mood0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood0Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Mood0Price), new PositiveAbility(Game.User.Mood, new MoodStat(15)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Mood1Event = new CheckEvent(Mood1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood1Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Mood1Price), new PositiveAbility(Game.User.Mood, new MoodStat(35)), new NegativeAbility(Game.User.Hp, new HpStat(3)), new NegativeAbility(Game.User.Food, new FoodStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Mood2Event = new CheckEvent(Mood2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood2Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Mood2Price), new PositiveAbility(Game.User.Mood, new MoodStat(45)), new NegativeAbility(Game.User.Hp, new HpStat(2)), new NegativeAbility(Game.User.Food, new FoodStat(2)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Mood3Event = new CheckEvent(Mood3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood3Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Mood3Price), new PositiveAbility(Game.User.Mood, new MoodStat(75)), new NegativeAbility(Game.User.Hp, new HpStat(1)), new NegativeAbility(Game.User.Food, new FoodStat(2)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); SubscribeEvent Mood4Event = new SubscribeEvent(Mood4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Mood4Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Mood4Price), new PositiveAbility(Game.User.Mood, new MoodStat(15)), new NegativeAbility(Game.User.Hp, new HpStat(1)), new NegativeAbility(Game.User.Food, new FoodStat(1)) }, new TimeStat(0, 1)); Mood0Event.Start(Game); Mood1Event.Start(Game); Mood2Event.Start(Game); Mood3Event.Start(Game); Mood4Event.Start(Game, Settings_.Mood4Price); //hp CheckEvent Hp0Event = new CheckEvent(Healthy0Button, new List <IAbility>() { new NegativeAbility(Game.User.Mood, new MoodStat(4)), new PositiveAbility(Game.User.Hp, new HpStat(7)), new NegativeAbility(Game.User.Food, new FoodStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Hp1Event = new CheckEvent(Healthy1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Hp1Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Hp1Price), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new PositiveAbility(Game.User.Hp, new HpStat(15)), new NegativeAbility(Game.User.Food, new FoodStat(3)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Hp2Event = new CheckEvent(Healthy2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Hp2Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Hp2Price), new NegativeAbility(Game.User.Mood, new MoodStat(3)), new PositiveAbility(Game.User.Hp, new HpStat(30)), new NegativeAbility(Game.User.Food, new FoodStat(3)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Hp3Event = new CheckEvent(Healthy3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Hp3Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Hp3Price), new PositiveAbility(Game.User.Mood, new MoodStat(1)), new PositiveAbility(Game.User.Hp, new HpStat(45)), new PositiveAbility(Game.User.Food, new FoodStat(1)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Hp4Event = new CheckEvent(Healthy4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.Hp4Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.Hp4Price), new PositiveAbility(Game.User.Mood, new MoodStat(2)), new PositiveAbility(Game.User.Hp, new HpStat(65)), new PositiveAbility(Game.User.Food, new FoodStat(3)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Hp0Event.Start(Game); Hp1Event.Start(Game); Hp2Event.Start(Game); Hp3Event.Start(Game); Hp4Event.Start(Game); //пробєжка CheckEvent Sport0Event = new CheckEvent(Sport0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Bottom, new Item(EItemIdentify.Bottom, "2540", "Красні Кросівки")) }, new List <IAbility>() { new PositiveAbility(Game.User.Mood, new MoodStat(2)), new PositiveAbility(Game.User.Hp, new HpStat(8)), new NegativeAbility(Game.User.Food, new FoodStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Sport0Event.Start(Game); //спорт SubscribeEvent Sport1Event = new SubscribeEvent(Sport1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.sport1Price) }, new List <IAbility>() { new PositiveAbility(Game.User.Mood, new MoodStat(1)), new PositiveAbility(Game.User.Hp, new HpStat(15)), new NegativeAbility(Game.User.Food, new FoodStat(4)) }, new TimeStat(0, 30)); SubscribeEvent Sport2Event = new SubscribeEvent(Sport2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.sport2Price) }, new List <IAbility>() { new PositiveAbility(Game.User.Mood, new MoodStat(3)), new PositiveAbility(Game.User.Hp, new HpStat(25)), new NegativeAbility(Game.User.Food, new FoodStat(6)) }, new TimeStat(0, 30)); Sport1Event.Start(Game); Sport2Event.Start(Game); //бомжувать CheckEvent Sneaking0Event = new CheckEvent(Sneaking0Button, new List <IAbility>() { new PositiveAbility(Game.User.Bottles, new BottlesStat(4)), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Raiting, new RaitingStat(1)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Sneaking1Event = new CheckEvent(Sneaking1Button, new List <IAbility>() { new PositiveAbility(Game.User.Bottles, new BottlesStat(6)), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Raiting, new RaitingStat(2)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Sneaking2Event = new CheckEvent(Sneaking2Button, new List <IAbility>() { new PositiveAbility(Game.User.Bottles, new BottlesStat(8)), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(5)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Raiting, new RaitingStat(3)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Sneaking3Event = new CheckEvent(Sneaking3Button, new List <IAbility>() { new PositiveAbility(Game.User.Bottles, new BottlesStat(12)), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(7)), new NegativeAbility(Game.User.Food, new FoodStat(6)), new PositiveAbility(Game.User.Raiting, new RaitingStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Sneaking0Event.Start(Game); Sneaking1Event.Start(Game); Sneaking2Event.Start(Game); Sneaking3Event.Start(Game); //побори //CheckEvent LiveByBegging0Event = new CheckEvent(LiveByBegging0Button, new List<CheckAbility>() { new CheckAbility(Game.User.Transports, new TransportStat(ETransport.JoggingShoes)) }, new List<IAbility>() { new PositiveAbility(Game.User.Valutes, new UAH(250)), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new NegativeAbility(Game.User.Raiting, new RaitingStat(1)) }); //CheckEvent LiveByBegging1Event = new CheckEvent(LiveByBegging1Button, new List<CheckAbility>() { new CheckAbility(Game.User.Transports, new TransportStat(ETransport.JoggingShoes)) }, new List<IAbility>() { new PositiveAbility(Game.User.Valutes, new UAH(560)), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new NegativeAbility(Game.User.Raiting, new RaitingStat(2)) }); CheckEvent LiveByBegging2Event = new CheckEvent(LiveByBegging2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Transports, new TransportStat(ETransport.CheapCar)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, new UAH(2550)), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(5)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Raiting, new RaitingStat(3)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent LiveByBegging3Event = new CheckEvent(LiveByBegging3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Transports, new TransportStat(ETransport.SportCar)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, new UAH(24050)), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(7)), new NegativeAbility(Game.User.Food, new FoodStat(6)), new PositiveAbility(Game.User.Raiting, new RaitingStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent LiveByBegging4Event = new CheckEvent(LiveByBegging4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Transports, new TransportStat(ETransport.Helicopter)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, new USD(124050)), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(7)), new NegativeAbility(Game.User.Food, new FoodStat(6)), new PositiveAbility(Game.User.Raiting, new RaitingStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); //LiveByBegging0Event.Start(Game); //LiveByBegging1Event.Start(Game); LiveByBegging2Event.Start(Game); LiveByBegging3Event.Start(Game); LiveByBegging4Event.Start(Game); //робота CheckEvent Work0Event = new CheckEvent(Work0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Tent)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.School)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work0Price), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(3)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Work1Event = new CheckEvent(Work1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Tent)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.School)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work1Price), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Work2Event = new CheckEvent(Work2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Room)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.College)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work2Price), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(6)), new NegativeAbility(Game.User.Food, new FoodStat(4)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Work3Event = new CheckEvent(Work3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Mortgage)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.College)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work3Price), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(6)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Work4Event = new CheckEvent(Work4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Apartments)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.University)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work4Price), new NegativeAbility(Game.User.Mood, new MoodStat(5)), new NegativeAbility(Game.User.Hp, new HpStat(4)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Work5Event = new CheckEvent(Work5Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Office)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.StudyInEngland)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work5Price), new NegativeAbility(Game.User.Mood, new MoodStat(4)), new NegativeAbility(Game.User.Hp, new HpStat(3)), new NegativeAbility(Game.User.Food, new FoodStat(5)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Work6Event = new CheckEvent(Work6Button, new List <CheckAbility>() { new CheckAbility(Game.User.Properties, new PropertyStat(EProperty.Office)), new CheckAbility(Game.User.Educ, new EducStat(EEduc.StudyInEngland)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.work6Price), new NegativeAbility(Game.User.Mood, new MoodStat(3)), new NegativeAbility(Game.User.Hp, new HpStat(3)), new NegativeAbility(Game.User.Food, new FoodStat(6)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Work0Event.Start(Game); Work1Event.Start(Game); Work2Event.Start(Game); Work3Event.Start(Game); Work4Event.Start(Game); Work5Event.Start(Game); Work6Event.Start(Game); //освіта EnableCheckEvent Education0 = new EnableCheckEvent(Education0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.education0Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.education0Price), new PositiveAbility(Game.User.Educ, new EducStat(EEduc.MultiTable)), new PositiveAbility(Game.User.Raiting, new RaitingStat(100)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Education1 = new EnableCheckEvent(Education1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.education1Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.education1Price), new PositiveAbility(Game.User.Educ, new EducStat(EEduc.School)), new PositiveAbility(Game.User.Raiting, new RaitingStat(1000)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Education2 = new EnableCheckEvent(Education2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.education2Price), new CheckAbility(Game.User.Transports, new TransportStat(ETransport.Bike)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.education2Price), new PositiveAbility(Game.User.Educ, new EducStat(EEduc.College)), new PositiveAbility(Game.User.Raiting, new RaitingStat(5000)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Education3 = new EnableCheckEvent(Education3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.education3Price), new CheckAbility(Game.User.Transports, new TransportStat(ETransport.CheapCar)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.education3Price), new PositiveAbility(Game.User.Educ, new EducStat(EEduc.University)), new PositiveAbility(Game.User.Raiting, new RaitingStat(10000)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Education4 = new EnableCheckEvent(Education4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.education4Price), new CheckAbility(Game.User.Transports, new TransportStat(ETransport.SportCar)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.education4Price), new PositiveAbility(Game.User.Educ, new EducStat(EEduc.StudyInEngland)), new PositiveAbility(Game.User.Raiting, new RaitingStat(20000)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Education0.Start(Game); Education1.Start(Game); Education2.Start(Game); Education3.Start(Game); Education4.Start(Game); //рейтинг CheckEvent Raiting0Event = new CheckEvent(Raiting0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.raiting0Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.raiting0Price), new PositiveAbility(Game.User.Raiting, Settings_.raiting0Set), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Raiting1Event = new CheckEvent(Raiting1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.raiting1Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.raiting1Price), new PositiveAbility(Game.User.Raiting, Settings_.raiting1Set), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Raiting2Event = new CheckEvent(Raiting2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.raiting2Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.raiting2Price), new PositiveAbility(Game.User.Raiting, Settings_.raiting2Set), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Raiting3Event = new CheckEvent(Raiting3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.raiting3Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.raiting3Price), new PositiveAbility(Game.User.Raiting, Settings_.raiting3Set), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CheckEvent Raiting4Event = new CheckEvent(Raiting4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.raiting4Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.raiting4Price), new PositiveAbility(Game.User.Raiting, Settings_.raiting4Set), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); Raiting0Event.Start(Game); Raiting1Event.Start(Game); Raiting2Event.Start(Game); Raiting3Event.Start(Game); Raiting4Event.Start(Game); //нерухомість BuySellCheckEvent Property0Event = new BuySellCheckEvent(Realty0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property0Price) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.property0Price), new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Tent)) }); SubscribeEvent Property1Event = new SubscribeEvent(Realty1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property1Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Room)) }, new TimeStat(0, 5)); SubscribeEvent Property2Event = new SubscribeEvent(Realty2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property2Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Mortgage)) }, new TimeStat(0, 30)); BuySellCheckEvent Property3Event = new BuySellCheckEvent(Realty3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property3Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.property3Price), new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Apartments)) }); BuySellCheckEvent Property4Event = new BuySellCheckEvent(Realty4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property4Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.property4Price), new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Office)) }); BuySellCheckEvent Property5Event = new BuySellCheckEvent(Realty5Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property5Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.property5Price), new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Cottage)) }); BuySellCheckEvent Property6Event = new BuySellCheckEvent(Realty6Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.property6Price), new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.property6Price), new PositiveAbility(Game.User.Properties, new PropertyStat(EProperty.Villa)) }); Property0Event.Start(Game); Property1Event.Start(Game, Settings_.property1Price); Property2Event.Start(Game, Settings_.property2Price); Property3Event.Start(Game); Property4Event.Start(Game); Property5Event.Start(Game); Property6Event.Start(Game); //транспорт //EnableCheckEvent Transport0Event = new EnableCheckEvent(Transport0Button, new List<CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.transport0Price) }, new List<IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.transport0Price), new PositiveAbility(Game.User.Transports, new TransportStat(ETransport.JoggingShoes)) }); EnableCheckEvent Transport1Event = new EnableCheckEvent(Transport1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.transport1Price), new CheckAbility(Game.User.DriverLicense, new DriverLicenseStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.transport1Price), new PositiveAbility(Game.User.Transports, new TransportStat(ETransport.Bike)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Transport2Event = new EnableCheckEvent(Transport2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.transport2Price), new CheckAbility(Game.User.DriverLicense, new DriverLicenseStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.transport2Price), new PositiveAbility(Game.User.Transports, new TransportStat(ETransport.CheapCar)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Transport3Event = new EnableCheckEvent(Transport3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.transport3Price), new CheckAbility(Game.User.DriverLicense, new DriverLicenseStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.transport3Price), new PositiveAbility(Game.User.Transports, new TransportStat(ETransport.SportCar)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Transport4Event = new EnableCheckEvent(Transport4Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.transport4Price), new CheckAbility(Game.User.DriverLicense, new DriverLicenseStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.transport4Price), new PositiveAbility(Game.User.Transports, new TransportStat(ETransport.Helicopter)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); EnableCheckEvent Transport5Event = new EnableCheckEvent(Transport5Button, new List <CheckAbility>() { new CheckAbility(Game.User.Valutes, Settings_.transport5Price), new CheckAbility(Game.User.DriverLicense, new DriverLicenseStat(true)) }, new List <IAbility>() { new NegativeAbility(Game.User.Valutes, Settings_.transport5Price), new PositiveAbility(Game.User.Transports, new TransportStat(ETransport.Yacht)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); //Transport0Event.Start(Game); Transport1Event.Start(Game); Transport2Event.Start(Game); Transport3Event.Start(Game); Transport4Event.Start(Game); Transport5Event.Start(Game); //соціальні послуги EnableCheckEvent CityCouncil0Event = new EnableCheckEvent(CityCouncil0Button, new List <CheckAbility>() { new CheckAbility(Game.User.Raiting, new RaitingStat(2000)) }, new List <IAbility>() { new PositiveAbility(Game.User.Passport, new PassportStat(true)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); SubscribeEvent CityCouncil1Event = new SubscribeEvent(CityCouncil1Button, new List <CheckAbility>() { new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.cityCouncil1Gift) }, new TimeStat(0, 1)); SubscribeEvent CityCouncil2Event = new SubscribeEvent(CityCouncil2Button, new List <CheckAbility>() { new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.cityCouncil2Gift) }, new TimeStat(0, 1)); EnableCheckEvent CityCouncil3Event = new EnableCheckEvent(CityCouncil3Button, new List <CheckAbility>() { new CheckAbility(Game.User.Passport, new PassportStat(true)) }, new List <IAbility>() { new PositiveAbility(Game.User.Valutes, Settings_.cityCouncil2Gift), new PositiveAbility(Game.User.DriverLicense, new DriverLicenseStat(true)), new PositiveAbility(Game.User.Times, Settings_.DefaultTimeMove) }); CityCouncil0Event.Start(Game); CityCouncil1Event.Start(Game); CityCouncil2Event.Start(Game); CityCouncil3Event.Start(Game); }
public void AddCheckEvent(string guid, CheckEvent evt) { CheckDataIndices[guid] = CheckData.Count; CheckData.Add(evt); evt.dynamic = true; }