public void LoadoutSkillChanged(int iSkillSlot, SkillType.SKILLTYPE skilltypeNew) { //Save the previous selection SkillType.SKILLTYPE skilltypePrev = loadoutCur.lstChosenSkills[iSkillSlot]; //Update our loadout to reflect the new skill loadoutCur.lstChosenSkills[iSkillSlot] = skilltypeNew; //Scan through our loadout skills to see if one of them already is equipped with this skill for (int i = 0; i < loadoutCur.lstChosenSkills.Count; i++) { if (iSkillSlot == i) { continue; //Skip over the skillslot that just claimed this skill } //If one of our skillslots in our loadout already has this skill, instead replace it with the old // skill that we were replacing (effectively swapping the two skills' positions in the loadout) if (loadoutCur.lstChosenSkills[i] == skilltypeNew) { loadoutCur.lstChosenSkills[i] = skilltypePrev; //Update the selection in the dropdown for that skillslot ardropdownSkillLoadout[i].SetDropdownSelection(loadoutCur.lstChosenSkills[i]); } } }
public void SubmitSelectedSkill(Object target, params object[] args) { //Grab whichever associated Skill we have hovered in the dropdown and pass it as our selection SkillType.SKILLTYPE skilltypeSelected = lstSkillTypeInfosAdaptable[dropdownSkillSelection.value].type; Debug.Log("Going to pass " + skilltypeSelected + " to adapt into"); modTarAdapt.AttemptSelection(skilltypeSelected); }
public override void ClauseEffect(InputSkillSelection selections) { SkillSlot ssAdaptingFrom = (SkillSlot)selections.lstSelections[1]; SkillType.SKILLTYPE skilltypeAdaptingTo = (SkillType.SKILLTYPE)selections.lstSelections[2]; Debug.Log("Adapting to " + skilltypeAdaptingTo); ContSkillEngine.PushSingleExecutable(new ExecAdaptSkill(skill.chrOwner, ssAdaptingFrom, skilltypeAdaptingTo) { sLabel = "Adapting skill" }); }
public bool HasSkillEquipped(SkillType.SKILLTYPE skilltype) { //Loop through our skill slots and check if one of them has the desired skilltype for (int i = 0; i < nEquippedCharacterSkills; i++) { if (arSkillSlots[i].skill.GetSkillType() == skilltype) { return(true); } } return(false); }
public void SetDropdownSelection(SkillType.SKILLTYPE skilltypeSelected) { bool bFoundSelected = false; //Find the index for the selected skilltype we're supposed to be initially set to for (int i = 0; i < loadoutselector.lstSelectableSkills.Count; i++) { if (loadoutselector.lstSelectableSkills[i].type == skilltypeSelected) { //Make sure not to re-notify that the value has changed, since this will infinitely loop dropdownSkillLoadout.SetValueWithoutNotify(i); dropdownSkillLoadout.RefreshShownValue(); bFoundSelected = true; break; } } if (bFoundSelected == false) { Debug.LogError("Attempted to initially select " + skilltypeSelected + " but this isn't in the lst of skills we can select from"); } }
public ExecAdaptSkill(ExecAdaptSkill other) : base(other) { skilltypeToAdaptTo = other.skilltypeToAdaptTo; }
public ExecAdaptSkill(Chr _chrSource, SkillSlot _ssTarget, SkillType.SKILLTYPE _skilltypeToAdaptTo) : base(_chrSource, _ssTarget) { skilltypeToAdaptTo = _skilltypeToAdaptTo; }
public void SetSkill(SkillType.SKILLTYPE skilltype) { SetSkill(SkillType.InstantiateNewSkill(skilltype, chrOwner)); }
public void Init(SkillType.SKILLTYPE skilltypeSelected) { LibView.SetSkillTypeDropDownOptions(dropdownSkillLoadout, loadoutselector.lstSelectableSkills); SetDropdownSelection(skilltypeSelected); }