public override bool Parse(string[] cheat_elements) { int start_idx = 1; string addressType = cheat_elements[start_idx]; ++start_idx; switch (addressType) { case "data": { AddressCheatOperator addressCheatOperator = new AddressCheatOperator(ProcessManager); Destination = addressCheatOperator; } break; case "address": { AddressCheatOperator addressCheatOperator = new AddressCheatOperator(ProcessManager); Destination = addressCheatOperator; } break; case "pointer": { SimplePointerCheatOperator pointerCheatOperator = new SimplePointerCheatOperator(ProcessManager); Destination = pointerCheatOperator; } break; default: break; } switch (addressType) { case "data": ((AddressCheatOperator)Destination).ParseOldFormat(cheat_elements, ref start_idx); break; default: Destination.Parse(cheat_elements, ref start_idx, true); break; } this.AddressType = addressType; start_idx += 2; Source = new BatchCodeCheatOperator(Destination, this.ProcessManager); Source.Parse(cheat_elements, ref start_idx, false); ulong flag = ulong.Parse(cheat_elements[start_idx], NumberStyles.HexNumber); Lock = flag == 1 ? true : false; Description = cheat_elements[start_idx + 1]; return(true); }
public bool Reset() { BatchCodeCheatOperator batchOperator = (BatchCodeCheatOperator)this.Source; return(batchOperator.ResetData()); }
public bool Execute() { BatchCodeCheatOperator batchOperator = (BatchCodeCheatOperator)this.Source; return(batchOperator.WriteData()); }