BF2Statistics.Web.ASP.GetUnlocksInfo.CheckUnlock C# (CSharp) Method

CheckUnlock() private method

This method adds special forces unlocks to the output, only if the base class unlock is unlocked. We dont add the unlock if the base class unlock is NOT unlocked, because if we do, then the user will be able to choose the unlock, without earning the base unlock first
private CheckUnlock ( int Want, int Need, bool>.Dictionary Unlocks ) : void
Want int The Special Forces unlock ID
Need int The base class unlock ID
Unlocks bool>.Dictionary All the players unlocks, and status for each
return void
        private void CheckUnlock(int Want, int Need, Dictionary<string, bool> Unlocks)
        {
            // If we have base unlock, add SF unlock to formatted output
            if (Unlocks.ContainsKey(Need.ToString()) && Unlocks[Need.ToString()] == true)
            {
                Response.WriteDataLine(Want, (Unlocks.ContainsKey(Want.ToString()) && Unlocks[Want.ToString()]) ? "s" : "n");
            }
        }