using asap.core; using cfg; using GameCore; using TMPro; public class EventReport : ReportBase { TMP_Text text_info; protected override void Awake() { base.Awake(); text_info = transform.Find("info/text_info").GetComponent(); } public void SetData(string playFabId, string content, ReportDataType reportDataType) { if (reportDataType == ReportDataType.Bomb) { text_info.text = LocalizationMgr.GetText("UI_HomePanel_101010"); } else if (reportDataType == ReportDataType.Heist) { text_info.text = LocalizationMgr.GetFormatTextValue("UI_HomePanel_101009", content); } else if (reportDataType == ReportDataType.Aquarium) { string[] str = content.Split('#'); string aquariumId = ""; if (str.Length > 3 && int.TryParse(str[3], out int itemID)) { Item fishItem = GContext.container.Resolve().TbItem.GetOrDefault(itemID); if (fishItem != null) { int q = fishItem.Quality; if (q > 6) { q = 6; } aquariumId = LocalizationMgr.GetText($"UI_FishingMapPanel_10101{q+1}"); } } if (str.Length > 4 && bool.TryParse(str[4], out bool result) && result) { text_info.text = LocalizationMgr.GetFormatTextValue("UI_EventReportPopupPanel_8", aquariumId); } else text_info.text = LocalizationMgr.GetFormatTextValue("UI_EventReportPopupPanel_7", aquariumId); } Init(playFabId); } }