魔法屋礼物合成房间飘屏

This commit is contained in:
chenguilong
2022-08-05 15:38:21 +08:00
parent 4bfda07e5a
commit 96e663f014
11 changed files with 271 additions and 8 deletions

View File

@@ -34,6 +34,7 @@
#import "RoomPKInfoModel.h"
#import "CandyTreeResultModel.h"
#import "XPGiftBigPrizeModel.h"
#import "XPGiftCompoundModel.h"
#import "NetImageView.h"
@@ -108,7 +109,9 @@
return [self createRoomPKAttribute:attachment];
} else if (first == CustomMessageType_LuckyBag) {///
return [self createRoomLuckyBigPrizeAttribute:attachment];
}
} else if(first == CustomMessageType_Gift_Compound) {///
return [self createRoomGiftCompoundAttribute:attachment];
}
return nil;
}
@@ -264,6 +267,18 @@
return nil;
}
#pragma mark -
- (NSAttributedString *)createRoomGiftCompoundAttribute:(AttachmentModel *)attachment {
XPGiftCompoundModel *info = [XPGiftCompoundModel modelWithDictionary:attachment.data];
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
[attribute appendAttributedString:[self createTextAttribute:@"恭喜" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:info.nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:info.msg color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:info.giftName color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
[self attributeAddHihtLight:attribute uid:info.uid.integerValue];
return attribute;
}
#pragma mark -
- (NSAttributedString *)createRoomLuckyBigPrizeAttribute:(AttachmentModel *)attachment {
XPGiftBigPrizeModel * info= [XPGiftBigPrizeModel modelWithDictionary:attachment.data];