更新公共房间管理器的日志输出,改为使用消息的原始附件内容;优化动画播放逻辑,使用 switch 语句替代多个 if-else 语句以提高可读性;移除与守护星球相关的消息处理逻辑,确保代码整洁性;更新多个本地化字符串文件,移除与守护星球相关的条目,确保语言支持的一致性。

This commit is contained in:
edwinQQQ
2025-08-12 14:51:13 +08:00
parent 6fd831ff42
commit 9b2ebb796f
11 changed files with 40 additions and 34 deletions

View File

@@ -23,6 +23,7 @@
"Interitem", "Interitem",
"kindof", "kindof",
"MAXFLOAT", "MAXFLOAT",
"Moli",
"MSRTL", "MSRTL",
"NIMSDK", "NIMSDK",
"Nonnull", "Nonnull",

View File

@@ -336,7 +336,7 @@
if (message.session.sessionType == NIMSessionTypeChatroom) { if (message.session.sessionType == NIMSessionTypeChatroom) {
NSString *sessionId = message.session.sessionId; NSString *sessionId = message.session.sessionId;
if ([sessionId isEqualToString:self.currentPublicRoomId]) { if ([sessionId isEqualToString:self.currentPublicRoomId]) {
NSLog(@"PublicRoomManager: 收到公共房间消息: %@", message.text); NSLog(@"PublicRoomManager: 收到公共房间消息: %@", message.rawAttachContent);
// //
// TODO: 广 // TODO: 广
} }

View File

@@ -3056,25 +3056,36 @@ XPRoomGraffitiGiftAnimationViewDelegate
} }
PIBaseAnimationViewModel *model = self.animationListB.firstObject; PIBaseAnimationViewModel *model = self.animationListB.firstObject;
if(model.type == GiftBannerType_Lucky){ switch (model.type) {
[self createBigPrizeAnimation:model]; case GiftBannerType_Lucky:
}else if (model.type == GiftBannerType_Love){ [self createBigPrizeAnimation:model];
[self createCandyTreeBannerAnimation:model]; break;
}else if(model.type == GiftBannerType_Nobleman){ case GiftBannerType_Love:
[self createNobleLevelUpBannerAnimation:model]; [self createCandyTreeBannerAnimation:model];
}else if(model.type == GiftBannerType_kitchen){ break;
[self createStarKitchenBannerAnimation:model]; case GiftBannerType_Nobleman:
}else if(model.type == GiftBannerType_AnchorHour){ [self createNobleLevelUpBannerAnimation:model];
[self createAnchorHourRankAnimation:model]; break;
}else if(model.type == GiftBannerType_LicneseHour){ case GiftBannerType_AnchorHour:
[self createAnchorHourRankAnimation:model]; [self createAnchorHourRankAnimation:model];
}else if(model.type == GiftBannerType_Fairy){ break;
[self createTreasureFairyBannerAnimation:model]; case GiftBannerType_LicneseHour:
[self createAnchorHourRankAnimation:model];
}else if(model.type == GiftBannerType_Magic_House){ break;
[self createGiftCompoundBannerAnimation:model]; case GiftBannerType_Fairy:
}else if (model.type == GiftBannerType_General_Floating_Screen){ [self createTreasureFairyBannerAnimation:model];
[self createGeneralFloatingScreenAnimation:model bannerModel:nil]; break;
case GiftBannerType_Magic_House:
[self createGiftCompoundBannerAnimation:model];
break;
case GiftBannerType_General_Floating_Screen:
[self createGeneralFloatingScreenAnimation:model bannerModel:nil];
break;
default:
//
// GiftBannerType_Unknown, GiftBannerType_Normal,
// GiftBannerType_Special, GiftBannerType_Event
break;
} }
} }

View File

@@ -240,8 +240,7 @@
messageInfo.content = [self makeUserNameAttribute:message messageInfo:messageInfo]; messageInfo.content = [self makeUserNameAttribute:message messageInfo:messageInfo];
messageInfo.rowHeight = 240; messageInfo.rowHeight = 240;
return messageInfo; return messageInfo;
}else if(first == CustomMessageType_Guardian_Planet){
return [self createGuardianPlanetAttribute:attachment messageInfo:messageInfo];
}else if(first == CustomMessageType_General_Public_Screen){ }else if(first == CustomMessageType_General_Public_Screen){
return [self createGeneralPublicScreenAttribute:attachment messageInfo:messageInfo]; return [self createGeneralPublicScreenAttribute:attachment messageInfo:messageInfo];
}else if(first == CustomMessageType_Super_Gift){ }else if(first == CustomMessageType_Super_Gift){

View File

@@ -725,11 +725,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
@(Custom_Message_Sub_Treasure_Fairy_Convert_L2), @(Custom_Message_Sub_Treasure_Fairy_Convert_L2),
@(Custom_Message_Sub_Treasure_Fairy_Convert_L3), @(Custom_Message_Sub_Treasure_Fairy_Convert_L3),
nil], nil],
@(CustomMessageType_Guardian_Planet):
[NSSet setWithObjects:
@(Custom_Message_Sub_Guardian_Planet_One_Room),
@(Custom_Message_Sub_Guardian_Planet_All_Room),
nil],
@(CustomMessageType_General_Public_Screen): @(CustomMessageType_General_Public_Screen):
[NSSet setWithObjects: [NSSet setWithObjects:
@(Custom_Message_Sub_General_Public_Screen_One_Room), @(Custom_Message_Sub_General_Public_Screen_One_Room),

View File

@@ -2400,8 +2400,7 @@ XPCandyTreeInsufficientBalanceViewDelegate>
BOOL isHave = NO; BOOL isHave = NO;
if(attachment.first == CustomMessageType_Look_Love && attachment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend){ if(attachment.first == CustomMessageType_Look_Love && attachment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend){
isHave = YES; isHave = YES;
}else if(attachment.first == CustomMessageType_Guardian_Planet && attachment.second == Custom_Message_Sub_Guardian_Planet_All_Room){
isHave = YES;
}else if(attachment.first == CustomMessageType_Super_Gift && }else if(attachment.first == CustomMessageType_Super_Gift &&
(attachment.second == Custom_Message_Sub_Super_Gift || attachment.second == Custom_Message_Sub_Super_Gift_Room_Message)){ (attachment.second == Custom_Message_Sub_Super_Gift || attachment.second == Custom_Message_Sub_Super_Gift_Room_Message)){
isHave = YES; isHave = YES;

View File

@@ -716,7 +716,7 @@
"XPLoginVerifBindPhoneViewController18" = "إذا كنت قد فقدت رقم هاتفك\nيرجى الاتصال بخدمة العملاء"; "XPLoginVerifBindPhoneViewController18" = "إذا كنت قد فقدت رقم هاتفك\nيرجى الاتصال بخدمة العملاء";
"XPRoomMessageParser1033333" = "تهانينا %@ لفوزه بمكافأة %@ مرات في المطبخ الفاخر، حصل على %@ من النقود!"; "XPRoomMessageParser1033333" = "تهانينا %@ لفوزه بمكافأة %@ مرات في المطبخ الفاخر، حصل على %@ من النقود!";
"XPRoomMessageParser1033334" = "تهانينا %@ لهزيمته بنجاح لوحش في حراسة الكوكب، حصل على مكافأة %@ من النقود!";
///XPShareView.m ///XPShareView.m
"XPShareView0" = "تم النسخ بنجاح"; "XPShareView0" = "تم النسخ بنجاح";

View File

@@ -446,7 +446,7 @@
"LoginPresenter1" = "Login failed, please try again"; "LoginPresenter1" = "Login failed, please try again";
"XPRoomMessageParser1033333" = "Congratulations %@ on drawing %@ times the reward in Star Kitchen and obtaining %@ Coins!"; "XPRoomMessageParser1033333" = "Congratulations %@ on drawing %@ times the reward in Star Kitchen and obtaining %@ Coins!";
"XPRoomMessageParser1033334" = "Congratulations %@ for successfully defeating monsters in Guardian Planet and obtaining %@ Coins rewards";
"XPShareView0" = "Copy success"; "XPShareView0" = "Copy success";
"XPShareView1" = "Play O"; "XPShareView1" = "Play O";
"XPShareView2" = "Please install the app"; "XPShareView2" = "Please install the app";

View File

@@ -354,7 +354,7 @@
"LoginPresenter1" = "Login falhou, por favor tente novamente"; "LoginPresenter1" = "Login falhou, por favor tente novamente";
"XPRoomMessageParser1033333" = "Parabéns %@ por desenhar %@ vezes a recompensa na Cozinha Estrela e obter %@ Moedas!"; "XPRoomMessageParser1033333" = "Parabéns %@ por desenhar %@ vezes a recompensa na Cozinha Estrela e obter %@ Moedas!";
"XPRoomMessageParser1033334" = "Parabéns %@ por derrotar com sucesso monstros no Planeta Guardião e obter %@ Moedas de recompensa";
"XPShareView0" = "Cópia bem-sucedida"; "XPShareView0" = "Cópia bem-sucedida";
"XPShareView1" = "Jogar O"; "XPShareView1" = "Jogar O";
"XPShareView2" = "Por favor instale o aplicativo"; "XPShareView2" = "Por favor instale o aplicativo";

View File

@@ -40,7 +40,7 @@
"LoginPresenter1" = "Giriş başarısız, lütfen tekrar deneyin"; "LoginPresenter1" = "Giriş başarısız, lütfen tekrar deneyin";
"XPRoomMessageParser1033333"="%@ tebrikler, Yıldızlı Mutfak'ta %@ kat ödül kazandı, %@ altın kazandı!"; "XPRoomMessageParser1033333"="%@ tebrikler, Yıldızlı Mutfak'ta %@ kat ödül kazandı, %@ altın kazandı!";
"XPRoomMessageParser1033334"="%@ tebrikler, Koruma Altındaki Gezegen'de canavarı başarıyla yendi, %@ altın ödül kazandı";
///XPShareView.m ///XPShareView.m
"XPShareView0" = "Bağlantı kopyalandı"; "XPShareView0" = "Bağlantı kopyalandı";
"XPShareView1" = "Oyna gel"; "XPShareView1" = "Oyna gel";

View File

@@ -50,7 +50,7 @@
"LoginPresenter1" = "登錄失敗,請重試"; "LoginPresenter1" = "登錄失敗,請重試";
"XPRoomMessageParser1033333"="恭喜%@在星級廚房抽中 %@倍獎勵,獲得 %@金幣!"; "XPRoomMessageParser1033333"="恭喜%@在星級廚房抽中 %@倍獎勵,獲得 %@金幣!";
"XPRoomMessageParser1033334"="恭喜 %@ 在守護星球中成功擊敗怪獸,獲得%@金幣獎勵";
///XPShareView.m ///XPShareView.m
"XPShareView0" = "拷貝成功"; "XPShareView0" = "拷貝成功";
"XPShareView1" = "來玩奧"; "XPShareView1" = "來玩奧";