fix:1、添加_A表的读取方式
This commit is contained in:
@@ -59,8 +59,8 @@ namespace RedHotRoast {
|
||||
|
||||
TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoadFinish); //加载完成打点
|
||||
|
||||
TextureHelper.imgUrl = CdnURL + "/" + ConfigSystem.GetCommonConf().ResVersion + "/";
|
||||
LiveVideoManager.videoBaseUrl = CdnURL + "/" + ConfigSystem.GetCommonConf().ResVersion + "/";
|
||||
TextureHelper.imgUrl = CdnURL + "/" + (IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1) + "/";
|
||||
LiveVideoManager.videoBaseUrl = CdnURL + "/" + (IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1) + "/";
|
||||
|
||||
// ParseGameConfig();
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
|
||||
@@ -116,6 +116,66 @@ namespace RedHotRoast {
|
||||
return ConfigLoader.Instance.GetConfig<List<T>>() ?? new List<T>();
|
||||
}
|
||||
|
||||
private static bool IsOrganic()
|
||||
{
|
||||
bool b = false;
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && SuperApplication.Instance.attribution == "organic")
|
||||
{
|
||||
b = GetCommonConf().IsOrganic == 1;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
private static List<T> GetConfigWithOrganicFallback<T, TOrganic>() where T : class
|
||||
{
|
||||
if (IsOrganic())
|
||||
{
|
||||
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
|
||||
if (organicConfig != null)
|
||||
{
|
||||
var json = Newtonsoft.Json.JsonConvert.SerializeObject(organicConfig);
|
||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<T>>(json);
|
||||
}
|
||||
}
|
||||
|
||||
return GetConfig<T>();
|
||||
}
|
||||
|
||||
public static List<Live> GetLiveConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<Live, Live_A>();
|
||||
}
|
||||
|
||||
public static List<SecretAlbums> GetSecretAlbumsConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<SecretAlbums, SecretAlbums_A>();
|
||||
}
|
||||
public static List<FreeImageLibrary> GetFreeImageConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<FreeImageLibrary, FreeImageLibrary_A>();
|
||||
}
|
||||
public static List<ADImageLibrary> GetADImageConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<ADImageLibrary, ADImageLibrary_A>();
|
||||
}
|
||||
|
||||
public static List<SpecialImageLibrary> GetSpecialImageConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<SpecialImageLibrary, SpecialImageLibrary_A>();
|
||||
}
|
||||
|
||||
public static List<VIPImageLibrary> GetVIPImageConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<VIPImageLibrary, VIPImageLibrary_A>();
|
||||
}
|
||||
|
||||
public static List<LevelUnlock> GetLevelUnlockConfig()
|
||||
{
|
||||
return GetConfigWithOrganicFallback<LevelUnlock, LevelUnlock_A>();
|
||||
}
|
||||
|
||||
|
||||
public override void Dispose() {
|
||||
base.Dispose();
|
||||
RemoveListener();
|
||||
|
||||
Reference in New Issue
Block a user