예제 #1
0
 /// <summary>
 /// returns a CompactEventPayload equivalent to the passed World_Event; useful for getting the name of an event
 /// </summary>
 /// <param name="world_Event"></param>
 /// <returns></returns>
 public Events.World.Event MatchEvents(World_Event world_Event)
 {
     Events.World.Event localCheck = null;
     for (int i = 0; i < _events.Length; i++)
     {
         if (world_Event.metagame_event_id == _events[i].event_id.ToString())
         {
             localCheck = _events[i];
             break;
         }
     }
     if (localCheck != null)
     {
         return(localCheck);
     }
     else
     {
         return(null);
     }
 }
 /// <summary>
 ///  resolves a visually
 /// </summary>
 /// <param name="check"></param>
 /// <returns></returns>
 private Events.World.Event MatchEvents(Events.World.MetagameEventEventArgs check)
 {
     Events.World.Event localCheck = null;
     for (int i = 0; i < _events.Length; i++)
     {
         if (check.Payload.metagame_event_id == _events[i].event_id.ToString())
         {
             localCheck = _events[i];
             break;
         }
     }
     if (localCheck != null)
     {
         return(localCheck);
     }
     else
     {
         Console.WriteLine("\n\n-----ERROR PARSING EVENT INFORMATION FROM LOCAL DATABASE-------\n\n");
         return(null);
     }
 }