航海完成了
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#import "CandyTreeResultModel.h"
|
||||
#import "XPGiftBigPrizeModel.h"
|
||||
#import "XPGiftCompoundModel.h"
|
||||
#import "RoomSailingPrizeModel.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
|
||||
@@ -111,7 +112,9 @@
|
||||
return [self createRoomLuckyBigPrizeAttribute:attachment];
|
||||
} else if(first == CustomMessageType_Gift_Compound) {///礼物合成
|
||||
return [self createRoomGiftCompoundAttribute:attachment];
|
||||
}
|
||||
} else if(first == CustomMessageType_Room_Sailing) {///航海
|
||||
return [self createRoomSailingAttribute:attachment];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -267,6 +270,21 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark - 航海
|
||||
- (NSAttributedString *)createRoomSailingAttribute:(AttachmentModel *)attachment {
|
||||
RoomSailingPrizeModel *info = [RoomSailingPrizeModel 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:@"在航海冒险中获得" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.prizeName color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
if (info.prizeNum>1) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"x%d", info.prizeNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
[self attributeAddHihtLight:attribute uid:info.uid.integerValue];
|
||||
return attribute;
|
||||
}
|
||||
|
||||
#pragma mark - 礼物合成
|
||||
- (NSAttributedString *)createRoomGiftCompoundAttribute:(AttachmentModel *)attachment {
|
||||
XPGiftCompoundModel *info = [XPGiftCompoundModel modelWithDictionary:attachment.data];
|
||||
|
Reference in New Issue
Block a user