3 * The Cheat - The legendary universal game trainer for Mac OS X.
4 * http://www.dogcows.com/chaz/wiki/TheCheat
6 * Copyright (c) 2003-2010, Charles McGarvey et al.
8 * Distributable under the terms and conditions of the 2-clause BSD
9 * license; see the file COPYING for the legal text of the license.
12 #import "LocalCheater.h"
15 @implementation Cheater
18 // #############################################################################
19 #pragma mark Initialization
20 // #############################################################################
22 - (id)initWithDelegate
:(id)delegate
24 if ( self = [self init
] ) {
26 [self setDelegate
:delegate
];
27 ChazLog( @
"init Cheater %p", self );
34 ChazLog( @
"dealloc Cheater %p", self );
44 - (void)setDelegate
:(id)delegate
46 // make sure the delegate is not nil and that it conforms to the CheaterDelegate
47 if ( [delegate conformsToProtocol
:@protocol(CheaterDelegate
)] ) {
61 - (BOOL)isAuthenticated
63 return _isAuthenticated
;
66 - (NSString
*)hostAddress
72 // #############################################################################
73 #pragma mark Cheating Control
74 // #############################################################################
78 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
79 NSStringFromClass(isa
),
80 NSStringFromSelector(_cmd
)];
85 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
86 NSStringFromClass(isa
),
87 NSStringFromSelector(_cmd
)];
90 - (void)authenticateWithPassword
:(NSString
*)password
92 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
93 NSStringFromClass(isa
),
94 NSStringFromSelector(_cmd
)];
98 - (void)getProcessList
100 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
101 NSStringFromClass(isa
),
102 NSStringFromSelector(_cmd
)];
106 - (void)setTarget
:(Process
*)target
108 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
109 NSStringFromClass(isa
),
110 NSStringFromSelector(_cmd
)];
115 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
116 NSStringFromClass(isa
),
117 NSStringFromSelector(_cmd
)];
122 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
123 NSStringFromClass(isa
),
124 NSStringFromSelector(_cmd
)];
128 - (void)limitReturnedResults
:(unsigned)limit
130 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
131 NSStringFromClass(isa
),
132 NSStringFromSelector(_cmd
)];
135 - (void)searchForVariable
:(Variable
*)data comparison
:(TCSearchOperator
)op
137 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
138 NSStringFromClass(isa
),
139 NSStringFromSelector(_cmd
)];
142 - (void)searchLastValuesComparison
:(TCSearchOperator
)op
144 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
145 NSStringFromClass(isa
),
146 NSStringFromSelector(_cmd
)];
151 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
152 NSStringFromClass(isa
),
153 NSStringFromSelector(_cmd
)];
158 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
159 NSStringFromClass(isa
),
160 NSStringFromSelector(_cmd
)];
163 - (void)getMemoryDump
165 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
166 NSStringFromClass(isa
),
167 NSStringFromSelector(_cmd
)];
170 - (void)cancelMemoryDump
172 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
173 NSStringFromClass(isa
),
174 NSStringFromSelector(_cmd
)];
178 - (void)makeVariableChanges
:(NSArray
*)variables repeat
:(BOOL)doRepeat interval
:(NSTimeInterval
)repeatInterval
180 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
181 NSStringFromClass(isa
),
182 NSStringFromSelector(_cmd
)];
185 - (void)stopChangingVariables
187 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
188 NSStringFromClass(isa
),
189 NSStringFromSelector(_cmd
)];
195 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
196 NSStringFromClass(isa
),
197 NSStringFromSelector(_cmd
)];
202 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
203 NSStringFromClass(isa
),
204 NSStringFromSelector(_cmd
)];
208 - (void)watchVariablesAtIndex
:(unsigned)index count
:(unsigned)count interval
:(NSTimeInterval
)checkInterval
210 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
211 NSStringFromClass(isa
),
212 NSStringFromSelector(_cmd
)];
215 - (void)stopWatchingVariables
217 [NSException raise
:@
"TCNotImplemented" format
:@
"The subclass of Cheater (%@) needs to implement selector %@.",
218 NSStringFromClass(isa
),
219 NSStringFromSelector(_cmd
)];