AddMap() public method

public AddMap ( GameAttributeMap map ) : GameAttributeMap
map GameAttributeMap
return GameAttributeMap
Beispiel #1
0
 public static GameAttributeMap ComputeEquipment(Player player, List<GameAttributeMap> equipped)
 {
     // TODO: add non-basic stats of items, use AddMap method, figure out exception for offHand weapon
     GameAttributeMap map = new GameAttributeMap();
     if (equipped.Count != 0)
     {
         foreach (GameAttributeMap m in equipped)
         {
             map.AddMap(m);
             /*
             // compute weapon to temp map 
             
             for (int damageType = 0; damageType < 7; damageType++)
             {
                 map[GameAttribute.Damage_Weapon_Min_Total, damageType] += m[GameAttribute.Damage_Weapon_Min_Total, damageType];
                 map[GameAttribute.Damage_Weapon_Max_Total, damageType] += m[GameAttribute.Damage_Weapon_Max_Total, damageType];
                 map[GameAttribute.Damage_Weapon_Delta_Total, damageType] += (m[GameAttribute.Damage_Weapon_Max_Total, damageType] - m[GameAttribute.Damage_Weapon_Min_Total, damageType]);
             }
             map[GameAttribute.Damage_Weapon_Min_Total_All] += m[GameAttribute.Damage_Weapon_Min_Total_All];
             map[GameAttribute.Damage_Weapon_Delta_Total_All] += m[GameAttribute.Damage_Weapon_Delta_Total_All];
             map[GameAttribute.Attacks_Per_Second_Item_Total] += m[GameAttribute.Attacks_Per_Second_Item_Total];
             // dual wield
             map[GameAttribute.Damage_Weapon_Delta_Total_MainHand] += m[GameAttribute.Damage_Weapon_Delta_Total_MainHand];
             map[GameAttribute.Damage_Weapon_Min_Total_MainHand] += m[GameAttribute.Damage_Weapon_Min_Total_MainHand];
             map[GameAttribute.Damage_Weapon_Delta_Total_OffHand] += m[GameAttribute.Damage_Weapon_Delta_Total_OffHand];
             map[GameAttribute.Damage_Weapon_Min_Total_OffHand] += m[GameAttribute.Damage_Weapon_Min_Total_OffHand];
             
             // compute armor to temp map
             map[GameAttribute.Armor_Item_Total] += m[GameAttribute.Armor_Item_Total];
             // compute block to temp map
             map[GameAttribute.Block_Amount_Item_Delta] += m[GameAttribute.Block_Amount_Item_Delta];
             map[GameAttribute.Block_Amount_Item_Min] += m[GameAttribute.Block_Amount_Item_Min];
             map[GameAttribute.Block_Chance_Item_Total] += m[GameAttribute.Block_Chance_Item_Total];
              */
         }
     }
     return map;
 }