public PcData() { wealth = 0; upkeep = new UpkeepData(); name = new FantasyName(); gender = Gender.None; background = null; status = PcStatus.Idle; faction = Faction.Player; raceKey = ""; professionKey = ""; description = ""; listIndex = -1; partyIndex = -1; hair = "Hair 01"; beard = ""; maxAccessories = 1; level = 0; experience = 0; expToLevel = 0; maxExp = 0; expBonus = 0; attributes = new AttributeManager(); for (int i = 0; i < (int)BaseAttribute.Number; i++) { attributes.AddAttribute(AttributeListType.Base, new Attribute(AttributeType.Base, i, 1)); } for (int i = 0; i < (int)DerivedAttribute.Number; i++) { attributes.AddAttribute(AttributeListType.Derived, new Attribute(AttributeType.Derived, i, 0)); } for (int i = 0; i < (int)DamageType.Number; i++) { attributes.AddAttribute(AttributeListType.Resistance, new Attribute(AttributeType.Resistance, i, 0)); } for (int i = 0; i < (int)Skill.Number; i++) { attributes.SetSkill(new Attribute(AttributeType.Skill, i, 0)); } abilities = new CharacterAbilities(); inventory = new CharacterInventory(); }
public PcData(FantasyName name, Gender gender, int level, string raceKey, string professionKey, string hair, string beard, int listIndex, int partyIndex, int power_slots, int spell_slots) { wealth = 0; upkeep = new UpkeepData(); this.name = name; this.gender = gender; this.raceKey = raceKey; this.professionKey = professionKey; this.listIndex = listIndex; this.partyIndex = partyIndex; this.hair = hair; this.beard = beard; maxAccessories = Random.Range(1, 4); level = 0; experience = 0; expToLevel = 0; maxExp = 0; expBonus = 0.0f; attributes = new AttributeManager(); for (int i = 0; i < (int)BaseAttribute.Number; i++) { attributes.AddAttribute(AttributeListType.Base, new Attribute(AttributeType.Base, i, 1)); } for (int i = 0; i < (int)DerivedAttribute.Number; i++) { attributes.AddAttribute(AttributeListType.Derived, new Attribute(AttributeType.Derived, i, 0)); } for (int i = 0; i < (int)DamageType.Number; i++) { attributes.AddAttribute(AttributeListType.Resistance, new Attribute(AttributeType.Resistance, i, 0)); } for (int i = 0; i < (int)Skill.Number; i++) { attributes.SetSkill(new Attribute(AttributeType.Skill, i, 0)); } abilities = new CharacterAbilities(this, power_slots, spell_slots); inventory = new CharacterInventory(); faction = Faction.Player; }
public PcData(PcData pc) { name = pc.Name; gender = pc.gender; wealth = pc.Wealth; upkeep = new UpkeepData(pc.Upkeep); background = new Background(pc.background); raceKey = pc.raceKey; professionKey = pc.professionKey; listIndex = pc.listIndex; partyIndex = pc.PartyIndex; hair = pc.hair; beard = pc.beard; description = pc.description; level = pc.Level; experience = pc.Experience; expToLevel = pc.ExpToLevel; maxExp = pc.MaxExp; expBonus = pc.ExpBonus; attributes = new AttributeManager(); for (int i = 0; i < (int)BaseAttribute.Number; i++) { attributes.AddAttribute(AttributeListType.Base, new Attribute(pc.attributes.GetAttribute(AttributeListType.Base, i))); } for (int i = 0; i < (int)DerivedAttribute.Number; i++) { attributes.AddAttribute(AttributeListType.Derived, new Attribute(pc.attributes.GetAttribute(AttributeListType.Derived, i))); } for (int i = 0; i < (int)DamageType.Number; i++) { attributes.AddAttribute(AttributeListType.Resistance, new Attribute(pc.attributes.GetAttribute(AttributeListType.Resistance, i))); } for (int i = 0; i < (int)Skill.Number; i++) { attributes.SetSkill(new Attribute(pc.attributes.GetSkill(i))); } abilities = new CharacterAbilities(pc); inventory = new CharacterInventory(pc.inventory); faction = Faction.Player; }