public static int get_ArmyIDRelated(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, configDataTrainingTechInfo.ArmyIDRelated); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int get_TechType(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushEnum(l, (int)configDataTrainingTechInfo.TechType); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int constructor(IntPtr l) { int result; try { ConfigDataTrainingTechInfo o = new ConfigDataTrainingTechInfo(); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Token: 0x06004977 RID: 18807 RVA: 0x0016E56C File Offset: 0x0016C76C public bool IsTechLocked(int TechId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsTechLockedInt32_hotfix != null) { return(Convert.ToBoolean(this.m_IsTechLockedInt32_hotfix.call(new object[] { this, TechId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; ConfigDataTrainingTechInfo configDataTrainingTechInfo = this.m_configDataLoader.GetConfigDataTrainingTechInfo(TechId); int techMaxLevel = this.GetTechMaxLevel(TechId); TrainingTech tech = this.GetTech(TechId); if (tech.Level >= techMaxLevel) { return(false); } TrainingTechInfo TechInfo = configDataTrainingTechInfo.m_Infos[tech.Level]; ConfigDataTrainingCourseInfo configDataTrainingCourseInfo = this.m_configDataLoader.GetConfigDataTrainingCourseInfo(configDataTrainingTechInfo.m_courseId); TrainingRoom room = this.GetRoom(configDataTrainingCourseInfo.RoomID); if (room.Level < TechInfo.RoomLevel) { return(true); } if (TechInfo.PreIds == null || TechInfo.PreIds.Count == 0) { return(false); } List <TrainingTech> availableTechs = this.GetAvailableTechs(); int i; for (i = 0; i < TechInfo.PreIds.Count; i++) { int PreTechId = TechInfo.PreIds[i]; if (availableTechs.Find((TrainingTech t) => t.ConfigId == PreTechId && !this.IsTechLocked(t.ConfigId) && t.Level >= TechInfo.PreTechLevels[i]) == null) { return(true); } } return(false); }
public static int set_m_techLevelupInfo(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); List <ConfigDataTrainingTechLevelInfo> techLevelupInfo; LuaObject.checkType <List <ConfigDataTrainingTechLevelInfo> >(l, 2, out techLevelupInfo); configDataTrainingTechInfo.m_techLevelupInfo = techLevelupInfo; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_TechType(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); TechDisplayType techType; LuaObject.checkEnum <TechDisplayType>(l, 2, out techType); configDataTrainingTechInfo.TechType = techType; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_IsSummon(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); bool isSummon; LuaObject.checkType(l, 2, out isSummon); configDataTrainingTechInfo.IsSummon = isSummon; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_RoomLevelRequired(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); int roomLevelRequired; LuaObject.checkType(l, 2, out roomLevelRequired); configDataTrainingTechInfo.RoomLevelRequired = roomLevelRequired; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_Resource(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); string resource; LuaObject.checkType(l, 2, out resource); configDataTrainingTechInfo.Resource = resource; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_m_courseId(IntPtr l) { int result; try { ConfigDataTrainingTechInfo configDataTrainingTechInfo = (ConfigDataTrainingTechInfo)LuaObject.checkSelf(l); int courseId; LuaObject.checkType(l, 2, out courseId); configDataTrainingTechInfo.m_courseId = courseId; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Token: 0x0600497D RID: 18813 RVA: 0x0016EBAC File Offset: 0x0016CDAC public void AddTechLevel(int TechId, int DeltaLevel, bool NoCheckAndCost = false) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddTechLevelInt32Int32Boolean_hotfix != null) { this.m_AddTechLevelInt32Int32Boolean_hotfix.call(new object[] { this, TechId, DeltaLevel, NoCheckAndCost }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; TrainingTech tech = this.m_trainingGroundDS.GetTech(TechId); int num = tech.Level + DeltaLevel; ConfigDataTrainingTechInfo configDataTrainingTechInfo = this.m_configDataLoader.GetConfigDataTrainingTechInfo(TechId); if (!NoCheckAndCost) { TrainingTechResourceRequirements techLevelupResourceRequirements = this.GetTechLevelupResourceRequirements(TechId, DeltaLevel); List <Goods> list = new List <Goods>(); list.Add(new Goods { GoodsType = GoodsType.GoodsType_Gold, Count = techLevelupResourceRequirements.Gold }); list.AddRange(techLevelupResourceRequirements.Materials); this.m_bag.ConsumeGoods(list, null, null, GameFunctionType.GameFunctionType_TrainingGround, string.Format("{0}: {1}", TechId, num)); this.OutPutTeachnologyTreeOperateLog(configDataTrainingTechInfo.m_courseId, TechId, num, null, list); } this.m_trainingGroundDS.UpdateTechLevel(TechId, num); foreach (Hero hero in this.m_hero.GetAllHeros()) { this.ApplyTrainingTechToHero(hero, tech); this.m_hero.OnHeroBattlePowerChange(hero); } if (this.TrainingTechLevelupMissionEvent != null) { this.TrainingTechLevelupMissionEvent(tech); } }