// Token: 0x060000D2 RID: 210 RVA: 0x00008CE8 File Offset: 0x00006EE8
 private void OnModifierAdded(Unit sender, ModifierChangedEventArgs args)
 {
     try
     {
         Modifier modifier = args.Modifier;
         if (this.runeModifiers.Contains(modifier.Name))
         {
             TopPanelUnit topPanelUnit = this.units.Find((TopPanelUnit x) => ((x != null) ? new uint?(x.Handle) : null) == sender.Handle);
             if (topPanelUnit != null)
             {
                 topPanelUnit.AddModifier(modifier);
             }
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
     }
 }
 // Token: 0x060000D1 RID: 209 RVA: 0x00008C78 File Offset: 0x00006E78
 private void OnFireEvent(FireEventEventArgs args)
 {
     if (args.GameEvent.Name != "dota_buyback")
     {
         return;
     }
     try
     {
         int          @int         = args.GameEvent.GetInt("player_id");
         TopPanelUnit topPanelUnit = this.units[@int];
         if (topPanelUnit != null)
         {
             topPanelUnit.BuybackSleeper.Sleep(480f);
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
     }
 }
 // Token: 0x060000CF RID: 207 RVA: 0x000088A0 File Offset: 0x00006AA0
 private void OnAbilityRemoved(Ability9 ability)
 {
     try
     {
         if (ability.IsItem && !ability.Owner.IsIllusion && this.drawItems.Contains(ability.Id))
         {
             int purchaserId = ability.BaseItem.PurchaserId;
             if (purchaserId != -1)
             {
                 TopPanelUnit topPanelUnit = this.units[purchaserId];
                 if (topPanelUnit != null)
                 {
                     topPanelUnit.RemoveItem(ability);
                 }
             }
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
     }
 }
 // Token: 0x060000CE RID: 206 RVA: 0x000087EC File Offset: 0x000069EC
 private void OnAbilityAdded(Ability9 ability)
 {
     try
     {
         if (!ability.Owner.IsIllusion)
         {
             if (ability.IsItem)
             {
                 if (this.drawItems.Contains(ability.Id))
                 {
                     int purchaserId = ability.BaseItem.PurchaserId;
                     if (purchaserId != -1)
                     {
                         TopPanelUnit topPanelUnit = this.units[purchaserId];
                         if (topPanelUnit != null)
                         {
                             topPanelUnit.AddItem(ability);
                         }
                     }
                 }
             }
             else if (ability.IsUltimate && !ability.IsStolen)
             {
                 foreach (TopPanelUnit topPanelUnit2 in this.units)
                 {
                     if (topPanelUnit2 != null)
                     {
                         topPanelUnit2.SetUltimate(ability);
                     }
                 }
             }
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
     }
 }
 // Token: 0x060000D0 RID: 208 RVA: 0x00008918 File Offset: 0x00006B18
 private void OnDraw(IRenderer renderer)
 {
     try
     {
         for (int i = 0; i < this.units.Length; i++)
         {
             TopPanelUnit topPanelUnit = this.units[i];
             if (topPanelUnit != null && topPanelUnit.IsValid)
             {
                 float screenRatio = O9K.Core.Helpers.Hud.Info.ScreenRatio;
                 topPanelUnit.DrawRunes(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 7f * screenRatio, 0f));
                 if (topPanelUnit.IsAlly)
                 {
                     float num = 0f;
                     if (this.showAllyHealth)
                     {
                         topPanelUnit.DrawAllyHealth(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 7f * screenRatio, 0f));
                         num += 7f * screenRatio;
                     }
                     if (this.showAllyMana)
                     {
                         topPanelUnit.DrawAllyMana(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 7f * screenRatio, num));
                         num += 7f * screenRatio;
                     }
                     if (this.showAllyUlt && topPanelUnit.DrawUltimate(renderer, this.topPanel.GetPlayersUltimatePosition(i, 16f * screenRatio, 0f), this.showUltCd ? this.topPanel.GetPlayersUltimatePosition(i, 42f * screenRatio, num + 28f * screenRatio) : Rectangle9.Zero, this.showUltCdTime))
                     {
                         num += 50f * screenRatio;
                     }
                     if (this.showAllyItems)
                     {
                         topPanelUnit.DrawItems(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 15f * screenRatio, num + 5f * screenRatio));
                     }
                 }
                 else
                 {
                     topPanelUnit.DrawBuyback(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 28f * screenRatio, 0f));
                     if (this.showFowTime)
                     {
                         topPanelUnit.DrawFowTime(renderer, this.topPanel.GetPlayerPosition(i));
                     }
                     float num2 = 0f;
                     if (this.showEnemyHealth)
                     {
                         topPanelUnit.DrawEnemyHealth(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 7f * screenRatio, 0f));
                         num2 += 7f * screenRatio;
                     }
                     if (this.showEnemyMana)
                     {
                         topPanelUnit.DrawEnemyMana(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 7f * screenRatio, num2));
                         num2 += 7f * screenRatio;
                     }
                     if (this.showEnemyUlt && topPanelUnit.DrawUltimate(renderer, this.topPanel.GetPlayersUltimatePosition(i, 16f * screenRatio, 0f), this.showUltCd ? this.topPanel.GetPlayersUltimatePosition(i, 42f * screenRatio, num2 + 28f * screenRatio) : Rectangle9.Zero, this.showUltCdTime))
                     {
                         num2 += 50f * screenRatio;
                     }
                     if (this.showEnemyItems)
                     {
                         topPanelUnit.DrawItems(renderer, this.topPanel.GetPlayersHealthBarPosition(i, 15f * screenRatio, num2 + 5f * screenRatio));
                     }
                 }
             }
         }
     }
     catch (InvalidOperationException)
     {
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
     }
 }