修复bug

This commit is contained in:
liyuhua
2023-08-16 14:21:58 +08:00
parent a882a1a17f
commit e63c569a87
76 changed files with 483 additions and 640 deletions

View File

@@ -286,7 +286,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
///
-(void)requestGiftList{
[self dealWithDefaultSvga];
// /
///
NSString *time = [NSDate getNowTimeTimestamp];
NSString *curTime = [NSDate timestampSwitchTime:[time integerValue] andFormatter:@"yyyy-MM-dd"];
NSDictionary *timeDic = [[NSUserDefaults standardUserDefaults]valueForKey:@"kRequestGiftList"];
@@ -323,10 +323,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}
-(void)dealWithDefaultSvga{
///
NSArray *loveList = @[@"https://image.hfighting.com/candyTree_light.svga",@"https://image.hfighting.com/candyTree_open.svga",@"https://image.hfighting.com/candyTree_transform.svga"];
for (NSString *url in loveList) {
[self dealWithGiftListWithUrl:url fileName:url isSvga:YES];
}
///
NSArray *elfList = @[@"https://image.hfighting.com/treasure_fairy_trials_middle.mp4",@"https://image.hfighting.com/treasure_fairy_ten.mp4",@"https://image.hfighting.com/treasure_fairy_trials_high.mp4",@"https://image.hfighting.com/treasure_fairy_one.mp4"];
for (NSString *url in elfList) {
[self dealWithGiftListWithUrl:url fileName:url isSvga:NO];
@@ -510,7 +512,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
#pragma mark - NIMChatManagerDelegate
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
if (self.parentMode || ![ClientConfig shareConfig].canOpen) {
if (self.parentMode || ![ClientConfig shareConfig].canOpen || [AccountInfoStorage instance].getTicket.length == 0) {
return;
}
for (NIMMessage * message in messages) {
@@ -518,7 +520,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
if(message.messageType == NIMMessageTypeCustom) {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel * attachment = obj.attachment;
AttachmentModel * attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_FindNew && attachment.second == Custom_Message_Find_New_Greet_New_User) {
FindNewGreetMessageModel * greetInfo = [FindNewGreetMessageModel modelWithDictionary:attachment.data];
if (greetInfo.uid.integerValue != [AccountInfoStorage instance].getUid.integerValue) {
@@ -595,6 +597,9 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}else if(attachment.first == CustomMessageType_Look_Love && attachment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveCandyTreeGiftHighLevle:attachment];
}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)) { //
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveTreasureFairyGiftHighLevel:attachment];
}
}
}