#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iosgods..joanmadrun.plist"
inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
%hook Joan
-(bool)canTakeDamage {
if(GetPrefBool(@"kDamage")) {
return FALSE;
}
return %orig;
}
%end
%hook DataManage
-(bool)infiniteAmmo {
if(GetPrefBool(@"kAmmo")) {
return TRUE;
}
return %orig;
}
-(long long)coinsInHand {
if(GetPrefBool(@"kCoins")) {
return 999999999;
}
return %orig;
}
%end
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Visit Us"])
{
[[uIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://iosgods.com/]];
}
}
%end