static int GetConfig(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 2) { RankConfig obj = (RankConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RankConfig"); fogs.proto.msg.RankType arg0 = (fogs.proto.msg.RankType)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.RankType)); fogs.proto.config.RankConfig o = obj.GetConfig(arg0); LuaScriptMgr.PushObject(L, o); return(1); } else if (count == 3) { RankConfig obj = (RankConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RankConfig"); fogs.proto.msg.RankType arg0 = (fogs.proto.msg.RankType)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.RankType)); fogs.proto.msg.RankSubType arg1 = (fogs.proto.msg.RankSubType)LuaScriptMgr.GetNetObject(L, 3, typeof(fogs.proto.msg.RankSubType)); fogs.proto.config.RankConfig o = obj.GetConfig(arg0, arg1); LuaScriptMgr.PushObject(L, o); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: RankConfig.GetConfig"); } return(0); }
static int ReadConfig(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); RankConfig obj = (RankConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RankConfig"); obj.ReadConfig(); return(0); }
public static void LoadConfigs() { string file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configs/LoginData.data"); using (MemoryStream stream = new MemoryStream(File.ReadAllBytes(file))) { using (BinaryReader reader = new BinaryReader(stream)) { reader.ReadBytes(5); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { ConfiModel config = new ConfiModel() { ModelId = (short)reader.ReadInt32(), GoldPrice = reader.ReadInt32(), SilverPrice = reader.ReadInt32(), SkinColorId = reader.ReadByte(), EyeColorId = reader.ReadByte(), HairColorId = reader.ReadByte(), ShirtColorId = reader.ReadByte(), PantsColorId = reader.ReadByte(), BootsColorId = reader.ReadByte(), GlovesColorId = reader.ReadByte(), }; ListOfConfigs[config.ModelId] = config; } count = reader.ReadInt32(); for (int i = 0; i < count; i++) { ActivesConfig config = new ActivesConfig() { ActiveId = reader.ReadInt32(), Type = (ActiveType)reader.ReadByte(), Conditions = reader.ReadUInt32(), SilverReward = reader.ReadInt16(), GoldReward = reader.ReadInt16() }; ListOfActives[config.ActiveId] = config; } count = reader.ReadInt32(); for (int i = 0; i < count; i++) { RankConfig config = new RankConfig() { RankId = (LeagueType)reader.ReadByte(), RankName = reader.ReadString(), PromotePoints = reader.ReadInt32(), KillAward = reader.ReadInt32(), DieAward = reader.ReadInt32() }; IRankConfig[config.RankId] = config; } } } }
static int _CreateRankConfig(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 0) { RankConfig obj = new RankConfig(); LuaScriptMgr.PushObject(L, obj); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: RankConfig.New"); } return(0); }
private static void SetupConfig() { try { if (File.Exists(RankConfigPath)) { RankConfig = RankConfigFile.Read(RankConfigPath); // Add all the missing config properties in the json file } RankConfig.Write(RankConfigPath); } catch (Exception ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Error in config file"); Console.ForegroundColor = ConsoleColor.Gray; Log.Error("Config Exception"); Log.Error(ex.ToString()); } }
public void LoadConfig() { AnnouncementConfigData = new AnnouncementConfig(); BadgeAttrConfigData = new BadgeAttrConfig(); ConstStringConfigData = new ConstStringConfig(); CommonConfig = new CommonConfig(); AttrNameConfigData = new AttrNameConfig(); RoleBaseConfigData2 = new BaseDataConfig2(); AttrDataConfigData = new AttrDataConfig(); TeamLevelConfigData = new TeamLevelConfig(); RoleLevelConfigData = new RoleLevelConfig(); NPCConfigData = new NPCDataConfig(); SkillConfig = new SkillConfig(); GoodsConfigData = new GoodsConfig(); StoreGoodsConfigData = new StoreGoodsConfig(); BaseDataBuyConfigData = new BaseDataBuyConfig(); TaskConfigData = new TaskDataConfig(); AwardPackConfigData = new AwardPackDataConfig(); PractiseConfig = new PractiseConfig(); PracticePveConfig = new PracticePveConfig(); PractiseStepConfig = new PractiseStepConfig(); GameModeConfig = new GameModeConfig(); TrainingConfig = new TrainingConfig(); TattooConfig = new TattooConfig(); EquipmentConfigData = new EquipmentConfig(); TourConfig = new TourConfig(); GuideConfig = new GuideConfig(); FunctionConditionConfig = new FunctionConditionConfig(); RoleShapeConfig = new RoleShapeConfig(); FashionConfig = new FashionConfig(); FashionShopConfig = new FashionShopConfig(); VipPrivilegeConfig = new VipPrivilegeConfig(); pushConfig = new PushConfig(); presentHpConfigData = new PresentHpConfig(); LotteryConfig = new LotteryConfig(); starAttrConfig = new StarAttrConfig(); qualityAttrCorConfig = new QualityAttrCorConfig(); skillUpConfig = new SkillUpConfig(); RankConfig = new RankConfig(); signConfig = new SignConfig(); NewComerSignConfig = new NewComerSignConfig(); FightingCapacityConfig = new FightingCapacityConfig(); BodyInfoListConfig = new BodyInfoListConfig(); BadgeSlotsConfig = new BadgeSlotConfig(); GoodsComposeNewConfigData = new GoodsComposeNewConfig(); SceneConfig = new SceneConfig(); ReboundAttrConfigData = new ReboundAttrConfig(); CareerConfigData = new CareerConfig(); PotientialEffectConfig = new PotientialEffectConfig(); PVPPointConfig = new PVPPointConfig(); WinningStreakAwardConfig = new WinningStreakAwardConfig(); ArticleStrengthConfig = new ArticleStrengthConfig(); PhRegainConfig = new PhRegainConfig(); MatchAchievementConfig = new MatchAchievementConfig(); SpecialActionConfig = new SpecialActionConfig(); StealConfig = new StealConfig(); CurveRateConfig = new CurveRateConfig(); DunkRateConfig = new DunkRateConfig(); AIConfig = new AIConfig(); AttrReduceConfig = new AttrReduceConfig(); qualifyingConfig = new QualifyingConfig(); qualifyingNewConfig = new QualifyingNewConfig(); qualifyingNewerConfig = new QualifyingNewerConfig(); bullFightConfig = new BullFightConfig(); HedgingConfig = new HedgingConfig(); roleGiftConfig = new RoleGiftConfig(); DebugConfig = new DebugConfig(); shootGameConfig = new ShootGameConfig(); MapConfig = new MapConfig(); activityConfig = new ActivityConfig(); trialConfig = new TrialConfig(); gameMatchConfig = new GameMatchConfig(); shootSolutionManager = new ShootSolutionManager(); talentConfig = new TalentConfig(); ladderConfig = new LadderConfig(); matchSoundConfig = new MatchSoundConfig(); matchMsgConfig = new MatchMsgConfig(); MatchPointsConfig = new MatchPointsConfig(); AnimationSampleManager.Instance.LoadXml(); }