Hey,
OK - as stated above, I am strongly against range being taken into account for the spell decisions, and I think the majority of posters so far are in agreement. However, like I say, I do like the idea of the mod displaying some indication of out-of-rangeness for fights where finding the edge of the hit-box is preferable. As it happens, I've enjoyed playing with this mod, and am in the process of writing a Fury equivalent for my main character's off-spec, as I am entirely new to the wonderful world of warrior DPS. While doing so, I implemented the sort of range checking that I have in mind, so it was natural for me to come back and hack this into my own version of S.H.I.T.
Now I'm not going to ask for these changes to be incorporated into the official version, but I guess it can't hurt to share my tweaks in case others are like-minded.
However, I must make it clear right now, that while I may be able to help with questions regarding these changes, you will be monkeying around with the addon code. If you follow these steps and later have an issue with the mod, I do
not want to hear of Thaeryn being hassled with support queries. Warranty is void if seal is broken! Also, naturally, the changes are version-specific - v1094. No promises on future updates.
Anyway, the changes I made were as follows. In the method:
function SHIT:OnUpdate(elapsed)
I modified the final "else" to become "end", and removed the following "end". So:
...
elseif SHITdb.showon == 3 and GetSpellInfo(SHIT.L["Crusader Strike"]) ~= null then
if UnitClassification("target") ~= "worldboss" then
return
end
end
SHIT:DecideSpells()
end
Then following the line:
SHIT.textureList["current"]:SetTexture(GetSpellTexture(spell))
I added the following code:
SHIT.textureList["current"]:SetVertexColor(1, 1, 1);
local range = IsSpellInRange(spell, "target");
if range ~= nil and range == 0 then
SHIT.textureList["current"]:SetVertexColor(0.8, 0.1, 0.1);
end