public static GameWebAPI.RespDataMA_MessageM.MessageM GetAlert(string errorCode) { GameWebAPI.RespDataMA_MessageM.MessageM result = null; GameWebAPI.RespDataMA_MessageM respDataMA_MessageM = MasterDataMng.Instance().RespDataMA_MessageM; if (respDataMA_MessageM != null) { if (!AlertMaster.GetAlertDownloadMaster(respDataMA_MessageM, errorCode, out result)) { bool alertResourceMaster = AlertMaster.GetAlertResourceMaster(errorCode, out result); } } else { bool alertResourceMaster = AlertMaster.GetAlertResourceMaster(errorCode, out result); } return(result); }
private static bool GetAlertDownloadMaster(GameWebAPI.RespDataMA_MessageM master, string errorCode, out GameWebAPI.RespDataMA_MessageM.MessageM alert) { bool flag = AlertMaster.alertCache.TryGetValue(errorCode, out alert); if (!flag && master.messageM != null) { for (int i = 0; i < master.messageM.Length; i++) { if (master.messageM[i].messageCode == errorCode) { alert = master.messageM[i]; AlertMaster.alertCache.Add(master.messageM[i].messageCode, master.messageM[i]); flag = true; break; } } } return(flag); }