From 9b2ebb796ffaf12fbc2aefacc318add6d02fab38 Mon Sep 17 00:00:00 2001 From: edwinQQQ Date: Tue, 12 Aug 2025 14:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=AC=E5=85=B1=E6=88=BF?= =?UTF-8?q?=E9=97=B4=E7=AE=A1=E7=90=86=E5=99=A8=E7=9A=84=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=87=BA=EF=BC=8C=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9A=84=E5=8E=9F=E5=A7=8B=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9=EF=BC=9B=E4=BC=98=E5=8C=96=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20switch=20=E8=AF=AD=E5=8F=A5=E6=9B=BF=E4=BB=A3=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=20if-else=20=E8=AF=AD=E5=8F=A5=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7=EF=BC=9B=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=B8=8E=E5=AE=88=E6=8A=A4=E6=98=9F=E7=90=83=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E6=B6=88=E6=81=AF=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E4=BB=A3=E7=A0=81=E6=95=B4=E6=B4=81?= =?UTF-8?q?=E6=80=A7=EF=BC=9B=E6=9B=B4=E6=96=B0=E5=A4=9A=E4=B8=AA=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=8C=96=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E4=B8=8E=E5=AE=88=E6=8A=A4=E6=98=9F?= =?UTF-8?q?=E7=90=83=E7=9B=B8=E5=85=B3=E7=9A=84=E6=9D=A1=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E8=AF=AD=E8=A8=80=E6=94=AF=E6=8C=81=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 1 + .../YMRoom/Manager/PublicRoomManager.m | 2 +- .../View/AnimationView/RoomAnimationView.m | 49 ++++++++++++------- .../Tool/XPRoomMessageParser.m | 3 +- .../XPRoomMessageContainerView.m | 6 +-- .../YMRoom/View/XPRoomViewController.m | 3 +- YuMi/ar.lproj/Localizable.strings | 2 +- YuMi/en.lproj/Localizable.strings | 2 +- YuMi/pt-BR.lproj/Localizable.strings | 2 +- YuMi/tr.lproj/Localizable.strings | 2 +- YuMi/zh-Hant.lproj/Localizable.strings | 2 +- 11 files changed, 40 insertions(+), 34 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 07a1e0a3..e0910948 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,6 +23,7 @@ "Interitem", "kindof", "MAXFLOAT", + "Moli", "MSRTL", "NIMSDK", "Nonnull", diff --git a/YuMi/Modules/YMRoom/Manager/PublicRoomManager.m b/YuMi/Modules/YMRoom/Manager/PublicRoomManager.m index e10a8fed..39abf585 100644 --- a/YuMi/Modules/YMRoom/Manager/PublicRoomManager.m +++ b/YuMi/Modules/YMRoom/Manager/PublicRoomManager.m @@ -336,7 +336,7 @@ if (message.session.sessionType == NIMSessionTypeChatroom) { NSString *sessionId = message.session.sessionId; if ([sessionId isEqualToString:self.currentPublicRoomId]) { - NSLog(@"PublicRoomManager: 收到公共房间消息: %@", message.text); + NSLog(@"PublicRoomManager: 收到公共房间消息: %@", message.rawAttachContent); // 这里可以添加公共房间消息的处理逻辑 // TODO: 全服广播转移到此类 } diff --git a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m index bd181835..b9dccb1f 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m @@ -3056,25 +3056,36 @@ XPRoomGraffitiGiftAnimationViewDelegate } PIBaseAnimationViewModel *model = self.animationListB.firstObject; - if(model.type == GiftBannerType_Lucky){ - [self createBigPrizeAnimation:model]; - }else if (model.type == GiftBannerType_Love){ - [self createCandyTreeBannerAnimation:model]; - }else if(model.type == GiftBannerType_Nobleman){ - [self createNobleLevelUpBannerAnimation:model]; - }else if(model.type == GiftBannerType_kitchen){ - [self createStarKitchenBannerAnimation:model]; - }else if(model.type == GiftBannerType_AnchorHour){ - [self createAnchorHourRankAnimation:model]; - }else if(model.type == GiftBannerType_LicneseHour){ - [self createAnchorHourRankAnimation:model]; - }else if(model.type == GiftBannerType_Fairy){ - [self createTreasureFairyBannerAnimation:model]; - - }else if(model.type == GiftBannerType_Magic_House){ - [self createGiftCompoundBannerAnimation:model]; - }else if (model.type == GiftBannerType_General_Floating_Screen){ - [self createGeneralFloatingScreenAnimation:model bannerModel:nil]; + switch (model.type) { + case GiftBannerType_Lucky: + [self createBigPrizeAnimation:model]; + break; + case GiftBannerType_Love: + [self createCandyTreeBannerAnimation:model]; + break; + case GiftBannerType_Nobleman: + [self createNobleLevelUpBannerAnimation:model]; + break; + case GiftBannerType_AnchorHour: + [self createAnchorHourRankAnimation:model]; + break; + case GiftBannerType_LicneseHour: + [self createAnchorHourRankAnimation:model]; + break; + case GiftBannerType_Fairy: + [self createTreasureFairyBannerAnimation:model]; + 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; } } diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m index b246246c..ce5663e5 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m @@ -240,8 +240,7 @@ messageInfo.content = [self makeUserNameAttribute:message messageInfo:messageInfo]; messageInfo.rowHeight = 240; return messageInfo; - }else if(first == CustomMessageType_Guardian_Planet){ - return [self createGuardianPlanetAttribute:attachment messageInfo:messageInfo]; + }else if(first == CustomMessageType_General_Public_Screen){ return [self createGeneralPublicScreenAttribute:attachment messageInfo:messageInfo]; }else if(first == CustomMessageType_Super_Gift){ diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m b/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m index 8cdd8523..c80461a4 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m @@ -725,11 +725,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; @(Custom_Message_Sub_Treasure_Fairy_Convert_L2), @(Custom_Message_Sub_Treasure_Fairy_Convert_L3), 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): [NSSet setWithObjects: @(Custom_Message_Sub_General_Public_Screen_One_Room), diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index 3e2d7786..7619bc60 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -2400,8 +2400,7 @@ XPCandyTreeInsufficientBalanceViewDelegate> BOOL isHave = NO; if(attachment.first == CustomMessageType_Look_Love && attachment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend){ 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 && (attachment.second == Custom_Message_Sub_Super_Gift || attachment.second == Custom_Message_Sub_Super_Gift_Room_Message)){ isHave = YES; diff --git a/YuMi/ar.lproj/Localizable.strings b/YuMi/ar.lproj/Localizable.strings index 16ec7cec..ba26d68d 100644 --- a/YuMi/ar.lproj/Localizable.strings +++ b/YuMi/ar.lproj/Localizable.strings @@ -716,7 +716,7 @@ "XPLoginVerifBindPhoneViewController18" = "إذا كنت قد فقدت رقم هاتفك\nيرجى الاتصال بخدمة العملاء"; "XPRoomMessageParser1033333" = "تهانينا %@ لفوزه بمكافأة %@ مرات في المطبخ الفاخر، حصل على %@ من النقود!"; -"XPRoomMessageParser1033334" = "تهانينا %@ لهزيمته بنجاح لوحش في حراسة الكوكب، حصل على مكافأة %@ من النقود!"; + ///XPShareView.m "XPShareView0" = "تم النسخ بنجاح"; diff --git a/YuMi/en.lproj/Localizable.strings b/YuMi/en.lproj/Localizable.strings index 7c2d2a7c..75d9e315 100644 --- a/YuMi/en.lproj/Localizable.strings +++ b/YuMi/en.lproj/Localizable.strings @@ -446,7 +446,7 @@ "LoginPresenter1" = "Login failed, please try again"; "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"; "XPShareView1" = "Play O"; "XPShareView2" = "Please install the app"; diff --git a/YuMi/pt-BR.lproj/Localizable.strings b/YuMi/pt-BR.lproj/Localizable.strings index 233b4eaa..ccd09174 100644 --- a/YuMi/pt-BR.lproj/Localizable.strings +++ b/YuMi/pt-BR.lproj/Localizable.strings @@ -354,7 +354,7 @@ "LoginPresenter1" = "Login falhou, por favor tente novamente"; "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"; "XPShareView1" = "Jogar O"; "XPShareView2" = "Por favor instale o aplicativo"; diff --git a/YuMi/tr.lproj/Localizable.strings b/YuMi/tr.lproj/Localizable.strings index 92629b0d..97118b41 100644 --- a/YuMi/tr.lproj/Localizable.strings +++ b/YuMi/tr.lproj/Localizable.strings @@ -40,7 +40,7 @@ "LoginPresenter1" = "Giriş başarısız, lütfen tekrar deneyin"; "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 "XPShareView0" = "Bağlantı kopyalandı"; "XPShareView1" = "Oyna gel"; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index cb0cde2c..2ef23cde 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -50,7 +50,7 @@ "LoginPresenter1" = "登錄失敗,請重試"; "XPRoomMessageParser1033333"="恭喜%@在星級廚房抽中 %@倍獎勵,獲得 %@金幣!"; -"XPRoomMessageParser1033334"="恭喜 %@ 在守護星球中成功擊敗怪獸,獲得%@金幣獎勵"; + ///XPShareView.m "XPShareView0" = "拷貝成功"; "XPShareView1" = "來玩奧";