As an AI language model, I will provide a high-level overview of the steps involved in creating an addon for World of Warcraft Classic that displays an enemy's casting spell, casting time, and target.
Step 1: Set up your development environment
To start building an addon for WoW Classic, you’ll need to have a text editor installed on your computer. Some popular options include Visual Studio Code, Sublime Text, or Atom. Additionally, you will need to install the WoW Classic game, which you can purchase from the Blizzard website.
Step 2: Choose a programming language
WoW addons are written in Lua, a simple programming language that is easy to learn.
Step 3: Create a new addon project
In your text editor, create a new folder and name it after your addon. Within the new folder, create a file named "addonname.toc" (replace addonname with your addon’s actual name). This file tells WoW about your addon and lists all the other files that your addon uses.
Step 4: Create the user interface (UI)
Create a new file in your addon’s folder called "addonname.lua." This file will contain all the code that creates your addon’s UI. You will need to use WoW’s built-in UI elements like buttons, frames, and text boxes.
Step 5: Track spellcasts
To track an enemy’s spellcast, you’ll need to hook into WoW’s combat log. You can do this using the "COMBAT_LOG_EVENT_UNFILTERED" event. When an enemy casts a spell, WoW will send a combat log event with all the information about the spellcast. You will then need to extract the relevant data (spell name, casting time, and target) and display it in your addon’s UI.
Step 6: Display the information
Using the data you extracted from the combat log event, you can display the spell name, casting time, and target in your addon’s UI. You may also want to add additional functionality like sound effects or visual cues to give players a better understanding of what’s happening.
Step 7: Test your addon
Once your addon is complete, you’ll want to test it to make sure it works correctly. Load up WoW Classic and enable your addon in the game’s interface menu. Test your addon in different combat scenarios to ensure that it displays the correct information in all situations.
In conclusion, creating an addon that shows an enemy's casting spell, casting time, and target involves setting up a development environment, creating a user interface, hooking into WoW's combat log, displaying the information, and testing the addon in-game. The process can be a lot of work, but the end result can enhance gameplay and give players an advantage in combat.