Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function BattlegroundTargets:CheckFaction()
- local faction = UnitFactionGroup("player")
- if faction == "Horde" then
- playerFactionDEF = 0 -- Horde
- oppositeFactionDEF = 1 -- Alliance
- -- BattlegroundTargets:UnregisterEvent("NEUTRAL_FACTION_SELECT_RESULT")
- elseif faction == "Alliance" then
- playerFactionDEF = 1 -- Alliance
- oppositeFactionDEF = 0 -- Horde
- -- BattlegroundTargets:UnregisterEvent("NEUTRAL_FACTION_SELECT_RESULT")
- elseif faction == "Neutral" then
- playerFactionDEF = 2 -- Neutral (eg.: Pandaren)
- oppositeFactionDEF = 2 -- Neutral (eg.: Pandaren)
- -- BattlegroundTargets:RegisterEvent("NEUTRAL_FACTION_SELECT_RESULT")
- else
- --Print("ERROR", "unknown faction", locale, faction)
- playerFactionDEF = 1 -- Dummy
- oppositeFactionDEF = 0 -- Dummy
- end
- playerFactionBG = playerFactionDEF
- oppositeFactionBG = oppositeFactionDEF
- if playerFactionDEF == 0 then -- setup_flag_texture
- Textures.flagTexture = "Interface\\WorldStateFrame\\HordeFlag"
- Textures.cartTexture = "Interface\\Minimap\\Vehicle-SilvershardMines-MineCartRed"
- if GVAR.FriendSummary and GVAR.FriendSummary.Logo1 then -- summary_flag_texture - 12 - initial reset
- GVAR.FriendSummary.Logo1:SetTexture("Interface\\FriendsFrame\\PlusManz-Horde")
- GVAR.EnemySummary.Logo1:SetTexture("Interface\\FriendsFrame\\PlusManz-Horde")
- GVAR.FriendSummary.Logo2:SetTexture("Interface\\FriendsFrame\\PlusManz-Alliance")
- GVAR.EnemySummary.Logo2:SetTexture("Interface\\FriendsFrame\\PlusManz-Alliance")
- end
- elseif playerFactionDEF == 1 then
- Textures.flagTexture = "Interface\\WorldStateFrame\\AllianceFlag"
- Textures.cartTexture = "Interface\\Minimap\\Vehicle-SilvershardMines-MineCartBlue"
- if GVAR.FriendSummary and GVAR.FriendSummary.Logo1 then -- summary_flag_texture - 12 - initial reset
- GVAR.FriendSummary.Logo1:SetTexture("Interface\\FriendsFrame\\PlusManz-Alliance")
- GVAR.EnemySummary.Logo1:SetTexture("Interface\\FriendsFrame\\PlusManz-Alliance")
- GVAR.FriendSummary.Logo2:SetTexture("Interface\\FriendsFrame\\PlusManz-Horde")
- GVAR.EnemySummary.Logo2:SetTexture("Interface\\FriendsFrame\\PlusManz-Horde")
- end
- else
- Textures.flagTexture = "Interface\\WorldStateFrame\\ColumnIcon-FlagCapture2" -- neutral_flag
- Textures.cartTexture = "Interface\\Minimap\\Vehicle-SilvershardMines-MineCart" -- neutral_flag
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement