-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kyle Pullicino
committed
Dec 10, 2016
0 parents
commit 2827da4
Showing
873 changed files
with
14,368 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
##Interface: 40200 | ||
##Name: Battle Herald | ||
##Notes: Battle Herald adds a number of features to enhance your battleground/PvP experience. | ||
##SavedVariables: BattleHerald_UserOptions | ||
##Version: 1.04 | ||
##Author: Klishu | ||
BattleHerald_Strings.lua | ||
BattleHerald_SlashCommands.lua | ||
BattleHerald_Main.xml | ||
TextAlerts\BattleHerald_TextEngine.xml | ||
SoundAlerts\BattleHerald_SoundEngine.xml | ||
BattleHerald_TriggerList.lua | ||
BattleHerald_TriggerSystem.lua | ||
WorldFrames\BattleHerald_WorldFrame.xml | ||
ScoreAlerts\BattleHerald_ScoreAlerts.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--[[ | ||
BattleHerald_Main.lua | ||
Starting point for the addon | ||
]]-- | ||
|
||
local BH_VERSION_INFO = 1.04; | ||
local NEWVERSION = false; | ||
|
||
function BattleHerald_MainFrameLoad(self) | ||
|
||
self:RegisterEvent("VARIABLES_LOADED"); | ||
self:RegisterEvent("PLAYER_ENTERING_WORLD"); | ||
self:RegisterEvent("PLAYER_ENTERING_BATTLEFIELD"); | ||
self:RegisterEvent("PARTY_MEMBERS_CHANGED"); | ||
self:RegisterEvent("CHAT_MSG_ADDON"); | ||
RegisterAddonMessagePrefix("BHVerInfo"); | ||
|
||
end | ||
|
||
function BattleHerald_MainFrameEvent(self, event, ...) | ||
|
||
if (event == "CHAT_MSG_ADDON") then | ||
if (arg1 == "BHVerInfo") then | ||
BattleHerald_HandleVersionInfo(arg2, arg4, arg3); | ||
end | ||
elseif (event == "VARIABLES_LOADED") then | ||
BattleHerald_InitializeUserOptions(); | ||
BattleHerald_CreateUserOptionsPanels(); | ||
|
||
ChatFrame1:AddMessage("Battle Herald Loaded."); | ||
elseif (event == "PLAYER_ENTERING_WORLD") then | ||
if (IsInGuild()) then | ||
BattleHerald_PostVersionInfo("GUILD"); | ||
end | ||
elseif (event == "PLAYER_ENTERING_BATTLEGROUND") then | ||
BattleHerald_PostVersionInfo("BATTLEGROUND"); | ||
elseif (event == "PARTY_MEMBERS_CHANGED") then | ||
if (GetRealNumRaidMembers() > 1) then | ||
BattleHerald_PostVersionInfo("RAID"); | ||
elseif (GetRealNumPartyMembers() > 1) then | ||
BattleHerald_PostVersionInfo("PARTY"); | ||
end | ||
end | ||
|
||
end | ||
|
||
function BattleHerald_IsInBattlefield() | ||
|
||
local zone = GetInstanceInfo(); | ||
if (zone == "Warsong Gulch" or zone == "Arathi Basin" | ||
or zone == "Alterac Valley" or zone == "Isle of Conquest" | ||
or zone == "Eye of the Storm" or zone == "Strand of the Ancients" | ||
or zone == "The Battle for Gilneas" or zone == "Twin Peaks") then | ||
return true; | ||
else | ||
zone = GetRealZoneText(); | ||
if (zone == "Wintergrasp" or zone == "Tol Barad") then | ||
return true; | ||
else | ||
return false; | ||
end | ||
end | ||
|
||
end | ||
|
||
function BattleHerald_PostVersionInfo(channel, target) | ||
|
||
SendAddonMessage("BHVerInfo", BH_VERSION_INFO, channel, target); | ||
|
||
end | ||
|
||
function BattleHerald_HandleVersionInfo(msg, author, channel) | ||
|
||
local recNumber = tonumber(msg); | ||
|
||
if (recNumber > BH_VERSION_INFO) then | ||
if (not NEWVERSION) then | ||
NEWVERSION = true; | ||
DEFAULT_CHAT_FRAME:AddMessage(BHSTR_NEW_VERSION); | ||
end | ||
elseif (recNumber < BH_VERSION_INFO) then | ||
BattleHerald_PostVersionInfo("WHISPER", author); | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ | ||
..\FrameXML\UI.xsd"> | ||
<Script file="BattleHerald_UserOptions.lua"/> | ||
<Script file="BattleHerald_Main.lua"/> | ||
|
||
<Frame name="BattleHerald_MainFrame"> | ||
<Scripts> | ||
<OnLoad function="BattleHerald_MainFrameLoad"/> | ||
<OnEvent function="BattleHerald_MainFrameEvent"/> | ||
</Scripts> | ||
</Frame> | ||
</Ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Add slash command handlers in this function for the /bh or /battleherald commands | ||
BattleHerald_SlashCommands = { } | ||
|
||
function BattleHerald_HandleSlashCommand(msg) | ||
|
||
if (BattleHerald_SlashCommands[msg]) then | ||
BattleHerald_SlashCommands[msg](msg); | ||
end | ||
|
||
end | ||
|
||
SlashCmdList["BATTLE_HERALD"] = BattleHerald_HandleSlashCommand; | ||
SLASH_BATTLE_HERALD1 = "/bh"; | ||
SLASH_BATTLE_HERALD2 = "/battleherald"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--[[ | ||
BattleHerald_String.lua | ||
Contains the UI strings depending on the locale. | ||
Trigger texts should be localized in the Triggers file. | ||
]]-- | ||
|
||
-- UI | ||
BHSTR_BATTLE_HERALD = "Battle Herald"; | ||
BHSTR_ALLIANCE = "Alliance"; | ||
BHSTR_HORDE = "Horde"; | ||
BHSTR_SOUND_ALERTS = "Sound Alerts"; | ||
BHSTR_TEXT_ALERTS = "Text Alerts"; | ||
BHSTR_BATTLEGROUND_UI = "Battleground UI"; | ||
BHSTR_SOUND_ALERTS_DESCRIPTION = "Select which sound alerts Battle Herald plays."; | ||
BHSTR_TEXT_ALERTS_DESCRIPTION = "Select which text alerts Battle Herald shows."; | ||
BHSTR_BATTLEGROUND_UI_DESCRIPTION = "Configures the UI that appears inside Battlegrounds."; | ||
BHSTR_NEW_VERSION = "A new version of |cFF0000FFBattle Herald|r is available! Visit |cFF0000FFhttp://www.wowinterface.com/|r to get the new version!"; | ||
BHSTR_WORLD_FRAME_UI_SCALE = "Battleground Info UI Scale"; | ||
BHSTR_UI_DRAG_ENABLED = "The Battle Herald information UI has been unlocked."; | ||
BHSTR_UI_DRAG_DISABLED = "The Battle Herald information UI has been locked."; | ||
BHSTR_UI_RESET = "The Battle Herald information UI has been reset."; | ||
|
||
BHSTR_RESOURCES = "Resources"; | ||
BHSTR_REINFORCEMENTS = "Reinforcements"; | ||
BHSTR_POINTS = "Points"; | ||
|
||
BHSTR_WARSONG_GULCH_UI = "Warsong Gulch UI"; | ||
BHSTR_ARATHI_BASIN_UI = "Arathi Basin UI"; | ||
BHSTR_ALTERAC_VALLEY_UI = "Alterac Valley UI"; | ||
BHSTR_EYE_OF_THE_STORM_UI = "Eye of the Storm UI"; | ||
BHSTR_ISLE_OF_CONQUEST_UI = "Isle of Conquest UI"; | ||
BHSTR_THE_BATTLE_FOR_GILNEAS_UI = "The Battle for Gilneas UI"; | ||
BHSTR_TWIN_PEAKS_UI = "Twin Peaks UI"; | ||
|
||
BHSTR_WARSONG_GULCH_ALERTS = "Warsong Gulch Alerts"; | ||
BHSTR_WARSONG_GULCH_SCORES = "Warsong Gulch Scores"; | ||
BHSTR_ARATHI_BASIN_ALERTS = "Arathi Basin Alerts"; | ||
BHSTR_ARATHI_BASIN_SCORES = "Arathi Basin Scores"; | ||
BHSTR_ALTERAC_VALLEY_ALERTS = "Alterac Valley Alerts"; | ||
BHSTR_EYE_OF_THE_STORM_ALERTS = "Eye of the Storm Alerts"; | ||
BHSTR_STRAND_OF_THE_ANCIENTS_ALERTS = "Strand of the Ancients Alerts"; | ||
BHSTR_ISLE_OF_CONQUEST_ALERTS = "Isle of Conquest Alerts"; | ||
BHSTR_THE_BATTLE_FOR_GILNEAS_ALERTS = "The Battle for Gilneas Alerts"; | ||
BHSTR_TWIN_PEAKS_ALERTS = "Twin Peaks Alerts"; | ||
BHSTR_TWIN_PEAKS_SCORES = "Twin Peaks Scores"; | ||
BHSTR_WINTERGRASP_ALERTS = "Wintergrasp Alerts"; | ||
BHSTR_TOL_BARAD_ALERTS = "Tol Barad Alerts"; | ||
|
||
-- Battleground names | ||
BHSTR_WARSONG_GULCH = "Warsong Gulch"; | ||
BHSTR_ARATHI_BASIN = "Arathi Basin"; | ||
BHSTR_ALTERAC_VALLEY = "Alterac Valley"; | ||
BHSTR_EYE_OF_THE_STORM = "Eye of the Storm"; | ||
BHSTR_STRAND_OF_THE_ANCIENTS = "Strand of the Ancients"; | ||
BHSTR_ISLE_OF_CONQUEST = "Isle of Conquest"; | ||
BHSTR_TWIN_PEAKS = "Twin Peaks"; | ||
BHSTR_THE_BATTLE_FOR_GILNEAS = "The Battle for Gilneas"; | ||
|
||
BHSTR_STABLES = "Stables"; | ||
BHSTR_LUMBER_MILL = "Lumber Mill"; | ||
BHSTR_GOLD_MINE = "Gold Mine"; | ||
BHSTR_BLACKSMITH = "Blacksmith"; | ||
BHSTR_FARM = "Farm"; | ||
|
||
BHSTR_LIGHTHOUSE = "Lighthouse"; | ||
BHSTR_WATERWORKS = "Waterworks"; | ||
BHSTR_MINES = "Mines"; | ||
|
||
BHSTR_MAGE_TOWER = "Mage Tower"; | ||
BHSTR_DRAENEI_RUINS = "Draenei Ruins"; | ||
BHSTR_BLOOD_ELF_TOWER = "Blood Elf Tower"; | ||
BHSTR_FEL_REAVER_RUINS = "Fel Reaver Ruins"; | ||
|
||
BHSTR_DOCKS = "Docks"; | ||
BHSTR_QUARRY = "Quarry"; | ||
BHSTR_HANGAR = "Hangar"; | ||
BHSTR_WORKSHOP = "Workshop"; | ||
BHSTR_REFINERY = "Refinery"; | ||
|
||
BH_TOGGLECOMMMENU = "Toggle Battle Herald Comm List"; |
Oops, something went wrong.