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); } } }
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); } } } }
public virtual void DeleteAllAchivementWithName(Achivement achivement) { repository.DeleteAllAchivementWithName(achivement.Name); }
public virtual Achivement GetAchivementFromId(Achivement achivement) { return(repository.GetAchivementFromId(achivement.Id)); }
public virtual Achivement GetAchivementFromName(Achivement achivement) { return(repository.GetAchivementFromName(achivement.Name)); }
public virtual void AddAchivement(Achivement achivement) { repository.AddAchivement(achivement); }