├── Pay ├── BaseMsgContentViewController.h ├── CMessageNodeData.h ├── CMessageWrap.h ├── WCPayC2CMessageNodeView.h └── WCRedEnvelopesReceiveHomeView.h └── Tweak_RedEnvelope.xm /Pay/BaseMsgContentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 12 2013 11:45:38). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | // 6 | 7 | @interface BaseMsgContentViewController : NSObject 8 | { 9 | 10 | } 11 | 12 | - (id)GetMessageNodeDataArray; 13 | - (id)findNodeDataByLocalId:(unsigned long)arg1; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Pay/CMessageNodeData.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 12 2013 11:45:38). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | // 6 | 7 | @class CMessageWrap, UIView; 8 | 9 | @interface CMessageNodeData : NSObject 10 | { 11 | int m_eMsgNodeType; 12 | CMessageWrap *m_msgWrap; 13 | UIView *m_view; 14 | unsigned long m_uCreateTime; 15 | } 16 | 17 | @property(nonatomic) unsigned long m_uCreateTime; // @synthesize m_uCreateTime; 18 | @property(retain, nonatomic) UIView *m_view; // @synthesize m_view; 19 | @property(retain, nonatomic) CMessageWrap *m_msgWrap; // @synthesize m_msgWrap; 20 | @property(nonatomic) int m_eMsgNodeType; // @synthesize m_eMsgNodeType; 21 | - (unsigned int)GetNodeViewType; 22 | - (int)compare:(id)arg1; 23 | - (void)dealloc; 24 | - (id)init; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /Pay/CMessageWrap.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 12 2013 11:45:38). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | // 6 | 7 | @interface CMessageWrap : NSObject 8 | { 9 | 10 | } 11 | 12 | @property(nonatomic) unsigned long m_uiMessageType; // @synthesize m_uiMessageType; 13 | @property(nonatomic) unsigned long m_uiMesLocalID; // @synthesize m_uiMesLocalID; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Pay/WCPayC2CMessageNodeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 12 2013 11:45:38). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | // 6 | 7 | @class UIView; 8 | 9 | @interface WCPayC2CMessageNodeView : UIView 10 | { 11 | 12 | } 13 | 14 | - (void)onClick; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Pay/WCRedEnvelopesReceiveHomeView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.4 (64 bit) (Debug version compiled Oct 12 2013 11:45:38). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | // 6 | 7 | #import "MMUIView.h" 8 | 9 | @class MMDelegateProxy, MMWebImageView, NSDictionary, UIButton, UIImageView, UIView; 10 | 11 | @interface WCRedEnvelopesReceiveHomeView : MMUIView 12 | { 13 | MMDelegateProxy *m_delegate; 14 | UIImageView *m_backgroundView; 15 | UIButton *openRedEnvelopesButton; 16 | UIImageView *openAnimationImageView; 17 | struct CGRect m_frame; 18 | NSDictionary *m_dicBaseInfo; 19 | BOOL m_bSuccessAnmation; 20 | UIView *oRedView; 21 | UIView *oTopHeaderView; 22 | MMWebImageView *imageView; 23 | MMWebImageView *maskImageView; 24 | } 25 | 26 | - (id).cxx_construct; 27 | - (void)showSuccessOpenAnimation; 28 | - (void)removeView; 29 | - (void)endAnimation; 30 | - (void)showAnimation; 31 | - (void)stopReceiveAnimation; 32 | - (void)startReceiveAnimation; 33 | - (void)OnOpenRedEnvelopes; 34 | - (void)OnOpenList; 35 | - (void)OnCancelButtonDone; 36 | - (id)initWithFrame:(struct CGRect)arg1 andData:(id)arg2 delegate:(id)arg3; 37 | - (void)refreshViewWithData:(id)arg1; 38 | - (void)dealloc; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /Tweak_RedEnvelope.xm: -------------------------------------------------------------------------------- 1 | #import "Pay/CMessageNodeData.h" 2 | #import "Pay/CMessageWrap.h" 3 | #import "Pay/WCPayC2CMessageNodeView.h" 4 | #import "Pay/BaseMsgContentViewController.h" 5 | 6 | %hook BaseMsgContentViewController 7 | 8 | - (id)newMessageNodeViewForMessageWrap:(id)arg1 contact:(id)arg2 chatContact:(id)arg3 9 | { 10 | //NSLog(@"newMessageNodeViewForMessageWrap %@ %@", [arg1 class], [NSThread callStackSymbols]); 11 | id msg = %orig; 12 | [self performSelector:@selector(checkRedEnvelope:) withObject:arg1 afterDelay:1]; 13 | return msg; 14 | } 15 | 16 | %new 17 | - (void)checkRedEnvelope:(CMessageWrap *)msg 18 | { 19 | if ([msg m_uiMessageType] == 49) { 20 | CMessageNodeData *node = [self findNodeDataByLocalId:[msg m_uiMesLocalID]]; 21 | if (node && [NSStringFromClass([[node m_view] class]) isEqualToString:@"WCPayC2CMessageNodeView"]) { 22 | WCPayC2CMessageNodeView *view = (WCPayC2CMessageNodeView *)[node m_view]; 23 | [view onClick]; 24 | } 25 | } 26 | } 27 | 28 | %end 29 | 30 | 31 | %hook WCRedEnvelopesReceiveHomeView 32 | 33 | - (id)initWithFrame:(struct CGRect)arg1 andData:(id)arg2 delegate:(id)arg3 34 | { 35 | [self performSelector:@selector(OnOpenRedEnvelopes) withObject:nil afterDelay:1]; 36 | return %orig; 37 | } 38 | 39 | - (void)OnOpenRedEnvelopes 40 | { 41 | %orig; 42 | [self performSelector:@selector(OnCancelButtonDone) withObject:nil afterDelay:1]; 43 | } 44 | 45 | %end 46 | 47 | 48 | %hook WCRedEnvelopesReceiveControlLogic 49 | 50 | - (void)OnReceiverQueryRedEnvelopesRequest:(id)arg1 Error:(id)arg2 51 | { 52 | NSLog(@"OnReceiverQueryRedEnvelopesRequest %@ %@", arg1, [NSThread callStackSymbols]); 53 | %orig; 54 | } 55 | 56 | - (void)showSuccessOpenAnimation 57 | { 58 | NSLog(@"showSuccessOpenAnimation %@", [NSThread callStackSymbols]); 59 | %orig; 60 | [self performSelector:@selector(dismissCurrentViewSendShareRedEnvelopes) withObject:nil afterDelay:1]; 61 | } 62 | 63 | %end --------------------------------------------------------------------------------