移除与“精灵夺宝”相关的代码和逻辑,优化 UI 元素的约束设置,增强按钮的适应性和可读性,同时更新本地化字符串以确保准确性。
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "Api+Room.h"
|
||||
#import "Api+TreasureFairy.h"
|
||||
#import "Api+LittleGame.h"
|
||||
#import "ClientConfig.h"
|
||||
#import "NetImageView.h"
|
||||
@@ -25,7 +24,6 @@
|
||||
#import "BoomInfoModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
#import "FirstRechargeModel.h"
|
||||
#import "TreasureFairyLimitModel.h"
|
||||
#import "XPRedPacketResultModel.h"
|
||||
|
||||
///View
|
||||
@@ -36,7 +34,6 @@
|
||||
#import "XPArrangeMicViewController.h"
|
||||
#import "XPSailingViewController.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "XPTreasureFairyViewController.h"
|
||||
#import "PIRoomEnterRedPacketView.h"
|
||||
#import "BaseNavigationController.h"
|
||||
#import "PIRoomActivityWebView.h"
|
||||
@@ -484,18 +481,7 @@
|
||||
[self lookLoveTapRecognizer];
|
||||
} else if([info.code isEqualToString:@"NAUTICAL_ADVENTURE"]) {
|
||||
[self sailTapRecognizer];
|
||||
}else if([info.code isEqualToString:@"SEIZE_TREASURE"]){
|
||||
XPTreasureFairyViewController * fairyVC = [[XPTreasureFairyViewController alloc] initWithdelegate:self.hostDelegate];
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.view.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC addChildViewController:fairyVC];
|
||||
// [fairyVC.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.view addSubview:fairyVC.view];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
fairyVC.view.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
}completion:^(BOOL finished) {
|
||||
}];
|
||||
}else {
|
||||
} else {
|
||||
if (info.skipType == ActivitySkipType_Room) {
|
||||
[self.hostDelegate exitRoom];
|
||||
[XPRoomViewController openRoom:info.skipContent viewController:kWindow.rootViewController];
|
||||
@@ -533,25 +519,11 @@
|
||||
if(info == nil)return;
|
||||
if([info.code isEqualToString:@"FIRST_CHARGE"]) {
|
||||
[self firstRechargeTapRecognizer];
|
||||
}else if ([info.code isEqualToString:@"FIND_LOVE"]) {
|
||||
} else if ([info.code isEqualToString:@"FIND_LOVE"]) {
|
||||
[self lookLoveTapRecognizer];
|
||||
} else if([info.code isEqualToString:@"NAUTICAL_ADVENTURE"]) {
|
||||
[self sailTapRecognizer];
|
||||
}else if([info.code isEqualToString:@"SEIZE_TREASURE"]){
|
||||
XPTreasureFairyViewController * fairyVC = [[XPTreasureFairyViewController alloc] initWithdelegate:self.hostDelegate];
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.view.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC addChildViewController:fairyVC];
|
||||
[fairyVC.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.view addSubview:fairyVC.view];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
|
||||
fairyVC.view.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
|
||||
}completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
}else {
|
||||
} else {
|
||||
// if(index < self.playList.count){
|
||||
// if(info.showType == ActivityShowType_Half){
|
||||
// XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
@@ -725,20 +697,6 @@
|
||||
[self lookLoveTapRecognizer];
|
||||
} else if([model.code isEqualToString:@"NAUTICAL_ADVENTURE"]) {
|
||||
[self sailTapRecognizer];
|
||||
}else if([model.code isEqualToString:@"SEIZE_TREASURE"]){
|
||||
XPTreasureFairyViewController * fairyVC = [[XPTreasureFairyViewController alloc] initWithdelegate:self.hostDelegate];
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.view.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC addChildViewController:fairyVC];
|
||||
[fairyVC.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.view addSubview:fairyVC.view];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
|
||||
fairyVC.view.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
|
||||
}completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
} else if(model.skipType == ActivitySkipType_Web) {
|
||||
if(model.showType == ActivityShowType_Half){
|
||||
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
|
@@ -68,7 +68,6 @@
|
||||
#import "XPRoomGiftCompoundView.h"
|
||||
#import "XPRoomGiftBroadcastView.h"
|
||||
#import "XPRoomLuckyBigPrizeView.h"
|
||||
#import "XPTreasureFairyGiftView.h"
|
||||
#import "XPAcrossRoomPKPrizeView.h"
|
||||
#import "PIRoomGiftBroadcastWindow.h"
|
||||
#import "XPRoomDatingAnimationView.h"
|
||||
@@ -1937,9 +1936,6 @@ BannerSchedulerDelegate
|
||||
case CustomMessageType_Graffiti_Star_Kitchen:
|
||||
[self handle104:attachment];
|
||||
break;
|
||||
case CustomMessageType_Treasure_Fairy:
|
||||
[self handleFairy:attachment];
|
||||
break;
|
||||
case CustomMessageType_Tarot:
|
||||
[self handleTarot:attachment];
|
||||
break;
|
||||
@@ -2230,24 +2226,6 @@ BannerSchedulerDelegate
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleFairy:(AttachmentModel *)attachment {
|
||||
if (!attachment) {
|
||||
return;
|
||||
}
|
||||
switch (attachment.second) {
|
||||
case Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4:
|
||||
case Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5:
|
||||
case Custom_Message_Sub_Treasure_Fairy_Convert_L1:
|
||||
case Custom_Message_Sub_Treasure_Fairy_Convert_L2:
|
||||
case Custom_Message_Sub_Treasure_Fairy_Convert_L3:
|
||||
[self receiveTreasureFairyGiftHighLevel:attachment];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handle98:(AttachmentModel *)attachment {
|
||||
if (!attachment) {
|
||||
return;
|
||||
@@ -2458,9 +2436,6 @@ BannerSchedulerDelegate
|
||||
case CustomMessageType_Look_Love:
|
||||
[self handle98:attachment];
|
||||
break;
|
||||
case CustomMessageType_Treasure_Fairy:
|
||||
[self handleFairy:attachment];
|
||||
break;
|
||||
case CustomMessageType_Tarot:
|
||||
[self handleTarot:attachment];
|
||||
break;
|
||||
@@ -3210,73 +3185,6 @@ BannerSchedulerDelegate
|
||||
}
|
||||
}
|
||||
|
||||
- (void)receiveTreasureFairyGiftHighLevel:(AttachmentModel *)attatchment {
|
||||
if ([self _isInSudGame]) {return;}
|
||||
PIBaseAnimationViewModel *giftModel = [PIBaseAnimationViewModel new];
|
||||
giftModel.data = attatchment.data;
|
||||
giftModel.second = attatchment.second;
|
||||
giftModel.first = attatchment.first;
|
||||
giftModel.type = GiftBannerType_Fairy;
|
||||
if (self.animationListB.count == 0 && self.isPlayOfB == NO) {
|
||||
[self createTreasureFairyBannerAnimation:giftModel];
|
||||
}
|
||||
[self.animationListB addObject:giftModel];
|
||||
}
|
||||
|
||||
- (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment {
|
||||
self.isPlayOfB = YES;
|
||||
CGFloat kscale = (CGFloat)60 / (CGFloat)375;
|
||||
CGFloat top = (kNavigationHeight + 15);
|
||||
XPTreasureFairyGiftView *treasureView = [[XPTreasureFairyGiftView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth , KScreenWidth * kscale)];
|
||||
//最大礼物
|
||||
if ((attatchment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5) || (attatchment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3)) {
|
||||
treasureView.isMaxLargeGift = YES;
|
||||
}else{
|
||||
treasureView.isMaxLargeGift = NO;
|
||||
}
|
||||
if ((attatchment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4) || (attatchment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5)) {
|
||||
treasureView.isDrawGift = YES; //抽奖
|
||||
}else{
|
||||
treasureView.isDrawGift = NO; //召唤
|
||||
}
|
||||
treasureView.treasureInfo = attatchment.data;
|
||||
[self.middleContainer addSubview:treasureView];
|
||||
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
springAnimation.springSpeed = 12;
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:treasureView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(treasureView.frame.size.width / 2, treasureView.center.y)];
|
||||
[springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
if (finished) {
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, treasureView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, treasureView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() + 3;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
[treasureView removeFromSuperview];
|
||||
self.isPlayOfB = NO;
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB xpSafeRemoveObjectAtIndex:0];
|
||||
}
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
}];
|
||||
[treasureView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
}
|
||||
}];
|
||||
[treasureView pop_addAnimation:springAnimation forKey:@"candyTreespingOutAnimation"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)createGiftCompoundBannerAnimation:(PIBaseAnimationViewModel *)attachment {
|
||||
self.isPlayOfB = YES;
|
||||
XPRoomGiftCompoundView *compoundGiftView = [[XPRoomGiftCompoundView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight + 15, KScreenWidth, 45)];
|
||||
@@ -3700,9 +3608,6 @@ BannerSchedulerDelegate
|
||||
case GiftBannerType_LicneseHour:
|
||||
[self createAnchorHourRankAnimation:model];
|
||||
break;
|
||||
case GiftBannerType_Fairy:
|
||||
[self createTreasureFairyBannerAnimation:model];
|
||||
break;
|
||||
case GiftBannerType_Magic_House:
|
||||
[self createGiftCompoundBannerAnimation:model];
|
||||
break;
|
||||
|
@@ -7,7 +7,6 @@
|
||||
#import "Api+Room.h"
|
||||
#import "MSRoomMenuGameVC.h"
|
||||
#import "MSRoomMenuGameView.h"
|
||||
#import "XPTreasureFairyViewController.h"
|
||||
#import "XPRoomHalfWebView.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPCandyTreeViewController.h"
|
||||
@@ -344,21 +343,6 @@
|
||||
[self clickGameVC:model];
|
||||
} else if ([model.code isEqualToString:@"LEADERCC"]) {
|
||||
[self clickGameVC:model];
|
||||
} else if([model.code isEqualToString:@"SEIZE_TREASURE"]){
|
||||
if ([self.hostDelegate isKindOfClass:[XPRoomViewController class]]){
|
||||
XPRoomViewController *vc = (XPRoomViewController *)self.hostDelegate;
|
||||
XPTreasureFairyViewController * fairyVC = [[XPTreasureFairyViewController alloc] initWithdelegate:self.hostDelegate];
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.view.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
[vc addChildViewController:fairyVC];
|
||||
[fairyVC.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[vc.view addSubview:fairyVC.view];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
fairyVC.view.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
}completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
}
|
||||
} else if(model.skipType == ActivitySkipType_Web) {
|
||||
if(model.showType == ActivityShowType_Half){
|
||||
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#import "XPOpenRedPacketModel.h"
|
||||
#import "XPMessageInfoModel.h"
|
||||
|
||||
#import "TreasureFailryMessageModel.h"
|
||||
#import "NetImageView.h"
|
||||
|
||||
#import "XPRoomTopicAlertView.h"
|
||||
@@ -49,7 +48,6 @@
|
||||
#import "XPRoomPKResultView.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "XPTreasureFairyViewController.h"
|
||||
#import "PIGeneralPublicScreenModel.h"
|
||||
#import "QEmotionHelper.h"
|
||||
|
||||
@@ -213,9 +211,7 @@
|
||||
} else if (attachment.second == Custom_Message_Sub_LuckyPackage){
|
||||
return [self createNewRedPacketAttribute:attachment messageInfo:messageInfo];
|
||||
}
|
||||
} else if (first == CustomMessageType_Treasure_Fairy) {
|
||||
return [self createTreasureFairyAttribute:attachment messageInfo:messageInfo];
|
||||
}else if (first == CustomMessageType_Room_Album) {
|
||||
} else if (first == CustomMessageType_Room_Album) {
|
||||
NSDictionary *userInfo = attachment.data[@"user"];
|
||||
NSDictionary *userLevel = attachment.data[@"userLevel"];
|
||||
if(userLevel != nil){
|
||||
@@ -614,83 +610,6 @@
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
#pragma mark - 夺宝精灵
|
||||
- (XPMessageInfoModel *)createTreasureFairyAttribute:(AttachmentModel *)attachment messageInfo:(XPMessageInfoModel *)messageInfo{
|
||||
TreasureFailryMessageModel *info = [TreasureFailryMessageModel modelWithDictionary:attachment.data];
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
if (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L1 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L2 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L3) {///初级礼物
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser115") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSMutableAttributedString * nickAttriibute = [self createTextAttribute:info.nick color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
[self attributeAddHihtLight:nickAttriibute uid:info.uid.integerValue];
|
||||
[attribute appendAttributedString:nickAttriibute];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser116") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.rewardName color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
if (info.rewardNum > 1) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"X%ld", info.rewardNum] color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
} else if (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5) {///高级礼物
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser117") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSMutableAttributedString * nickAttriibute = [self createTextAttribute:info.nick color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
[self attributeAddHihtLight:nickAttriibute uid:info.uid.integerValue];
|
||||
[attribute appendAttributedString:nickAttriibute];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser116") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.rewardName color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
if (info.rewardNum > 1) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"X%ld", info.rewardNum] color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
} else if (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L1) {///初级球
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser115") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSMutableAttributedString * nickAttriibute = [self createTextAttribute:info.nick color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
[self attributeAddHihtLight:nickAttriibute uid:info.uid.integerValue];
|
||||
[attribute appendAttributedString:nickAttriibute];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser116") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.rewardName color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L2 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L3) {///高级球
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser117") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSMutableAttributedString * nickAttriibute = [self createTextAttribute:info.nick color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
[self attributeAddHihtLight:nickAttriibute uid:info.uid.integerValue];
|
||||
[attribute appendAttributedString:nickAttriibute];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser116") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.rewardName color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L1 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L2 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3) {///合成礼物
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser115") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSMutableAttributedString * nickAttriibute = [self createTextAttribute:info.nick color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
[self attributeAddHihtLight:nickAttriibute uid:info.uid.integerValue];
|
||||
[attribute appendAttributedString:nickAttriibute];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser116") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
if(attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser119") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else if (attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L2) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser120") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
} else {
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser121") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser122") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%ld", info.rewardShowValue] color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
if ([info.rewardType isEqualToString:@"gift"]){
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser123") color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
} else {
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.rewardUnit color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.rewardName color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
if (self.hostDelegate.getUserInfo.userLevelVo.experLevelSeq >= info.userLevelLimit) {
|
||||
NSMutableAttributedString * nickAttriibute = [self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser124") color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
@kWeakify(self);
|
||||
[nickAttriibute yy_setTextHighlightRange:NSMakeRange(0, nickAttriibute.length) color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
|
||||
XPTreasureFairyViewController * fairyVC = [[XPTreasureFairyViewController alloc] initWithdelegate:self.hostDelegate];
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:fairyVC animated:YES completion:nil];
|
||||
}];
|
||||
[attribute appendAttributedString:nickAttriibute];
|
||||
}
|
||||
messageInfo.content = attribute;
|
||||
messageInfo.first = attachment.first;
|
||||
return messageInfo;
|
||||
}
|
||||
|
||||
- (XPMessageInfoModel *)createGeneralPublicScreenAttribute:(AttachmentModel *)attachment messageInfo:(XPMessageInfoModel *)messageInfo{
|
||||
|
||||
|
@@ -154,7 +154,6 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
case CustomMessageType_Candy_Tree:
|
||||
case CustomMessageType_Super_Gift:
|
||||
case CustomMessageType_AllMicroSend:
|
||||
case CustomMessageType_Treasure_Fairy:
|
||||
[self.datasource_gift addObject:model];
|
||||
break;
|
||||
default:
|
||||
@@ -350,7 +349,6 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
case CustomMessageType_Candy_Tree:
|
||||
case CustomMessageType_Super_Gift:
|
||||
case CustomMessageType_AllMicroSend:
|
||||
case CustomMessageType_Treasure_Fairy:
|
||||
[self.datasource_gift removeObject:removedModel];
|
||||
break;
|
||||
default:
|
||||
@@ -912,21 +910,6 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
@(Custom_Message_Sub_OpenRedPacketSuccess),
|
||||
@(Custom_Message_Sub_LuckyPackage),
|
||||
nil],
|
||||
@(CustomMessageType_Treasure_Fairy):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L1),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L2),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L3),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L1),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L2),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L3),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Convert_L1),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Convert_L2),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Convert_L3),
|
||||
nil],
|
||||
|
||||
@(CustomMessageType_General_Public_Screen):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_General_Public_Screen_One_Room),
|
||||
|
@@ -13,7 +13,6 @@
|
||||
|
||||
#import "Api+Room.h"
|
||||
#import "Api+LittleGame.h"
|
||||
#import "Api+TreasureFairy.h"
|
||||
|
||||
#import "AttachmentModel.h"
|
||||
#import "RoomBoomManager.h"
|
||||
@@ -33,7 +32,6 @@
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "XPCandyTreeViewController.h"
|
||||
#import "XPArrangeMicViewController.h"
|
||||
#import "XPTreasureFairyViewController.h"
|
||||
|
||||
#import "RoomLuckyPackageInfoModel.h"
|
||||
#import "LuckyPackageLogicManager.h"
|
||||
@@ -832,16 +830,6 @@ static CGFloat const kNormalHeight = 160.0f;
|
||||
[self lookLoveTapRecognizer];
|
||||
} else if ([info.code isEqualToString:@"NAUTICAL_ADVENTURE"]) {
|
||||
[self sailTapRecognizer];
|
||||
} else if ([info.code isEqualToString:@"SEIZE_TREASURE"]) {
|
||||
XPTreasureFairyViewController * fairyVC = [[XPTreasureFairyViewController alloc] initWithdelegate:self.hostDelegate];
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.view.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC addChildViewController:fairyVC];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.view addSubview:fairyVC.view];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
fairyVC.view.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
}completion:^(BOOL finished) {
|
||||
}];
|
||||
} else {
|
||||
if (info.skipType == ActivitySkipType_Room) {
|
||||
[self.hostDelegate exitRoom];
|
||||
|
@@ -364,20 +364,6 @@ UIKIT_EXTERN NSString *kRoomKickoutTime;
|
||||
@(Custom_Message_Sub_Sailing_AllRoom_Notify),
|
||||
@(Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend),
|
||||
nil],
|
||||
@(CustomMessageType_Treasure_Fairy):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L1),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L2),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L3),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L1),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L2),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Draw_Ball_L3),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Convert_L1),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Convert_L2),
|
||||
@(Custom_Message_Sub_Treasure_Fairy_Convert_L3),
|
||||
nil]
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -2919,8 +2919,6 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
isHave = YES;
|
||||
}else if(attachment.first == CustomMessageType_General_Public_Screen && attachment.second == Custom_Message_Sub_General_Public_Screen_All_Room){
|
||||
isHave = YES;
|
||||
}else if (attachment.first == CustomMessageType_Treasure_Fairy && (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L1 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L2 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3)) { //夺宝精灵
|
||||
isHave = YES;
|
||||
}else if (attachment.first == CustomMessageType_Tarot && (attachment.second == Custom_Message_Sub_Tarot_Advanced || attachment.second == Custom_Message_Sub_Tarot_Intermediate)){
|
||||
isHave = YES;
|
||||
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
|
||||
|
Reference in New Issue
Block a user