@@ -14,6 +14,177 @@ function Data:GetMeleeAttackPower()
14
14
return melee + posBuff + negBuff
15
15
end
16
16
17
+ --- @param creature number
18
+ --- @return string
19
+ function Data :GetMeleeAttackPowerVsCreature (creature )
20
+ local dmg = 0
21
+ if creature == Data .UNDEAD then
22
+ -- auras
23
+ if C_UnitAuras .GetPlayerAuraBySpellID (24833 ) then dmg = dmg + 300 end -- holy mightstone
24
+ if C_UnitAuras .GetPlayerAuraBySpellID (17352 ) then dmg = dmg + 200 end -- Argent Avenger
25
+ -- items
26
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_30 ) do
27
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 30 end
28
+ end
29
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_45 ) do
30
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 45 end
31
+ end
32
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_60 ) do
33
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 60 end
34
+ end
35
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_81 ) do
36
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 81 end
37
+ end
38
+ if C_Item .IsEquippedItem (13209 ) then dmg = dmg + 81 end -- Seal of the Dawn
39
+ -- weapons
40
+ for i = 16 , 17 do
41
+ local itemId , _ = GetInventoryItemID (" player" , i )
42
+ if itemId and itemId == 13017 then dmg = dmg + 66 end -- Hellslayer Battle Axe
43
+ end
44
+ --
45
+ if ECS .IsSod then
46
+ -- items
47
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_45_SOD ) do
48
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 45 end
49
+ end
50
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_60_SOD ) do
51
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 60 end
52
+ end
53
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_81_SOD ) do
54
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 81 end
55
+ end
56
+ for _ , i in pairs (Data .itemIds .UNDEAD_SLAYER_108_SOD ) do
57
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 108 end
58
+ end
59
+ if C_Item .IsEquippedItem (209574 ) then dmg = dmg + 15 end -- Discarded Tenets of the Silver Hand
60
+ -- weapons
61
+ for i = 16 , 17 do
62
+ local itemId , _ = GetInventoryItemID (" player" , i )
63
+ if itemId then
64
+ if itemId == 220575 then dmg = dmg + 39 -- Eater of the Damned
65
+ elseif itemId == 228030 then dmg = dmg + 30 end -- Malicious Axe
66
+ end
67
+ end
68
+ end
69
+ elseif creature == Data .DEMON then
70
+ -- auras
71
+ if C_UnitAuras .GetPlayerAuraBySpellID (11406 ) then dmg = dmg + 265 end -- Elixir of Demonslaying
72
+ -- items
73
+ for _ , i in pairs (Data .itemIds .DEMON_SLAYING_33 ) do
74
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 33 end
75
+ end
76
+ for _ , i in pairs (Data .itemIds .DEMON_SLAYING_45 ) do
77
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 45 end
78
+ end
79
+ -- weapons
80
+ for i = 16 , 17 do
81
+ local itemId , _ = GetInventoryItemID (" player" , i )
82
+ if itemId then
83
+ if itemId == 10698 then dmg = dmg + 78 -- Enchanted Azsharite Felbane Staff
84
+ elseif itemId == 13044 then dmg = dmg + 99 -- Demonslayer
85
+ elseif itemId == 19963 then dmg = dmg + 117 end -- Pitchfork of Madness
86
+ end
87
+ end
88
+ --
89
+ if ECS .IsSod then
90
+ -- items
91
+ for _ , i in pairs (Data .itemIds .DEMON_SLAYING_141 ) do
92
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 141 end
93
+ end
94
+ -- weapons
95
+ for i = 16 , 17 do
96
+ local itemId , _ = GetInventoryItemID (" player" , i )
97
+ if itemId and itemIds == 228332 then dmg = dmg + 45 end -- Lok'delar, Stave of the Ancient Keepers
98
+ end
99
+ end
100
+ elseif creature == Data .BEAST then
101
+ -- items
102
+ for _ , i in pairs (Data .itemIds .BEAST_SLAYING_24 ) do
103
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 24 end
104
+ end
105
+ for _ , i in pairs (Data .itemIds .BEAST_SLAYING_30 ) do
106
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 30 end
107
+ end
108
+ for _ , i in pairs (Data .itemIds .BEAST_SLAYING_33 ) do
109
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 33 end
110
+ end
111
+ for _ , i in pairs (Data .itemIds .BEAST_SLAYING_60 ) do
112
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 60 end
113
+ end
114
+ if C_Item .IsEquippedItem (16658 ) then dmg = dmg + 18 end -- Wildhunter Cloak
115
+ if C_Item .IsEquippedItem (13212 ) then dmg = dmg + 48 end -- Halycon's Spiked Collar
116
+ -- weapons
117
+ for i = 16 , 17 do
118
+ local itemId , _ = GetInventoryItemID (" player" , i )
119
+ if itemId then
120
+ if itemId == 11907 then dmg = dmg + 72 -- Beastslayer
121
+ elseif itemId == 12709 then dmg = dmg + 45 end -- pip's skinner
122
+ end
123
+ end
124
+ --
125
+ if ECS .IsSod then
126
+ -- items
127
+ for _ , i in pairs (Data .itemIds .BEAST_SLAYING_99 ) do
128
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 99 end
129
+ end
130
+ end
131
+ elseif creature == Data .DRAGONKIN then
132
+ -- weapons
133
+ for i = 16 , 17 do
134
+ local itemId , _ = GetInventoryItemID (" player" , i )
135
+ if itemId then
136
+ if itemId == 19961 then dmg = dmg + 48 -- Gri'lek's Grinder
137
+ elseif itemId == 19962 then dmg = dmg + 117 end -- Gri'lek's Carver
138
+ end
139
+ end
140
+ --
141
+ if ECS .IsSod then
142
+ -- items
143
+ if C_Item .IsEquippedItem (221457 ) then
144
+ dmg = dmg + 36 -- Libram of Draconic Destruction
145
+ end
146
+ for _ , i in pairs (Data .itemIds .DRAGON_SLAYING_60 ) do
147
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 60 end
148
+ end
149
+ for _ , i in pairs (Data .itemIds .DRAGON_SLAYING_141 ) do
150
+ if C_Item .IsEquippedItem (i ) then dmg = dmg + 141 end
151
+ end
152
+ -- weapons
153
+ for i = 16 , 17 do
154
+ local itemId , _ = GetInventoryItemID (" player" , i )
155
+ if itemId and itemId == 220965 then dmg = dmg + 117 end -- Scalebane Greataxe
156
+ end
157
+ end
158
+ elseif creature == Data .ELEMENTAL then
159
+ -- weapons
160
+ for i = 16 , 17 do
161
+ local itemId , _ = GetInventoryItemID (" player" , i )
162
+ if itemId and itemId == 18310 then dmg = dmg + 36 end -- Fiendish Machete
163
+ end
164
+ --
165
+ if ECS .IsSod then
166
+ -- weapons
167
+ for i = 16 , 17 do
168
+ local itemId , _ = GetInventoryItemID (" player" , i )
169
+ if itemId then
170
+ if itemId == 228056 then dmg = dmg + 36 -- Fiendish Machete
171
+ elseif itemId == 228486 then dmg = dmg + 75 end -- Treant's Bane
172
+ end
173
+ end
174
+ end
175
+ elseif creature == Data .MECHANICAL then
176
+ if ECS .IsSod then
177
+ -- items
178
+ if C_Item .IsEquippedItem (213319 ) then dmg = dmg + 30 end -- Machinist's Gloves
179
+ end
180
+ end
181
+ if creature == Data .UNDEAD or creature == Data .DEMON then
182
+ -- items
183
+ if C_Item .IsEquippedItem (29113 ) then dmg = dmg + 150 end -- Champion of the Dawn
184
+ if ECS .IsSod and C_Item .IsEquippedItem (1219522 ) then dmg = dmg + 157 end -- Champion of the Dawn
185
+ end
186
+ end
187
+
17
188
--- @return string
18
189
function Data :GetMeleeAttackSpeedMainHand ()
19
190
local mainHand , _ = UnitAttackSpeed (" player" )
0 commit comments