Ejemplo n.º 1
0
        private void CheckPlayerKillAchivement()
        {
            Achivement achivement = new Achivement
            {
                Name     = achivementName[3],
                PlayerId = player.Id
            };

            if (!CheckIfAchivementExist(achivement))
            {
                long countPlayerKill = playerKillrepository.GetCountFromMurderer(player.Id);
                if (countPlayerKill >= 70)
                {
                    achivementRepository.AddAchivement(achivement);
                    TriggerFeedBackAchivement(achivement);
                }
            }
        }
Ejemplo n.º 2
0
        private void CheckProtectionOfPlayerAchivement()
        {
            Achivement achivement = new Achivement
            {
                Name     = achivementName[1],
                PlayerId = player.Id
            };

            if (!CheckIfAchivementExist(achivement))
            {
                IList <ProtectionOfPlayer> listAllProtection = protectionOfPlayerRepository.GetAllLevel3EntryOfPlayer(player.Id);
                if (listAllProtection != null)
                {
                    bool helmet = false;
                    bool vest   = false;
                    bool bag    = false;
                    foreach (ProtectionOfPlayer item in listAllProtection)
                    {
                        if (item.TypeProtection == ItemType.Bag.ToString())
                        {
                            bag = true;
                        }
                        else if (item.TypeProtection == ItemType.Helmet.ToString())
                        {
                            helmet = true;
                        }
                        else if (item.TypeProtection == ItemType.Vest.ToString())
                        {
                            vest = true;
                        }
                    }
                    if (helmet && bag && vest)
                    {
                        achivementRepository.AddAchivement(achivement);
                        TriggerFeedBackAchivement(achivement);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public virtual void DeleteAllAchivementWithName(Achivement achivement)
 {
     repository.DeleteAllAchivementWithName(achivement.Name);
 }
Ejemplo n.º 4
0
 public virtual Achivement GetAchivementFromId(Achivement achivement)
 {
     return(repository.GetAchivementFromId(achivement.Id));
 }
Ejemplo n.º 5
0
 public virtual Achivement GetAchivementFromName(Achivement achivement)
 {
     return(repository.GetAchivementFromName(achivement.Name));
 }
Ejemplo n.º 6
0
 public virtual void AddAchivement(Achivement achivement)
 {
     repository.AddAchivement(achivement);
 }