View Single Post
04-15-13, 11:13 AM   #36
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
Originally Posted by Resike View Post
if i want to check an event like capped a base with: "CHAT_MSG_BG_SYSTEM_ALLIANCE" or "CHAT_MSG_BG_SYSTEM_HORDE" or "CHAT_MSG_RAID_BOSS_EMOTE", which events gets triggered by another "events".
You should stick with events that are related to the data you're using. If you're using map data, you should trigger from WORLD_MAP_UPDATE or another related event (there's probably a PvP-related update event more specific to base capping) instead of using chat events. Using the wrong events is likely to cause problems for your code at random since the of events firing and data updates won't always be the same. The entire reason for some events is relevant data is guaranteed to have been updated by that time.

For reference, the code that handles the entire Battleground UI (status at the top of the screen and the scoreboard) is WorldStateFrame.lua.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 04-15-13 at 11:21 AM.
  Reply With Quote