public ResistanceCollection GetResistances() { ResistanceCollection resistanceCollection = new ResistanceCollection(); if (GetTokens(1) > 0) { resistanceCollection.Add(new Resistance(EDamageType.DARK, ConfigManager.Instance.Game.ResistancePerBlessing)); } if (GetTokens(2) > 0) { resistanceCollection.Add(new Resistance(EDamageType.LIGHT, ConfigManager.Instance.Game.ResistancePerBlessing)); } if (GetTokens(3) > 0) { resistanceCollection.Add(new Resistance(EDamageType.FIRE, ConfigManager.Instance.Game.ResistancePerBlessing)); } if (GetTokens(4) > 0) { resistanceCollection.Add(new Resistance(EDamageType.WATER, ConfigManager.Instance.Game.ResistancePerBlessing)); } if (GetTokens(5) > 0) { resistanceCollection.Add(new Resistance(EDamageType.AIR, ConfigManager.Instance.Game.ResistancePerBlessing)); } if (GetTokens(6) > 0) { resistanceCollection.Add(new Resistance(EDamageType.EARTH, ConfigManager.Instance.Game.ResistancePerBlessing)); } return(resistanceCollection); }
public CharacterClass(EClass p_class) { m_class = p_class; m_data = StaticDataHandler.GetStaticData <CharacterClassStaticData>(EDataType.CHARACTER_CLASS, (Int32)p_class); m_race = m_data.Race; m_nameKey = m_data.NameKey; m_advancedNameKey = m_data.AdvancedNameKey; m_expertSkills = m_data.ExpertSkills; m_masterSkills = m_data.MasterSkills; m_grandMasterSkills = m_data.GrandMasterSkills; m_startSkills = m_data.StartSkills; m_initialResistance = new ResistanceCollection(); m_initialResistance.Add(m_data.ResAir); m_initialResistance.Add(m_data.ResEarth); m_initialResistance.Add(m_data.ResFire); m_initialResistance.Add(m_data.ResWater); m_initialResistance.Add(m_data.ResDark); m_initialResistance.Add(m_data.ResLight); m_initialResistance.Add(m_data.ResPrimordial); m_initialAttributes = new Attributes(m_data.BaseMight, m_data.BaseMagic, m_data.BasePerception, m_data.BaseDestiny, m_data.BaseVitality, m_data.BaseSpirit, m_data.BaseHP, m_data.BaseMana); }