Details | Compare with Previous | View Log
Line No. | Rev | Author | Line |
---|---|---|---|
1 | 2 | Wildbreath-135052 | local settings = oUF_Settings |
2 | Wildbreath-135052 | ||
3 | Wildbreath-135052 | local startx, endx = 285, 285 |
|
4 | Wildbreath-135052 | local starty, endy = 500, 250 |
|
5 | Wildbreath-135052 | local Scale = 0.8 |
|
6 | Wildbreath-135052 | local locations = { |
|
7 | Wildbreath-135052 | startX = startx / Scale, |
|
8 | Wildbreath-135052 | endX = endx / Scale, |
|
9 | Wildbreath-135052 | startY = starty / Scale, |
|
10 | Wildbreath-135052 | endY = endy / Scale, |
|
11 | Wildbreath-135052 | } |
|
12 | Wildbreath-135052 | ||
13 | Wildbreath-135052 | ||
14 | Wildbreath-135052 | local function OnEvent(self, event, addon) |
|
15 | Wildbreath-135052 | if(addon=="Blizzard_CombatText") then |
|
16 | Wildbreath-135052 | CombatTextFont:SetFont("Fonts\\FRIZQT__.TTF", 25, "THINOUTLINE") |
|
17 | Wildbreath-135052 | CombatTextFont:SetShadowColor(0.19, 0.19, 0.19, 0) |
|
18 | Wildbreath-135052 | ||
19 | Wildbreath-135052 | COMBAT_TEXT_DEFLECT = "Deflect" |
|
20 | Wildbreath-135052 | COMBAT_TEXT_REFLECT = "Reflect" |
|
21 | Wildbreath-135052 | COMBAT_TEXT_IMMUNE = "Immune" |
|
22 | Wildbreath-135052 | COMBAT_TEXT_RESIST = "Resist" |
|
23 | Wildbreath-135052 | COMBAT_TEXT_ABSORB = "Absorb" |
|
24 | Wildbreath-135052 | COMBAT_TEXT_BLOCK = "Block" |
|
25 | Wildbreath-135052 | COMBAT_TEXT_DODGE = "Dodge" |
|
26 | Wildbreath-135052 | COMBAT_TEXT_PARRY = "Parry" |
|
27 | Wildbreath-135052 | COMBAT_TEXT_EVADE = "Evade" |
|
28 | Wildbreath-135052 | COMBAT_TEXT_MISS = "Miss" |
|
29 | Wildbreath-135052 | ||
30 | Wildbreath-135052 | DEFLECT = "Deflect" |
|
31 | Wildbreath-135052 | REFLECT = "Reflect" |
|
32 | Wildbreath-135052 | IMMUNE = "Immune" |
|
33 | Wildbreath-135052 | RESIST = "Resist" |
|
34 | Wildbreath-135052 | ABSORB = "Absorb" |
|
35 | Wildbreath-135052 | BLOCK = "Block" |
|
36 | Wildbreath-135052 | DODGE = "Dodge" |
|
37 | Wildbreath-135052 | PARRY = "Parry" |
|
38 | Wildbreath-135052 | EVADE = "Evade" |
|
39 | Wildbreath-135052 | MISS = "Miss" |
|
40 | Wildbreath-135052 | ||
41 | Wildbreath-135052 | BLOCK_TRAILER = "(Block %d)" |
|
42 | Wildbreath-135052 | ABSORB_TRAILER = "(Absorb %d)" |
|
43 | Wildbreath-135052 | RESIST_TRAILER = "(Resist %d)" |
|
44 | Wildbreath-135052 | ||
45 | Wildbreath-135052 | ENTERING_COMBAT = "++COMBAT++" |
|
46 | Wildbreath-135052 | LEAVING_COMBAT = "--COMBAT--" |
|
47 | Wildbreath-135052 | ||
48 | Wildbreath-135052 | COMBAT_TEXT_SCROLLSPEED = 3.2 |
|
49 | Wildbreath-135052 | ||
50 | Wildbreath-135052 | function CombatText_UpdateDisplayedMessages() |
|
51 | Wildbreath-135052 | if ( UnitHasVehicleUI("player") ) then |
|
52 | Wildbreath-135052 | CombatText.unit = "vehicle" |
|
53 | Wildbreath-135052 | else |
|
54 | Wildbreath-135052 | CombatText.unit = "player" |
|
55 | Wildbreath-135052 | end |
|
56 | Wildbreath-135052 | CombatTextSetActiveUnit(CombatText.unit) |
|
57 | Wildbreath-135052 | ||
58 | Wildbreath-135052 | CombatText:SetScale(Scale) |
|
59 | Wildbreath-135052 | CombatTextFont:SetFont(settings.font, 23, "THINOUTLINE") |
|
60 | Wildbreath-135052 | ||
61 | Wildbreath-135052 | CombatText:RegisterEvent("COMBAT_TEXT_UPDATE") |
|
62 | Wildbreath-135052 | CombatText:RegisterEvent("UNIT_HEALTH") |
|
63 | Wildbreath-135052 | CombatText:RegisterEvent("UNIT_MANA") |
|
64 | Wildbreath-135052 | CombatText:RegisterEvent("PLAYER_REGEN_DISABLED") |
|
65 | Wildbreath-135052 | CombatText:RegisterEvent("PLAYER_REGEN_ENABLED") |
|
66 | Wildbreath-135052 | CombatText:RegisterEvent("PLAYER_COMBO_POINTS") |
|
67 | Wildbreath-135052 | CombatText:RegisterEvent("RUNE_POWER_UPDATE") |
|
68 | Wildbreath-135052 | CombatText:RegisterEvent("UNIT_ENTERED_VEHICLE") |
|
69 | Wildbreath-135052 | CombatText:RegisterEvent("UNIT_EXITING_VEHICLE") |
|
70 | Wildbreath-135052 | ||
71 | Wildbreath-135052 | COMBAT_TEXT_Y_SCALE = WorldFrame:GetHeight() / 768 |
|
72 | Wildbreath-135052 | COMBAT_TEXT_X_SCALE = WorldFrame:GetWidth() / 1024 |
|
73 | Wildbreath-135052 | COMBAT_TEXT_SPACING = 10 * COMBAT_TEXT_Y_SCALE |
|
74 | Wildbreath-135052 | COMBAT_TEXT_MAX_OFFSET = 130 * COMBAT_TEXT_Y_SCALE |
|
75 | Wildbreath-135052 | COMBAT_TEXT_X_ADJUSTMENT = 80 * COMBAT_TEXT_X_SCALE |
|
76 | Wildbreath-135052 | ||
77 | Wildbreath-135052 | for index, value in pairs(COMBAT_TEXT_TYPE_INFO) do |
|
78 | Wildbreath-135052 | if ( value.var ) then |
|
79 | Wildbreath-135052 | if ( getglobal(value.var) == "1" ) then |
|
80 | Wildbreath-135052 | value.show = 1; |
|
81 | Wildbreath-135052 | else |
|
82 | Wildbreath-135052 | value.show = nil; |
|
83 | Wildbreath-135052 | end |
|
84 | Wildbreath-135052 | end |
|
85 | Wildbreath-135052 | end |
|
86 | Wildbreath-135052 | ||
87 | Wildbreath-135052 | COMBAT_TEXT_SCROLL_FUNCTION = CombatText_StandardScroll |
|
88 | Wildbreath-135052 | COMBAT_TEXT_LOCATIONS = locations |
|
89 | Wildbreath-135052 | ||
90 | Wildbreath-135052 | CombatText_ClearAnimationList() |
|
91 | Wildbreath-135052 | end |
|
92 | Wildbreath-135052 | ||
93 | Wildbreath-135052 | self:UnregisterEvent"ADDON_LOADED" |
|
94 | Wildbreath-135052 | OnEvent = nil |
|
95 | Wildbreath-135052 | end |
|
96 | Wildbreath-135052 | end |
|
97 | Wildbreath-135052 | ||
98 | Wildbreath-135052 | local eventframe = CreateFrame"Frame" |
|
99 | Wildbreath-135052 | eventframe:RegisterEvent"ADDON_LOADED" |
|
100 | Wildbreath-135052 | eventframe:SetScript("OnEvent", OnEvent) |
|
101 | Wildbreath-135052 | ||
102 | Wildbreath-135052 | if IsAddOnLoaded"Blizzard_CombatText" then OnEvent(eventframe, "ADDON_LOADED", "Blizzard_CombatText") end |