private void Encounter_EncounterStateChange(object sender, EncounterStateChangeEventArgs e)
 {
     if (e.EncounterState == EncounterState.BattleHasEnded)
     {
         NotificationPanelEncounterBase notificationPanelEncounter = this.GetNotificationPanelEncounter();
         if (notificationPanelEncounter != null && notificationPanelEncounter.IsVisible)
         {
             notificationPanelEncounter.Hide(true);
         }
         this.notificationItem = null;
         this.BuildGuiGarrisons();
         this.guiElementName           = EventEncounterStateChange.Name + e.EncounterState.ToString();
         base.GuiNotificationPanelType = typeof(NotificationPanelEncounterEnded);
         NotificationPanelEncounterBase notificationPanelEncounter2 = this.GetNotificationPanelEncounter();
         if (notificationPanelEncounter2 != null && this.NotificationItem != null)
         {
             notificationPanelEncounter2.Show(new object[]
             {
                 this,
                 this.NotificationItem
             });
         }
     }
     if (base.GuiService.GetGuiPanel <NotificationListPanel>() != null)
     {
         base.GuiService.GetGuiPanel <NotificationListPanel>().RefreshContent();
     }
 }
Beispiel #2
0
 private void EncounterRepositoryService_OneEncounterStateChange(object sender, EncounterStateChangeEventArgs e)
 {
     if (this.Completion != AICommanderMission.AICommanderMissionCompletion.Fail || this.Commander.AIPlayer.AIState != AIPlayer.PlayerState.EmpireControlledByAI)
     {
         return;
     }
     if (e.EncounterState == EncounterState.BattleHasEnded)
     {
         if (this.AIDataArmyGUID == GameEntityGUID.Zero)
         {
             return;
         }
         this.aiDataRepository.GetAIData <AIData_Army>(this.AIDataArmyGUID);
         this.Initializing();
     }
 }