| | |
| | | |
| | | public class GeneralDefine |
| | | { |
| | | |
| | | static readonly List<int> DEFAULT_PAY_METHOD_MONEY_TYPES = new List<int> { 97, 99 }; |
| | | static Dictionary<string, int[]> payMethodMoneyTypeByChannel; |
| | | |
| | | public static Dictionary<int, int> MoneyDisplayModel { get; private set; } |
| | | public static int activityItemID { get; private set; } |
| | | |
| | | |
| | | public static int expDisplayId { get; private set; } |
| | | |
| | | |
| | | |
| | | //参数int,int ,string 分别表示职业,转生等级,icon |
| | | static Dictionary<int, Dictionary<int, string>> jobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); |
| | | static Dictionary<int, Dictionary<int, string>> otherjobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); |
| | | |
| | | |
| | | |
| | | public static int rechargeRedpointLv { get; private set; } |
| | | public static int rechargeRedpointMinLv { get; private set; } |
| | | |
| | | |
| | | |
| | | public static List<int> inGameDownLoadLevelCheckPoints = new List<int>(); |
| | | public static int inGameDownLoadHighLevel { get; private set; } |
| | | |
| | | |
| | | public static Dictionary<int, List<int>> itemPutInPackDict { get; private set; } |
| | | public static Dictionary<int, int> itemMoneyCountDict { get; private set; } //背包中用于展示货币数量的物品 |
| | | |
| | | |
| | | public static int UISpringDecorate { get; private set; } |
| | | public static Dictionary<int, List<int>> skillAttrIDDict { get; private set; } |
| | | |
| | | |
| | | |
| | | |
| | | public static int acutionItemHour { get; private set; } |
| | | |
| | | public static float blockRatio; |
| | |
| | | public static int[] heroSkinGiftList; |
| | | public static void Init() |
| | | { |
| | | payMethodMoneyTypeByChannel = null; |
| | | try |
| | | { |
| | | MoneyDisplayModel = ConfigParse.ParseIntDict(GetInputString("MoneyDisplayModel", 1)); |
| | |
| | | |
| | | config = FuncConfigConfig.Get("HeroSkinGift"); |
| | | heroSkinGiftList = JsonMapper.ToObject<int[]>(config.Numerical1); |
| | | |
| | | payMethodMoneyTypeByChannel = JsonMapper.ToObject<Dictionary<string, int[]>>(FuncConfigConfig.Get("DJQShow").Numerical1); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | return playerID < 1000000; |
| | | } |
| | | |
| | | public static List<int> GetPayMethodAvailableMoneyTypes() |
| | | { |
| | | if (payMethodMoneyTypeByChannel == null) |
| | | return new List<int>(DEFAULT_PAY_METHOD_MONEY_TYPES); |
| | | |
| | | var versionConfig = VersionConfig.Get(); |
| | | string channel = versionConfig != null ? versionConfig.appId : string.Empty; |
| | | if (string.IsNullOrEmpty(channel) || payMethodMoneyTypeByChannel == null || |
| | | !payMethodMoneyTypeByChannel.TryGetValue(channel, out var moneyTypes) || moneyTypes == null || moneyTypes.Length == 0) |
| | | { |
| | | return new List<int>(DEFAULT_PAY_METHOD_MONEY_TYPES); |
| | | } |
| | | |
| | | var result = new List<int>(); |
| | | for (int i = 0; i < moneyTypes.Length; i++) |
| | | { |
| | | if (!result.Contains(moneyTypes[i])) |
| | | { |
| | | result.Add(moneyTypes[i]); |
| | | } |
| | | } |
| | | |
| | | return result.Count > 0 ? result : new List<int>(DEFAULT_PAY_METHOD_MONEY_TYPES); |
| | | } |
| | | |
| | | |
| | | } |