public void Load(BinaryReader reader) { this.Name = reader.ReadString(); this.SetWorldVariables = reader.ReadStrings(); this.UnsetWorldVariables = reader.ReadStrings(); int count = reader.ReadInt32(); this.RequiredItems = new List <ItemDefinition>(count); for (int i = 0; i < count; i++) { ItemDefinition item = default(ItemDefinition); item.Load(reader); this.RequiredItems.Add(item); } this.RequiredWorldVariables = reader.ReadStrings(); this.RequiredNOWorldVariables = reader.ReadStrings(); this.RemoveRequiredItems = reader.ReadBoolean(); this.GiveItem = reader.ReadStrings(); this.YesCommand = reader.ReadString(); this.NoCommand = reader.ReadString(); this.ForwardCommand = reader.ReadString(); this.PostAction = (SpecialAction)reader.ReadInt16(); this.PreAction = (SpecialAction)reader.ReadInt16(); this.ConversationType = (ConversationType)reader.ReadInt16(); this.UnlockTeir = (Tier)reader.ReadInt16(); }
// // Constructors // private UnitType(string name, string specialDesc, SpecialAction action, Color color) { _name = name; _specialDesc = specialDesc; _specialAction = action; _color = color; }
public SpecialActionItem(SpecialAction specialAction, string displayName, int index) { this.specialAction = specialAction; this.typeName = displayName; this.index = index; }
// From Teacher Panel public void ProcessCommand() { if (Navigation != null) { Debug.WriteLine("CHosen Student" + Navigation); GlobalFlowControl.Lesson.ChosenStudent = Navigation; //BaseHelper.Go(Navigation); } if (Movement != null) { BaseHelper.DoBaseMovements(Movement); } if (Gesture != null) { UpperBodyHelper.DoGestures(Gesture); } if (Chatbot != null) { } if (LessonStatus != null) { Debug.WriteLine(LessonStatus + " Lesson Status"); if (LessonStatus == "StopQuestion") { GlobalFlowControl.Lesson.StartingQuiz = false; } } if (SpecialAction != null) { Debug.WriteLine("Special Action : " + SpecialAction); string thing = SpecialAction.Split('-')[0]; string info = SpecialAction.Split('-')[1]; if (thing == "Emotion") { GlobalFlowControl.Lesson.StudentFeedbackReceived = true; double sadPc = double.Parse(info.Split(';')[0]); double neutralPc = double.Parse(info.Split(';')[1]); double happyPc = double.Parse(info.Split(';')[2]); AnalyzeEmotion(happyPc, sadPc, neutralPc); } } if (AssessPerformance != null) { AskRandomStudent(AssessPerformance); } }
public void SpecialActionInstantiation() { // If: // ... I create a special action object var specialAction = new SpecialAction(); // Then: // ... The special action should be set to none and only none Assert.Equal(true, specialAction.None); Assert.Equal(false, specialAction.ExpectYukonXMLShowPlan); }
void CalcActions() { action = SpecialAction.NONE; if (lhandPos.X > 220 && lhandPos.X < 280 && lhandPos.Y > 120 && lhandPos.Y < 180) { action = SpecialAction.FIRE; } else if (lhandPos.X > 220 && lhandPos.X < 280 && lhandPos.Y > 320 && lhandPos.Y < 380) { action = SpecialAction.INTAKE; } }
public void SpecialActionExpectYukonXmlShowPlanReset() { // If: // ... I create a special action object and add properties but set the property back to false var specialAction = new SpecialAction(); specialAction.ExpectYukonXMLShowPlan = true; specialAction.ExpectYukonXMLShowPlan = false; // Then: // ... The special action should be set to none and only none Assert.Equal(true, specialAction.None); Assert.Equal(false, specialAction.ExpectYukonXMLShowPlan); }
public LogicProcess(bool repeat, ICommunicator comm, int commodity, int price, int amount, int id) { list = new List <InnerLogic>(); this.queue = LogicQueue.first; this.currIndex = 0; this.repeat = repeat; this.comm = comm; this.commodity = commodity; this.price = price; this.amount = amount; this.id = id; this.spec = null; }
public GameResponse UseSpecialAction(Guid playerId, SpecialAction action) { if (Phase != GamePhase.UsePeopleActions && Phase != GamePhase.FeedPeople) { return(GameResponse.Fail()); } var player = _players.SingleOrDefault(p => p.Id == playerId); if (player == null) { return(GameResponse.Fail()); } // any time, e.g. 2 resource card throw new NotImplementedException(); }
void LoadAction() { SpecialAction act = Global.GetAction(oldprofilename); foreach (string s in act.controls.Split('/')) { foreach (ListViewItem lvi in lVTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } switch (act.type) { case "Macro": cBActions.SelectedIndex = 1; macrostag = act.macro; lbMacroRecorded.Text = "Macro Recored"; cBMacroScanCode.Checked = act.keyType.HasFlag(DS4KeyType.ScanCode); break; case "Program": cBActions.SelectedIndex = 2; LoadProgram(act.details); break; case "Profile": cBActions.SelectedIndex = 3; cBProfiles.Text = act.details; foreach (string s in act.ucontrols.Split('/')) { foreach (ListViewItem lvi in lVUnloadTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } break; } }
public void SpecialActionCombiningProperties() { // If: // ... I create a special action object and add properties and combine with the same property var specialAction = new SpecialAction(); specialAction.ExpectYukonXMLShowPlan = true; var specialAction2 = new SpecialAction(); specialAction2.ExpectYukonXMLShowPlan = true; specialAction.CombineSpecialAction(specialAction2); // Then: // ... The special action should be set to none and only none Assert.Equal(false, specialAction.None); Assert.Equal(true, specialAction.ExpectYukonXMLShowPlan); }
public void ResetPlayer( ) { Life = 1; playerDead = false; StopPlayer = true; totalDis = 0; maxSpeed = MaxSpeed; maxSpeedCL = MaxSpeedCL; accelerationCL = AccelerationCL; acceleration = Acceleration; impulsionCL = ImpulsionCL; decelerationCL = DecelerationCL; ThisAct = SpecialAction.Nothing; timeToDP = TimeToDoublePunch; BarMadness = GlobalManager.Ui.Madness; BarMadness.value = 0; NbrLineRight = 0; NbrLineLeft = 0; InMadness = false; GlobalManager.Ui.CloseMadness( ); }
private void OnValidate() { if (_answers == null || _answers.Length == 0) { _answers = new LocalizedString[1]; } if (_onAnswerActions == null) { _onAnswerActions = new SpecialAction[1]; } int compareVal = _onAnswerActions.Length.CompareTo(_answers.Length); if (compareVal == 0) { return; } SpecialAction[] tempArray = new SpecialAction[_answers.Length]; for (int i = 0; i < ((compareVal == -1) ? _onAnswerActions.Length : _answers.Length); i++) { tempArray[i] = _onAnswerActions[i]; } _onAnswerActions = tempArray; }
void LoadAction() { SpecialAction act = Global.GetAction(oldprofilename); string[] dets; foreach (string s in act.controls.Split('/')) { foreach (ListViewItem lvi in lVTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } switch (act.type) { case "Macro": cBActions.SelectedIndex = 1; macrostag = act.macro; lbMacroRecorded.Text = "Macro Recored"; cBMacroScanCode.Checked = act.keyType.HasFlag(DS4KeyType.ScanCode); break; case "Program": cBActions.SelectedIndex = 2; LoadProgram(act.details); nUDProg.Value = (decimal)act.delayTime; tBArg.Text = act.extra; break; case "Profile": cBActions.SelectedIndex = 3; cBProfiles.Text = act.details; if (act.ucontrols != null) { foreach (string s in act.ucontrols.Split('/')) { foreach (ListViewItem lvi in lVUnloadTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } } break; case "Key": cBActions.SelectedIndex = 4; int key = int.Parse(act.details); btnSelectKey.Text = ((Keys)key).ToString() + (act.keyType.HasFlag(DS4KeyType.ScanCode) ? " (SC)" : "") + (!string.IsNullOrEmpty(act.ucontrols) ? " (Toggle)" : ""); btnSelectKey.Tag = key; if (act.pressRelease) { cBPressRelease.SelectedIndex = 1; } if (!string.IsNullOrEmpty(act.ucontrols)) { //cBPressToggleKeys.SelectedIndex = 1; foreach (string s in act.ucontrols.Split('/')) { foreach (ListViewItem lvi in lVUnloadTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } } break; case "DisconnectBT": cBActions.SelectedIndex = 5; nUDDCBT.Value = (decimal)act.delayTime; break; case "BatteryCheck": cBActions.SelectedIndex = 6; dets = act.details.Split(','); nUDDCBatt.Value = (decimal)act.delayTime; cBNotificationBatt.Checked = bool.Parse(dets[1]); cbLightbarBatt.Checked = bool.Parse(dets[2]); bnEmptyColor.BackColor = Color.FromArgb(byte.Parse(dets[3]), byte.Parse(dets[4]), byte.Parse(dets[5])); bnFullColor.BackColor = Color.FromArgb(byte.Parse(dets[6]), byte.Parse(dets[7]), byte.Parse(dets[8])); break; case "XboxGameDVR": /* if (cBActions.Items.Count < 8) * { * cBActions.Items.Add("Xbox Game DVR"); * cBTapDVR.SelectedIndex = 0; * cBHoldDVR.SelectedIndex = 2; * cBDTapDVR.SelectedIndex = 1; * } * cBActions.SelectedIndex = 7; * dets = act.details.Split(','); * if (int.Parse(dets[3]) == 0) * btnCustomDVRKey.Text = "Custom Key"; * else * btnCustomDVRKey.Text = ((Keys)(int.Parse(dets[3]))).ToString(); * btnCustomDVRKey.Tag = int.Parse(dets[3]); * cBTapDVR.SelectedIndex = int.Parse(dets[0]); * cBHoldDVR.SelectedIndex = int.Parse(dets[1]); * cBDTapDVR.SelectedIndex = int.Parse(dets[2]);*/ break; case "MultiAction": cBActions.SelectedIndex = 7; dets = act.details.Split(','); for (int i = 0; i < 3; i++) { string[] macs = dets[i].Split('/'); foreach (string s in macs) { int v; if (int.TryParse(s, out v)) { multiMacrostag[i].Add(v); } } switch (i) { case 0: btnSTapT.Text = macs.Length > 1 ? Properties.Resources.MacroRecorded : Properties.Resources.SelectMacro; break; case 1: btnHoldT.Text = macs.Length > 1 ? Properties.Resources.MacroRecorded : Properties.Resources.SelectMacro; break; case 2: btnDTapT.Text = macs.Length > 1 ? Properties.Resources.MacroRecorded : Properties.Resources.SelectMacro; break; } } /*if (int.Parse(dets[3]) == 0) * btnCustomDVRKey.Text = "Custom Key"; * else * btnCustomDVRKey.Text = ((Keys)(int.Parse(dets[3]))).ToString(); * btnCustomDVRKey.Tag = int.Parse(dets[3]); * cBTapDVR.SelectedIndex = int.Parse(dets[0]); * cBHoldDVR.SelectedIndex = int.Parse(dets[1]); * cBDTapDVR.SelectedIndex = int.Parse(dets[2]);*/ break; case "SASteeringWheelEmulationCalibrate": cBActions.SelectedIndex = 8; nUDDCBT.Value = (decimal)act.delayTime; break; } }
static bool CheckPlayerInputDown(SpecialAction key) { return((bool)AccessTools.Method(typeof(PlayerAnimControl), "CheckPlayerInputDown").Invoke( PlayerAnimControl.instance, new object[] { key })); }
public SpecialActionItem(SpecialAction specialAction, string displayName) { this.specialAction = specialAction; this.typeName = displayName; }
public MogwaiKeys TestMogwaiKeys() { //return GetKeysFor("M9whXm2mjrhySAH6D81Lk5mthw1mUEZpvi", "MGJ9VoguyKeRTYmpURgztife4N7PnuDH6u"); var lvlBarbarian = new LevelingAction(LevelingType.Class, ClassType.Barbarian, 0, 1); var lvlCleric = new LevelingAction(LevelingType.Class, ClassType.Cleric, 0, 1); var lvlSorcerer = new LevelingAction(LevelingType.Class, ClassType.Sorcerer, 0, 1); var dungAction = new AdventureAction(AdventureType.Dungeon, DifficultyType.Easy, 2); var healAction = new SpecialAction(SpecialType.Heal, SpecialSubType.None, CostType.Medium); var revivingAction = new SpecialAction(SpecialType.Reviving, SpecialSubType.None, CostType.High); var pubMogAddressHex = HexHashUtil.ByteArrayToString(Base58Encoding.Decode("MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i")); var blockHeight = 84659; var index = 0; var shifts = new Dictionary <long, Shift> { { blockHeight, new Shift(index++, 1530914381, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", 1.00m, 0.0001m) }, { blockHeight, new Shift(index++, 1530914381, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlSorcerer.GetValue1(), lvlSorcerer.GetValue2()) }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, 1539810141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", lvlBarbarian.GetValue1(), lvlBarbarian.GetValue2()) }, { blockHeight, new Shift(index++, 1539815141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", healAction.GetValue1(), healAction.GetValue2()) }, { blockHeight, new Shift(index++, 1540417599, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000b552e9c7c51ed793f87c51b2cc945fbb222efd6cec17666a5ecd18a5", 1, "cb03db5029f426ed517fdfffd6a90c99a3111f2254f41f9a8f56320076b1f0e3", dungAction.GetValue1(), dungAction.GetValue2()) }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f547219bb43174cc97bf2164d2e39") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163dc3671ba28b41ecab6f547219bb43174cc97bf2164d2e30") }, { blockHeight, new Shift(index++, 1555309745, "32ab20cfbef0ccddfe5c79e726f5fc48b151106f196f7ccb71", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bdf29", revivingAction.GetValue1(), revivingAction.GetValue2()) }, { blockHeight, new Shift(index++, 1539815141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", healAction.GetValue1(), healAction.GetValue2()) }, { blockHeight, new Shift(index++, 1539810141, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", lvlSorcerer.GetValue1(), lvlSorcerer.GetValue2()) }, { blockHeight, new Shift(index++, 1540985507, "32ab20cfbef0ccddfe5c79e726f5fc48b151106f196f7ccb71", blockHeight++, "00000000b2204f48bb8d48542a6ada13bc86dde4d2909563fdb8f46389d1a1d2", 1, "01d8c163c4f034f7d1f8d7e94fc9fc9a30bbef1aa41c2e03dab29787588c60c4", dungAction.GetValue1(), dungAction.GetValue2()) }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e31") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e31") }, { blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e31") }, { blockHeight, new Shift(index++, 1555309745, "32ab20cfbef0ccddfe5c79e726f5fc48b151106f196f7ccb71", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bdf29", revivingAction.GetValue1(), revivingAction.GetValue2()) }, { blockHeight, new Shift(index++, 1556309745, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", healAction.GetValue1(), healAction.GetValue2()) }, { blockHeight, new Shift(index++, 1557309745, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", lvlSorcerer.GetValue1(), lvlSorcerer.GetValue2()) }, { blockHeight, new Shift(index++, 1541350482, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000341eea3f27e4ddaf72253cd6a35f54ece70fdeee0906a663f8403a60", 1, "302e37f0c69b1b037bc178fce6f8493a76a4c844df5391a0a46e81fcad8657c8", 0.01042002m, 0.00019003m) }, }; for (var i = 0; i < 30; i++) { shifts.Add(blockHeight, new Shift(index++, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "0000000033dbfc163de3671ba28b41ecab6f5d1cf9bb43174cc97bf2164d2e39")); } for (var i = 0; i < 10; i++) { shifts.Add(blockHeight, new Shift(index++, 1530914381, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", lvlBarbarian.GetValue1(), lvlBarbarian.GetValue2())); } var dungActionNext = new AdventureAction(AdventureType.Dungeon, DifficultyType.Easy, 8); shifts.Add(blockHeight, new Shift(index++, 1540417599, "328e6077135a1012eae0c92dc624d1cbc02c69d45200e5f72c", blockHeight++, "00000000b552e9c7c51ed793f87c51b2cc945fbb222efd6cec17666a5ecd18a5", 1, "cb03db5029f426ed517fdfffd6a90c99a3111f2254f41f9a8f56320076b1f0e3", dungActionNext.GetValue1(), dungActionNext.GetValue2())); // var shifts = new Dictionary<long, Shift> // { // { // 1001, new Shift(0, 1530914381, pubMogAddressHex, // 1001, "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e", // 2, "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf", // 1.00m, // 0.0001m) // }, // { // 1002, new Shift(1, 1535295740, pubMogAddressHex, // 1002, "0000000033dbfc3cc9f3671ba28b41ecab6f547219bb43174cc97bf23269fa88", // 1, "db5639553f9727c42f80c22311bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", // 0.01040003m, // 0.00001002m) // }, // { // 1003, new Shift(2, pubMogAddressHex, // 1003, "0000000033dbfc3cc9f3671ba28b41ecab6f547219bb43174cc97bf2163d2e38") // }, // { // 1004, new Shift(3, pubMogAddressHex, // 1004, "0000000033dbfc163df3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1005, new Shift(4, pubMogAddressHex, // 1005, "0000000033dbfc163de3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1006, new Shift(5, pubMogAddressHex, // 1006, "0000000033dbfc163dc3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1007, new Shift(6, pubMogAddressHex, // 1007, "0000000033dbfc163db3671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1008, new Shift(7, pubMogAddressHex, // 1008, "0000000033dbfc163def671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1009, new Shift(8, pubMogAddressHex, // 1009, "0000000033dbfc163dff671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1010, new Shift(9, 1555295740, pubMogAddressHex, // 1010, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "cbcd39553f9727c434343222f1bd8025608edcfbcfc262c0c2afe9fc3f0bcb29", // lvlAction.GetValue1(), // lvlAction.GetValue2()) // }, // { // 1011, new Shift(10, pubMogAddressHex, // 1011, "0000000033dbfc163dff671ba28b41ecab6f547219bb43174cc97bf2164d2e38") // }, // { // 1012, new Shift(11, 1555299745, pubMogAddressHex, // 1012, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bcf29", // dungAction.GetValue1(), // dungAction.GetValue2()) // }, // { // 1013, new Shift(12, 1555309745, pubMogAddressHex, // 1013, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bdf29", // revivingAction.GetValue1(), // revivingAction.GetValue2()) // }, // { // 1014, new Shift(13, 1555329745, pubMogAddressHex, // 1014, "0000000044db5c3cc943271b324b31ecab6f547219bb43174cc97bf23269fa88", // 1, "bbcd39553a9727c434343242f9bd8025608edcfbcfc262c0c2afe9fc3f0bff29", // healAction.GetValue1(), // healAction.GetValue2()) // }, // { // 1015, new Shift(14, 1539810141, "328b742623b139b29553d0c2cc2c785ed8feff324a37a6bc41", // 75422, "000000004eb637ffbdb8674dbe5ff5c339a50b0dac1723f1df44b7b790746a6e", // 1, "7876fde772cae5684ad133a007c92f5f209cc91fdc1814fe3dab2c6174557ea7", // 0.01042002m, // 0.00020002m) // } //}; var mogwai = new Mogwai("MJHYMxu2kyR1Bi4pYwktbeCM7yjZyVxt2i", shifts); return(new MogwaiKeys { Mogwai = mogwai, Balance = 2.1234m, IsUnwatched = false, LastUpdated = DateTime.Now, MogwaiKeysState = MogwaiKeysState.Bound, Shifts = shifts }); }
public GameResponse UseSpecialAction(Guid playerId, SpecialAction action) { if (Phase != GamePhase.UsePeopleActions && Phase != GamePhase.FeedPeople) return GameResponse.Fail(); var player = _players.SingleOrDefault(p => p.Id == playerId); if (player == null) return GameResponse.Fail(); // any time, e.g. 2 resource card throw new NotImplementedException(); }
//OBSOLETE //Used for further enhancing the logicProcess and testing public void addSpecialAction(SpecialAction spec) { this.spec = spec; }
void LoadAction() { SpecialAction act = Global.GetAction(oldprofilename); string[] dets; foreach (string s in act.controls.Split('/')) { foreach (ListViewItem lvi in lVTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } switch (act.type) { case "Macro": cBActions.SelectedIndex = 1; macrostag = act.macro; lbMacroRecorded.Text = "Macro Recored"; cBMacroScanCode.Checked = act.keyType.HasFlag(DS4KeyType.ScanCode); break; case "Program": cBActions.SelectedIndex = 2; LoadProgram(act.details); nUDProg.Value = (decimal)act.delayTime; tBArg.Text = act.extra; break; case "Profile": cBActions.SelectedIndex = 3; cBProfiles.Text = act.details; foreach (string s in act.ucontrols.Split('/')) { foreach (ListViewItem lvi in lVUnloadTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } break; case "Key": cBActions.SelectedIndex = 4; int key = int.Parse(act.details); btnSelectKey.Text = ((Keys)key).ToString() + (act.keyType.HasFlag(DS4KeyType.ScanCode) ? " (SC)" : "") + (!string.IsNullOrEmpty(act.ucontrols) ? " (Toggle)" : ""); btnSelectKey.Tag = key; if (act.pressRelease) { cBPressRelease.SelectedIndex = 1; } if (!string.IsNullOrEmpty(act.ucontrols)) { //cBPressToggleKeys.SelectedIndex = 1; foreach (string s in act.ucontrols.Split('/')) { foreach (ListViewItem lvi in lVUnloadTrigger.Items) { if (lvi.Text == s) { lvi.Checked = true; break; } } } } break; case "DisconnectBT": cBActions.SelectedIndex = 5; nUDDCBT.Value = (decimal)act.delayTime; break; case "BatteryCheck": cBActions.SelectedIndex = 6; dets = act.details.Split(','); nUDDCBatt.Value = (decimal)act.delayTime; cBNotificationBatt.Checked = bool.Parse(dets[1]); cbLightbarBatt.Checked = bool.Parse(dets[2]); bnEmptyColor.BackColor = Color.FromArgb(byte.Parse(dets[3]), byte.Parse(dets[4]), byte.Parse(dets[5])); bnFullColor.BackColor = Color.FromArgb(byte.Parse(dets[6]), byte.Parse(dets[7]), byte.Parse(dets[8])); break; case "XboxGameDVR": if (cBActions.Items.Count < 8) { cBActions.Items.Add("Xbox Game DVR"); cBTapDVR.SelectedIndex = 0; cBHoldDVR.SelectedIndex = 2; cBDTapDVR.SelectedIndex = 1; } cBActions.SelectedIndex = 7; dets = act.details.Split(','); if (int.Parse(dets[3]) == 0) { btnCustomDVRKey.Text = "Custom Key"; } else { btnCustomDVRKey.Text = ((Keys)(int.Parse(dets[3]))).ToString(); } btnCustomDVRKey.Tag = int.Parse(dets[3]); cBTapDVR.SelectedIndex = int.Parse(dets[0]); cBHoldDVR.SelectedIndex = int.Parse(dets[1]); cBDTapDVR.SelectedIndex = int.Parse(dets[2]); break; } }