feat: 完成礼物连击功能 | 更换金币资源图片

This commit is contained in:
eggmanQQQ
2024-09-10 15:27:47 +08:00
parent e45176485d
commit f668f43a42
93 changed files with 1059 additions and 288 deletions

View File

@@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *targetAvatar;
///目标的昵称
@property (nonatomic,copy) NSString *targetNick;
@property (nonatomic,strong) NSArray<NSString *> *targetUids;
@property (nonatomic,strong) NSArray<NSNumber *> *targetUids;
///礼物信息
@property (nonatomic,strong) GiftInfoModel *gift;
///礼物信息
@@ -130,6 +130,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) i18nGiftNameMap *i18nGiftNameMap;
@property (nonatomic, assign) NSInteger comboCount;
- (NSInteger)receiveUserCount;
@end
NS_ASSUME_NONNULL_END

View File

@@ -41,4 +41,43 @@
};
}
- (BOOL)isEqual:(id)other
{
if (other == self) {
return YES;
}
GiftReceiveInfoModel *otherInfo = (GiftReceiveInfoModel *)other;
if ([self.uid isEqualToString:otherInfo.uid]
// && [self.giftId isEqualToString:otherInfo.giftId]
// && [self isEqualUIDs:otherInfo]
) {
return YES;
}
return NO;
}
- (BOOL)isEqualUIDs:(GiftReceiveInfoModel *)other {
if ([self.targetUid isEqualToString:other.targetUid]) {
return YES;
}
if ([self.targetUids isEqualToArray:other.targetUids]) {
return YES;
}
return NO;
}
- (NSUInteger)hash
{
return self.uid.hash ^ self.giftId.hash;// ^ self.targetUid.hash ^ self.targetUids.hash;
}
- (NSInteger)receiveUserCount {
if (self.targetUids.count > 0) {
return self.targetUids.count;
}
return 1;
}
@end