Exemplo n.º 1
0
 //AccountInterface accountInterface;
 public SharedController(GameInterface iGame, CharacterInterface iChar, RestrictionsInterface iRest, EventInterface iEvent)
 {
     gameInterface = iGame;
     charInterface = iChar;
     restrictionsInterface = iRest;
     eventInterface = iEvent;
 }
Exemplo n.º 2
0
 public EventsController(EventInterface iEvent, GameInterface iGame, CharacterInterface iChar, AccountInterface iAcct)
 {
     eventInterface = iEvent;
     charInterface = iChar;
     gameInterface = iGame;
     accountInterface = iAcct;
 }
Exemplo n.º 3
0
 public void PopulateEventsForThisMonth(EventInterface eventInterface, int memberID)
 {
     Events = eventInterface.GetAllEventsForAMonthByMemberID(memberID, MonthNumber, Year);
 }
Exemplo n.º 4
0
 public RaidCalendar(int monthNum, int year, EventInterface evtInterface)
 {
     BuildCalendar(monthNum, year);
 }
Exemplo n.º 5
0
 public RaidCalendar(int monthNum, EventInterface evtInterface)
 {
     BuildCalendar(monthNum, DateTime.Now.Year);
 }
 public CharacterController(CharacterInterface iChar, GameInterface iGame, EventInterface iEvent)
 {
     characterInterface = iChar;
     gameInterface = iGame;
     eventInterface = iEvent;
 }
        public RestrictionReason EnforceEventRestrictionOnCharacter(Event eventInfo, CompleteCharacterData charInfo)
        {
            RestrictionReason restriction = new RestrictionReason().DefaultToUnrestricted();
            //Enforce Game Restriction
            if (charInfo.GameID != eventInfo.GameID)
            {
                restriction.Restricted = true;
                restriction.Restricted_Reason = RestrictionReason.REASON_DOES_NOT_BELONG_TO_GAME;
            }

            //Enforce Game Restriction

            if (charInfo.ServerID != eventInfo.ServerID)
            {
                restriction.Restricted = true;
                restriction.Restricted_Reason = RestrictionReason.REASON_DOES_NOT_EXIST_ON_SERVER;
            }

            //Enforce Attendence Restriction
            EventInterface eventInterface = new EventInterface(LeetRaidsDB);
            IEnumerable<EventAttendee> evtAttendees = eventInterface.GetAllEventAttendees(eventInfo.EventID);
            if (evtAttendees.Any(attn => attn.CharacterID == charInfo.CharacterID))
            {
                restriction.Restricted = true;
                restriction.Restricted_Reason = RestrictionReason.REASON_ALREADY_INVITED;
            }

            return restriction;
        }