Beispiel #1
0
		public CombatTrackerGUI(CombatTracker combatTracker, HudList monsterList, HudList damageInfoList)
		{
			try
			{
				if (combatTracker == null)
					return;

				this.combatTracker = combatTracker;
				this.monsterList = monsterList;

				combatTrackerGUIInfo = new CombatTrackerGUIInfo(damageInfoList);

				monsterList.ClearColumnsAndRows();

				// Each character is a max of 6 pixels wide
				monsterList.AddColumn(typeof(HudStaticText), 5, null);
				monsterList.AddColumn(typeof(HudStaticText), 111, null);
				monsterList.AddColumn(typeof(HudStaticText), 37, null);
				monsterList.AddColumn(typeof(HudStaticText), 55, null); // This cannot go any smaller without pruning text
				monsterList.AddColumn(typeof(HudStaticText), 77, null);

				HudList.HudListRowAccessor newRow = monsterList.AddRow();
				((HudStaticText)newRow[2]).Text = "KB's";
				((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).Text = "Dmg Rcvd";
				((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[4]).Text = "Dmg Givn";
				((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;

				newRow = monsterList.AddRow();
				((HudStaticText)newRow[0]).Text = "*";
				((HudStaticText)newRow[1]).Text = "All";
				((HudStaticText)newRow[2]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[3]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				((HudStaticText)newRow[4]).TextAlignment = VirindiViewService.WriteTextFormats.Right;
				
				selectedRow = 1;

				monsterList.Click += new HudList.delClickedControl(monsterList_Click);

				combatTracker.InfoCleared += new Action<bool>(combatTracker_InfoCleared);
				combatTracker.StatsLoaded += new Action<List<CombatInfo>>(combatTracker_StatsLoaded);
				combatTracker.CombatInfoUpdated += new Action<CombatInfo>(combatTracker_CombatInfoUpdated);
				combatTracker.AetheriaInfoUpdated += new Action<AetheriaInfo>(combatTracker_AetheriaInfoUpdated);
				combatTracker.CloakInfoUpdated += new Action<CloakInfo>(combatTracker_CloakInfoUpdated);
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
Beispiel #2
0
		/// <summary>
		/// This is called when the plugin is started up. This happens only once.
		/// We init most of our objects here, EXCEPT ones that depend on other assemblies (not counting decal assemblies).
		/// </summary>
		protected override void Startup()
		{
			try
			{
				Current = this;

				Debug.Init(PluginPersonalFolder.FullName + @"\Exceptions.txt", PluginName);
				Mag.Shared.Settings.SettingsFile.Init(PluginPersonalFolder.FullName + @"\" + PluginName + ".xml", PluginName);

				CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete);
				CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete_VTClassic);
				CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete_VTank);
				CoreManager.Current.PluginInitComplete += new EventHandler<EventArgs>(Current_PluginInitComplete_VVS);
				CoreManager.Current.CharacterFilter.LoginComplete += new EventHandler(CharacterFilter_LoginComplete_VHS);
				CoreManager.Current.CharacterFilter.LoginComplete += new EventHandler(CharacterFilter_LoginComplete);
				CoreManager.Current.CharacterFilter.Logoff += new EventHandler<Decal.Adapter.Wrappers.LogoffEventArgs>(CharacterFilter_Logoff);
				CoreManager.Current.CommandLineText += new EventHandler<ChatParserInterceptEventArgs>(Current_CommandLineText);


				// General
				inventoryExporter = new InventoryExporter();
				inventoryLogger = new InventoryLogger();
				idleActionManager = new IdleActionManager();

				// Macros
				loginActions = new LoginActions();
				periodicCommands = new PeriodicCommands();
				openMainPackOnLogin = new OpenMainPackOnLogin();
				maximizeChatOnLogin = new MaximizeChatOnLogin();
				autoPercentConfirmation = new AutoPercentConfirmation();
				autoRecharge = new AutoRecharge();
				autoTradeAccept = new AutoTradeAccept();
				oneTouchHeal = new OneTouchHeal();
				logOutOnDeath = new LogOutOnDeath();

				// Trackers
				equipmentTracker = new Trackers.Equipment.EquipmentTracker();
				combatTrackerCurrent = new Trackers.Combat.CombatTracker();
				combatTrackerPersistent = new Trackers.Combat.CombatTracker();
				corpseTracker = new Trackers.Corpse.CorpseTracker();
				playerTracker = new Trackers.Player.PlayerTracker();
				consumableTracker = new Trackers.Consumable.ConsumableTracker();

				// Loggers
				chatLogger = new Loggers.Chat.ChatLogger();
				chatLogFileWriter = new Loggers.Chat.BufferedChatLogFileWriter(null, chatLogger, TimeSpan.FromMinutes(10));

				// Misc
				windowFrameRemover = new WindowFrameRemover();
				windowMover = new WindowMover();
				noFocusFPSManager = new NoFocusFPSManager();


				savePersistentStatsTimer.Interval = 600000; // Set the timer to run once every 10 minutes
				savePersistentStatsTimer.Tick += new EventHandler(SavePersistentStatsTimer_Tick);
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}