static int ReadTaskLinkData(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); TaskDataConfig obj = (TaskDataConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "TaskDataConfig"); obj.ReadTaskLinkData(); return(0); }
static int Initialize(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); TaskDataConfig obj = (TaskDataConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "TaskDataConfig"); obj.Initialize(); return(0); }
static int GetTaskLinkSubID(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); TaskDataConfig obj = (TaskDataConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "TaskDataConfig"); uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 2); uint o = obj.GetTaskLinkSubID(arg0); LuaScriptMgr.Push(L, o); return(1); }
static int GetTaskLevelInfoByID(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); TaskDataConfig obj = (TaskDataConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "TaskDataConfig"); uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 2); fogs.proto.config.TaskConfig o = obj.GetTaskLevelInfoByID(arg0); LuaScriptMgr.PushObject(L, o); return(1); }
static int _CreateTaskDataConfig(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 0) { TaskDataConfig obj = new TaskDataConfig(); LuaScriptMgr.PushObject(L, obj); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: TaskDataConfig.New"); } return(0); }
public void Load(string path) { if (_isLoad) { return; } _isLoad = true; _dataTask = new Dictionary <int, DataTask>(); TaskDataConfig taskData = LoadJson.LoadJsonTaskFromFile(path); foreach (TaskDataBase taskDataBase in taskData.taskDataBaseGroup) { DataTask data = new DataTask(); data.Load(taskDataBase); _dataTask.Add(data.id, data); } }
public string GetDataByTask(TaskDataConfig config) { string taskData = ""; if (null != user && null != allDataUrl) { string URL = ""; switch (config.dataType) { case 0: URL = allDataUrl; break; case 1: URL = notExportedDataUrl; break; default: break; } Dictionary <string, string> headers = new Dictionary <string, string>(2); headers.Add("Authorization", string.Format("bearer {0}", user.token)); URL = string.Format("{0}?taskid={1}&pageindex={2}&pagesize={3}", URL, config.taskID, config.pageIndex, config.pageSize); DelegTaskProgressTextChange(string.Format("{0}", URL)); taskData = HttpHelper.GetWithHeaders(URL, headers); } return(taskData); }
public void GetDataByGroupAndSave(TaskDataConfig config) { StreamWriter taskdataFileWriter; new DirectoryInfo(string.Format("{1}/GroupID_{0}/", user.taskGroups[config.groupIndex].taskGroupID, config.savePath)).Create(); string taskData = "", dataFilePath = ""; int count = 0; if (null != user.taskGroups[config.groupIndex].tasks) { foreach (Task task in user.taskGroups[config.groupIndex].tasks) { DelegGroupProgressTextChange(string.Format("Exporting data for task(s) in group: {0}[ID:{1}]", user.taskGroups[config.groupIndex].taskGroupName, user.taskGroups[config.groupIndex].taskGroupID)); count++; config.taskID = task.taskID; taskData = GetDataByTask(config); if (taskData.Contains("\"data\":")) { dataFilePath = string.Format("{4}/GroupID_{0}/{1}_TaskID {2}{3}", user.taskGroups[config.groupIndex].taskGroupID, task.taskName, task.taskID, ".json", config.savePath); } else { dataFilePath = string.Format("{4}/GroupID_{0}/_Failed!_{1}_TaskID {2}{3}", user.taskGroups[config.groupIndex].taskGroupID, task.taskName, task.taskID, ".json", config.savePath); DelegTaskProgressTextChange(string.Format("Failed to get data for task!")); } taskdataFileWriter = File.CreateText(dataFilePath); taskdataFileWriter.Write(taskData); DelegTaskProgressTextChange(string.Format("Saving JSON file: {0}", dataFilePath)); taskdataFileWriter.Close(); DelegProgressChange(count, user.taskGroups[config.groupIndex].tasks.Count); } } else { } }
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(); }