Пример #1
0
 public void AddPlayerScores(PlayerProfile profile, PlayerScoreData scoreData)
 {
     if (!PlayerProfiles.Contains(profile))
     {
         PlayerProfiles.Add(profile);
     }
     playerScoreMap[profile] = scoreData;
 }
Пример #2
0
        public static CentralGumpProfile EnsureProfile(PlayerMobile pm)
        {
            if (pm == null)
            {
                return(null);
            }

            CentralGumpProfile p;

            if (!PlayerProfiles.TryGetValue(pm, out p))
            {
                PlayerProfiles.Add(pm, p = new CentralGumpProfile(pm));
            }
            else if (p == null)
            {
                PlayerProfiles[pm] = p = new CentralGumpProfile(pm);
            }

            return(p);
        }