| | |
| | | //等级属性 |
| | | void RefreshLVAttrs() |
| | | { |
| | | // lvAttrs.Clear(); |
| | | lvAttrs.Clear(); |
| | | var playerLVConfig = PlayerLVConfig.Get(PlayerDatas.Instance.baseData.LV); |
| | | foreach (var attrType in PlayerPropertyConfig.baseAttrs) |
| | | { |
| | |
| | | //官职属性 |
| | | void RefreshOfficialAttrs() |
| | | { |
| | | // officialAttrs.Clear(); |
| | | officialAttrs.Clear(); |
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); |
| | | for (int i = 0; i < config.AddAttrType.Length; i++) |
| | | { |
| | |
| | | // 单基础属性计算 |
| | | public double GetPropertyVaule(int attrType, HeroInfo hero, string formula) |
| | | { |
| | | // propertyVariables.Clear(); |
| | | propertyVariables.Clear(); |
| | | propertyVariables["lvValue"] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0; |
| | | propertyVariables["equipValue"] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0; |
| | | propertyVariables["bookValue"] = 0; |
| | |
| | | |
| | | public double GetPropertyVaule(int attrType, HeroInfo hero, int type) |
| | | { |
| | | // propertyVariables.Clear(); |
| | | propertyVariables.Clear(); |
| | | propertyVariables["lvValue"] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0; |
| | | propertyVariables["equipValue"] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0; |
| | | propertyVariables["bookValue"] = 0; |
| | |
| | | propertyVariables["gubaoPer"] = 0; |
| | | propertyVariables["hjgValue"] = 0; |
| | | propertyVariables["hjgPer"] = 0; |
| | | propertyVariables["horseValue"] = 0; |
| | | propertyVariables["horsePer"] = 0; |
| | | propertyVariables["horseValue"] = HorseManager.Instance.GetAttrValue(attrType); |
| | | propertyVariables["horsePer"] = HorseManager.Instance.GetAttrPer(attrType) / 10000.0f; |
| | | |
| | | //!!!单武将战力预览的话需要排除队伍影响战力,只算武将自身的上阵属性 |
| | | propertyVariables["lineupInitAddPer"] = GetLineUpPer(attrType, "lineupInitAddPer") / 10000.0f; |