private void checkForNewTraits() { bool foundOne = false; foreach (Race rc in prntForm.racesList) { foreach (Trait tr in prntForm.traitsList) { foreach (TraitAllowed ta in rc.traitsAllowed) { if (ta.tag == tr.tag) { foundOne = true; break; } } if (!foundOne) { TraitAllowed newTA = new TraitAllowed(); newTA.name = tr.name; newTA.tag = tr.tag; rc.traitsAllowed.Add(newTA); } else { foundOne = false; } } } }
private void checkForNewTraits() { bool foundOne = false; foreach (PlayerClass cl in prntForm.playerClassesList) { foreach (Trait tr in prntForm.traitsList) { foreach (TraitAllowed ta in cl.traitsAllowed) { if (ta.tag == tr.tag) { foundOne = true; break; } } if (!foundOne) { TraitAllowed newTA = new TraitAllowed(); newTA.name = tr.name; newTA.tag = tr.tag; newTA.useableinsituation = tr.useableInSituation; newTA.associatedSpellTag = tr.associatedSpellTag; cl.traitsAllowed.Add(newTA); } else { foundOne = false; } } } }
private void fillAllowedTraitList() { foreach (Trait tr in prntForm.traitsList) { TraitAllowed newTA = new TraitAllowed(); newTA.name = tr.name; newTA.tag = tr.tag; prntForm.racesList[selectedLbxIndex].traitsAllowed.Add(newTA); } }
private void fillAllowedTraitList() { foreach (Trait tr in prntForm.traitsList) { TraitAllowed newTA = new TraitAllowed(); newTA.name = tr.name; newTA.tag = tr.tag; newTA.useableinsituation = tr.useableInSituation; newTA.associatedSpellTag = tr.associatedSpellTag; prntForm.playerClassesList[selectedLbxIndex].traitsAllowed.Add(newTA); } }
public PlayerClass DeepCopy() { PlayerClass other = (PlayerClass)this.MemberwiseClone(); other.itemsAllowed = new List <ItemRefs>(); foreach (ItemRefs s in this.itemsAllowed) { other.itemsAllowed.Add(s.DeepCopy()); } other.traitsAllowed = new SortableBindingList <TraitAllowed>(); foreach (TraitAllowed s in this.traitsAllowed) { TraitAllowed sa = s.DeepCopy(); other.traitsAllowed.Add(sa); } other.spellsAllowed = new SortableBindingList <SpellAllowed>(); foreach (SpellAllowed s in this.spellsAllowed) { SpellAllowed sa = s.DeepCopy(); other.spellsAllowed.Add(sa); } return(other); }
public TraitAllowed DeepCopy() { TraitAllowed other = (TraitAllowed)this.MemberwiseClone(); /* * other.traitEffectTagList = new List<EffectTagForDropDownList>(); * foreach (EffectTagForDropDownList s in this.traitEffectTagList) * { * other.traitEffectTagList.Add(s); * } * other.traitWorksNeverWhen = new List<LocalImmunityString>(); * foreach (LocalImmunityString s in this.traitWorksNeverWhen) * { * other.traitWorksNeverWhen.Add(s); * } * other.traitWorksOnlyWhen = new List<LocalImmunityString>(); * foreach (LocalImmunityString s in this.traitWorksOnlyWhen) * { * other.traitWorksOnlyWhen.Add(s); * } */ return(other); }
private void checkForNewTraits() { bool foundOne = false; foreach (PlayerClass cl in prntForm.playerClassesList) { foreach (Trait tr in prntForm.traitsList) { foreach (TraitAllowed ta in cl.traitsAllowed) { if (ta.tag == tr.tag) { foundOne = true; break; } } if (!foundOne) { TraitAllowed newTA = new TraitAllowed(); newTA.name = tr.name; newTA.tag = tr.tag; cl.traitsAllowed.Add(newTA); } else { foundOne = false; } } } }