private void CheatsManager_OnCheatUpdated(string key, CheatType cheatType) { if (key == "invincibility") { invincibility = CheatsManager.GetBool(key); } }
private void CheatsManager_OnCheatUpdated(string key, CheatType cheatType) { if (key != cheatKey) { return; } doubleJump = CheatsManager.GetBool(key); }
void new_data_cheat(string address_str, string type, string value, string section, string flag, string description) { try { ulong address = ulong.Parse(address_str, NumberStyles.HexNumber); int sectionID = processManager.GetMappedSectionID(address); if (sectionID == -1) { MessageBox.Show("Address is out of range!"); return; } for (int i = 0; i < cheatList.Count; ++i) { if (cheatList[i].Address == address_str) { return; } } ulong flag_u = ulong.Parse(flag, NumberStyles.HexNumber); bool lock_ = (flag_u & CONSTANT.SAVE_FLAG_LOCK) == CONSTANT.SAVE_FLAG_LOCK ? true : false; ValueType valueType = MemoryHelper.GetValueTypeByString(type); CheatType cheatType = Cheat.GetCheatTypeByValueType(valueType); if (cheatType == CheatType.DATA_TYPE) { DataCheat dataCheat = new DataCheat(processManager, address_str, sectionID, value, lock_, valueType, description); add_new_row_of_cheat_list_view(dataCheat, sectionID); cheatList.Add(dataCheat); } else if (cheatType == CheatType.HEX_TYPE) { HexCheat hexCheat = new HexCheat(processManager, address_str, sectionID, value, lock_, valueType, description); add_new_row_of_cheat_list_view(hexCheat, sectionID); cheatList.Add(hexCheat); } } catch (Exception exception) { MessageBox.Show(exception.Message, exception.Source, MessageBoxButtons.OK, MessageBoxIcon.Hand); } }
void OnCheatChanged(string key, CheatType cheatType) { switch (cheatType) { case CheatType.Boolean: if (key == CheatsKey.keyInfiniteResources) { ManageActivation_InfiniteResources(); } if (key == CheatsKey.keyDisableFog) { ManageActive_FogOfWar(); } break; default: throw new NotImplementedException(); } }
private void CheatsManager_OnCheatChanged(string key, CheatType cheatType) { Repaint(); }