塔罗公屏消息
This commit is contained in:
@@ -86,7 +86,9 @@
|
||||
return [self createNobleLevelAttribute:attachment];
|
||||
} else if (first == CustomMessageType_Face) {//贵族
|
||||
return [self createRoomFaceAttribute:attachment];
|
||||
}
|
||||
} else if (first == CustomMessageType_Tarot) {//塔罗
|
||||
return [self createTarotAttribute:attachment];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -385,6 +387,22 @@
|
||||
return attribute;
|
||||
}
|
||||
|
||||
#pragma mark - 塔罗
|
||||
- (NSAttributedString *)createTarotAttribute:(AttachmentModel *)attachment {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
if (attachment.second == Custom_Message_Sub_Tarot) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"恭喜" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:attachment.data[@"nick"] color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
NSString *text = [NSString stringWithFormat:@" %@", attachment.data[@"drawMsgText"]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:text color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
if ([attachment.data[@"drawGoldNum"] intValue] > 1) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d",[attachment.data[@"drawGoldNum"] intValue]] color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%@ ", attachment.data[@"chargeProdName"]] color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
return attribute;
|
||||
}
|
||||
|
||||
#pragma mark - 踢出房间/拉黑/下麦
|
||||
- (NSAttributedString *)createKickUserAttribute:(AttachmentModel *)attachment info:(XPKickUserModel *)info {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
|
Reference in New Issue
Block a user