public void OnActSkillAction() { SkillParam actSkillParam = this.actSkillParam; if (actSkillParam != null) { actSkillParam.useGaugeCounter = 0f; } }
public void MonsterStartSkill(SkillParam param) { if (CanUseSkill()) { if (m_SkillLogics.ContainsKey(param.SkillId) && !m_SkillLogics[param.SkillId].IsCoolingDown()) { m_SkillLogics[param.SkillId].StartSkill(); } } }
public bool Update(int?id, SkillParam skillParam) { if (_skillRepository.Get(id) == null) { MessageBox.Show("Sorry, your data is not found"); } else { status = _skillRepository.Update(id, skillParam); } return(status); }
public bool Insert(SkillParam skillParam) { var result = 0; skill.Name = skillParam.Name; skill.CreateDate = DateTimeOffset.Now.LocalDateTime; _context.Skills.Add(skill); result = _context.SaveChanges(); if (result > 0) { status = true; MessageBox.Show("Insert Successfully"); } return(status); }
public SkillInfo(Player owner) { player = owner; skillParams = new List <SkillParam>(); int i = 0; for (int num = 9; i < num; i++) { SkillParam item = new SkillParam { skillIndex = i }; skillParams.Add(item); } }
public static void PrepareInventoryAssets() { GameManager instance = MonoSingleton <GameManager> .Instance; PlayerData player = instance.Player; for (int index = 0; index < player.Inventory.Length; ++index) { ItemData itemData = player.Inventory[index]; if (itemData != null && itemData.Param != null && !string.IsNullOrEmpty((string)itemData.Param.skill)) { SkillParam skillParam = instance.GetSkillParam((string)itemData.Param.skill); if (skillParam != null && !string.IsNullOrEmpty(skillParam.effect)) { AssetManager.PrepareAssets(AssetPath.SkillEffect(skillParam)); } } } }
public SkillParam GetSkillParam(int skill_index) { if (skillParams == null) { return(null); } if (skill_index < 0 || skill_index >= skillParams.Count) { return(null); } SkillParam skillParam = skillParams[skill_index]; if (skillParam == null || !skillParam.isValid) { return(null); } return(skillParam); }
private static void ParseSkill(ref HeroParam param, SecurityElement element) { if (param == null || element == null || element.Tag != "Skill") { return; } SkillParam skill = new SkillParam(); skill.type = element.Attribute("enum").ToEnumEx <SkillEnum>(); skill.cd = element.Attribute("cd").ToFloatEx(); //skill.attack = element.Attribute("attack").ToInt32Ex(); skill.action = element.Attribute("action").ToEnumEx <ActionEnum>(); skill.triggerAt = element.Attribute("triggerAt").ToFloatEx(); skill.needTarget = element.Attribute("needTarget").ToBoolEx(); skill.skillType = element.Attribute("skillType").ToEnumEx <SkillType>(); //skill.effects = new List<EffectParam>(); param.skills.Add(skill); }
public bool Update(int?id, SkillParam skillParam) { var result = 0; var skill = Get(id); skill.Name = skillParam.Name; skill.UpdateDate = DateTimeOffset.Now.LocalDateTime; result = _context.SaveChanges(); if (result > 0) { status = true; MessageBox.Show("Update Successfully"); } else { MessageBox.Show("Update Failed"); } return(status); }
private static void PrepareSkillAssets(CharacterDB.Job jobData, SkillParam skill) { if (skill == null || string.IsNullOrEmpty(skill.motion) && string.IsNullOrEmpty(skill.effect)) { return; } SkillSequence sequence = SkillSequence.FindSequence(skill.motion); if (sequence == null) { return; } if (!string.IsNullOrEmpty(sequence.SkillAnimation.Name)) { DownloadUtility.PrepareUnitAnimation(jobData, sequence.SkillAnimation.Name, false, (JobParam)null); } if (!string.IsNullOrEmpty(sequence.ChantAnimation.Name)) { DownloadUtility.PrepareUnitAnimation(jobData, sequence.ChantAnimation.Name, false, (JobParam)null); } if (!string.IsNullOrEmpty(sequence.EndAnimation.Name)) { DownloadUtility.PrepareUnitAnimation(jobData, sequence.EndAnimation.Name, false, (JobParam)null); } if (!string.IsNullOrEmpty(sequence.StartAnimation)) { DownloadUtility.PrepareUnitAnimation(jobData, sequence.StartAnimation, false, (JobParam)null); } if (!string.IsNullOrEmpty(skill.effect)) { AssetManager.PrepareAssets(AssetPath.SkillEffect(skill)); if (!string.IsNullOrEmpty(skill.CollaboMainId)) { AssetManager.PrepareAssets(AssetPath.SkillEffect(skill) + "_sub"); } } if (string.IsNullOrEmpty(skill.SceneName)) { return; } AssetManager.PrepareAssets(AssetPath.SkillScene(skill.SceneName)); }
public float GetPercentUseGauge(int skill_index) { SkillParam skillParam = GetSkillParam(skill_index); if (skillParam == null) { return(0f); } if ((float)(int)skillParam.useGauge <= 0f) { return(1f); } float num = skillParam.useGaugeCounter / (float)(int)skillParam.useGauge; if (num > 1f) { num = 1f; } return(num); }
public bool IsActSkillAction(int skill_index) { SkillParam skillParam = GetSkillParam(skill_index); if (skillParam == null) { return(false); } if (GetPercentUseGauge(skill_index) < 1f) { return(false); } if (!skillParam.IsActiveType()) { return(false); } if (IsArenaForbidSlotType(skillParam.tableData.type)) { return(false); } return(true); }
public bool Insert(SkillParam skillParam) { return(_skillRepository.Insert(skillParam)); }
public void Init(HeroEntity _entity, SkillParam _param) { entity = _entity; param = _param; }
public virtual void OnActive(int ownerID, SkillParam skillParam) { }
public void SetSettingsInfo(SkillSettingsInfo skill_settings, List <CharaInfo.EquipItem> weapon_list) { List <SkillParam> list = new List <SkillParam>(); if (skillParams != null) { list = skillParams; } skillParams = new List <SkillParam>(); InGameManager i = MonoBehaviourSingleton <InGameManager> .I; InGameSettingsManager i2 = MonoBehaviourSingleton <InGameSettingsManager> .I; int j = 0; for (int num = 9; j < num; j++) { SkillParam skillParam = new SkillParam(); skillParam.skillIndex = j; skillParams.Add(skillParam); if (skill_settings != null && Singleton <SkillItemTable> .IsValid()) { SkillSettingsInfo.Element element = skill_settings.elementList[j]; if (element != null) { skillParam.baseInfo = element.baseInfo; skillParam.useGaugeCounter = element.useGaugeCounter; if (skillParam.baseInfo != null && skillParam.baseInfo.id != 0) { skillParam.tableData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)skillParam.baseInfo.id); if (skillParam.tableData != null && skillParam.IsActiveType()) { if (weapon_list[j / 3] != null) { EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)weapon_list[j / 3].eId); if (equipItemData != null && !skillParam.tableData.IsEnableEquipType(equipItemData.type)) { continue; } } switch (skillParam.tableData.skillAtkType) { case ELEMENT_TYPE.FIRE: skillParam.atk.fire = (float)(int)skillParam.tableData.skillAtk; break; case ELEMENT_TYPE.WATER: skillParam.atk.water = (float)(int)skillParam.tableData.skillAtk; break; case ELEMENT_TYPE.THUNDER: skillParam.atk.thunder = (float)(int)skillParam.tableData.skillAtk; break; case ELEMENT_TYPE.SOIL: skillParam.atk.soil = (float)(int)skillParam.tableData.skillAtk; break; case ELEMENT_TYPE.LIGHT: skillParam.atk.light = (float)(int)skillParam.tableData.skillAtk; break; case ELEMENT_TYPE.DARK: skillParam.atk.dark = (float)(int)skillParam.tableData.skillAtk; break; default: skillParam.atk.normal = (float)(int)skillParam.tableData.skillAtk; break; } skillParam.atkRate = (float)(int)skillParam.tableData.skillAtkRate * 0.01f; skillParam.healHp = skillParam.tableData.healHp; for (int k = 0; k < 3; k++) { skillParam.supportValue[k] = skillParam.tableData.supportValue[k]; skillParam.supportTime[k] = skillParam.tableData.supportTime[k]; } skillParam.castTimeRate = 0f; skillParam.useGauge = skillParam.tableData.useGauge; if (Singleton <GrowSkillItemTable> .IsValid()) { GrowSkillItemTable.GrowSkillItemData growSkillItemData = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(skillParam.tableData.growID, skillParam.baseInfo.level); if (growSkillItemData != null) { float num2 = (float)growSkillItemData.GetGrowParamSkillAtk(skillParam.tableData.skillAtk); switch (skillParam.tableData.skillAtkType) { case ELEMENT_TYPE.FIRE: skillParam.atk.fire = num2; break; case ELEMENT_TYPE.WATER: skillParam.atk.water = num2; break; case ELEMENT_TYPE.THUNDER: skillParam.atk.thunder = num2; break; case ELEMENT_TYPE.SOIL: skillParam.atk.soil = num2; break; case ELEMENT_TYPE.LIGHT: skillParam.atk.light = num2; break; case ELEMENT_TYPE.DARK: skillParam.atk.dark = num2; break; default: skillParam.atk.normal = num2; break; } skillParam.atkRate = (float)growSkillItemData.GetGrowParamSkillAtkRate(skillParam.tableData.skillAtkRate) * 0.01f; skillParam.healHp = growSkillItemData.GetGrowParamHealHp(skillParam.tableData.healHp); for (int l = 0; l < 3; l++) { skillParam.supportValue[l] = growSkillItemData.GetGrowParamSupprtValue(skillParam.tableData.supportValue, l); skillParam.supportTime[l] = growSkillItemData.GetGrowParamSupprtTime(skillParam.tableData.supportTime, l); } skillParam.castTimeRate = growSkillItemData.GetGrowParamCastTimeRate(); skillParam.useGauge = growSkillItemData.GetGrowParamUseGauge(skillParam.tableData.useGauge); } } if (Singleton <ExceedSkillItemTable> .IsValid()) { ExceedSkillItemTable.ExceedSkillItemData exceedSkillItemData = Singleton <ExceedSkillItemTable> .I.GetExceedSkillItemData(skillParam.baseInfo.exceedCnt); if (exceedSkillItemData != null) { skillParam.useGauge = exceedSkillItemData.GetExceedUseGauge(skillParam.useGauge); } } if (MonoBehaviourSingleton <InGameManager> .IsValid() && MonoBehaviourSingleton <InGameManager> .I.HasArenaInfo()) { InGameSettingsManager.ArenaParam arenaParam = i2.arenaParam; if ((float)skillParam.baseInfo.exceedCnt < arenaParam.magiSpeedDownRegistSkillExceedLv && i.ContainsArenaCondition(ARENA_CONDITION.RECOVER_MAGI_SPEED_DOWN)) { float num3 = arenaParam.magiSpeedDownRateBase - arenaParam.magiSpeedDownRate * (float)skillParam.baseInfo.exceedCnt; if (num3 < 0f) { num3 = 0f; } SkillParam skillParam2 = skillParam; skillParam2.useGauge = (int)skillParam2.useGauge + Mathf.FloorToInt((float)(int)skillParam.useGauge * num3); } if (i.ContainsArenaCondition(ARENA_CONDITION.RECOVER_MAGI_SPEED_UP)) { SkillParam skillParam3 = skillParam; skillParam3.useGauge = (int)skillParam3.useGauge - Mathf.FloorToInt((float)(int)skillParam.useGauge * arenaParam.magiSpeedUpBaseRate); } } if (list != null && list.Count > 0) { for (int m = 0; m < list.Count; m++) { if (list[m] != null && list[m].tableData != null && list[m].tableData.name == skillParam.tableData.name && list[m].bullet != null) { skillParam.bullet = list[j].bullet; } } } skillParam.isValid = true; } } } } } arenaConditionList = i.GetArenaConditions(); if (!arenaConditionList.IsNullOrEmpty()) { for (int n = 0; n < arenaConditionList.Length; n++) { switch (arenaConditionList[n]) { case ARENA_CONDITION.FORBID_MAGI_ATTACK: isArenaForbidMagiAttack = true; break; case ARENA_CONDITION.FORBID_MAGI_SUPPORT: isArenaForbidMagiSupport = true; break; case ARENA_CONDITION.FORBID_MAGI_HEAL: isArenaForbidMagiHeal = true; break; } } } }
public static void DownloadUnit(UnitParam unit, JobData[] jobs = null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1ED unitCAnonStorey1Ed = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1ED(); // ISSUE: reference to a compiler-generated field unitCAnonStorey1Ed.unit = unit; // ISSUE: reference to a compiler-generated field if (unitCAnonStorey1Ed.unit == null) { return; } // ISSUE: reference to a compiler-generated field CharacterDB.Character character = CharacterDB.FindCharacter(unitCAnonStorey1Ed.unit.model); if (character == null) { return; } GameManager instance = MonoSingleton <GameManager> .Instance; // ISSUE: reference to a compiler-generated field if (unitCAnonStorey1Ed.unit.jobsets != null) { // ISSUE: reference to a compiler-generated field for (int index = 0; index < unitCAnonStorey1Ed.unit.jobsets.Length; ++index) { // ISSUE: reference to a compiler-generated field for (JobSetParam jobSetParam = instance.GetJobSetParam((string)unitCAnonStorey1Ed.unit.jobsets[index]); jobSetParam != null; jobSetParam = string.IsNullOrEmpty(jobSetParam.jobchange) ? (JobSetParam)null : instance.GetJobSetParam(jobSetParam.jobchange)) { JobParam jobParam = instance.GetJobParam(jobSetParam.job); // ISSUE: reference to a compiler-generated field SkillParam skillParam = string.IsNullOrEmpty(jobParam.atkskill[0]) ? instance.MasterParam.GetSkillParam(jobParam.atkskill[(int)unitCAnonStorey1Ed.unit.element]) : instance.MasterParam.GetSkillParam(jobParam.atkskill[0]); if (skillParam != null) { SkillSequence sequence = SkillSequence.FindSequence(skillParam.motion); if (sequence != null && !string.IsNullOrEmpty(sequence.SkillAnimation.Name) && index < character.Jobs.Count) { DownloadUtility.PrepareUnitAnimation(character.Jobs[index], sequence.SkillAnimation.Name, false, (JobParam)null); } } DownloadUtility.DownloadJobEquipment(jobParam); ArtifactParam artifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(jobParam.artifact); if (artifactParam != null) { DownloadUtility.DownloadArtifact(artifactParam); } int artifactSlotIndex = JobData.GetArtifactSlotIndex(ArtifactTypes.Arms); if (jobs != null) { foreach (JobData job in jobs) { if (job != null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EC unitCAnonStorey1Ec = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EC(); List <ArtifactData> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().Player.Artifacts; // ISSUE: reference to a compiler-generated field unitCAnonStorey1Ec.uniqId = job.Artifacts[artifactSlotIndex]; // ISSUE: reference to a compiler-generated method ArtifactData artifactData = artifacts.Find(new Predicate <ArtifactData>(unitCAnonStorey1Ec.\u003C\u003Em__1B4)); if (artifactData != null) { DownloadUtility.DownloadArtifact(artifactData.ArtifactParam); } } } } else { DownloadUtility.DownloadArtifact(instance.MasterParam.GetArtifactParam(jobParam.artifact)); } // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitImage(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitImage2(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitIconSmall(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitIconMedium(unitCAnonStorey1Ed.unit, jobSetParam.job)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitEyeImage(unitCAnonStorey1Ed.unit, jobSetParam.job)); } } // ISSUE: reference to a compiler-generated field JobSetParam[] changeJobSetParam = instance.GetClassChangeJobSetParam(unitCAnonStorey1Ed.unit.iname); if (changeJobSetParam != null && changeJobSetParam.Length > 0) { for (int index = 0; index < changeJobSetParam.Length; ++index) { JobSetParam jobSetParam = changeJobSetParam[index]; if (jobSetParam != null) { JobParam jobParam = instance.GetJobParam(jobSetParam.job); ArtifactParam artifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(jobParam.artifact); if (artifactParam != null) { DownloadUtility.DownloadArtifact(artifactParam); } // ISSUE: reference to a compiler-generated field SkillParam skillParam = string.IsNullOrEmpty(jobParam.atkskill[0]) ? instance.MasterParam.GetSkillParam(jobParam.atkskill[(int)unitCAnonStorey1Ed.unit.element]) : instance.MasterParam.GetSkillParam(jobParam.atkskill[0]); if (skillParam != null) { SkillSequence sequence = SkillSequence.FindSequence(skillParam.motion); if (sequence != null && !string.IsNullOrEmpty(sequence.SkillAnimation.Name)) { DownloadUtility.PrepareUnitAnimation(character.Jobs[index], sequence.SkillAnimation.Name, false, (JobParam)null); } } } } } } for (int index = 0; index < character.Jobs.Count; ++index) { CharacterDB.Job job = character.Jobs[index]; DownloadUtility.PrepareUnitModels(job); DownloadUtility.PrepareUnitAnimation(job, "unit_info_idle0", true, (JobParam)null); DownloadUtility.PrepareUnitAnimation(job, "unit_info_act0", true, (JobParam)null); } // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets("CHM/Home_" + unitCAnonStorey1Ed.unit.model + "_walk0"); // ISSUE: reference to a compiler-generated field if (unitCAnonStorey1Ed.unit.skins != null) { List <ArtifactParam> artifacts = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.Artifacts; // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EE unitCAnonStorey1Ee = new DownloadUtility.\u003CDownloadUnit\u003Ec__AnonStorey1EE(); // ISSUE: reference to a compiler-generated field unitCAnonStorey1Ee.\u003C\u003Ef__ref\u0024493 = unitCAnonStorey1Ed; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field for (unitCAnonStorey1Ee.i = 0; unitCAnonStorey1Ee.i < unitCAnonStorey1Ed.unit.skins.Length; ++unitCAnonStorey1Ee.i) { // ISSUE: reference to a compiler-generated method ArtifactParam skin = artifacts.Find(new Predicate <ArtifactParam>(unitCAnonStorey1Ee.\u003C\u003Em__1B5)); if (skin != null) { // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinImage(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinImage2(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinIconSmall(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinIconMedium(unitCAnonStorey1Ed.unit, skin, (string)null)); // ISSUE: reference to a compiler-generated field AssetManager.PrepareAssets(AssetPath.UnitSkinEyeImage(unitCAnonStorey1Ed.unit, skin, (string)null)); } } } // ISSUE: reference to a compiler-generated field DownloadUtility.PrepareUnitVoice(unitCAnonStorey1Ed.unit); }