cleanup: use plain string.find where possible

This commit is contained in:
shagu
2017-01-02 00:41:47 +01:00
parent 2f22f9e4a2
commit cc0c086ca2
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -204,11 +204,11 @@ pfUI:RegisterModule("nameplates", function ()
-- show indicator for elite/rare mobs
if level:GetText() ~= nil then
if pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "elite" and not string.find(level:GetText(), "+") then
if pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "elite" and not string.find(level:GetText(), "+", 1) then
level:SetText(level:GetText() .. "+")
elseif pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "rareelite" and not string.find(level:GetText(), "R+") then
elseif pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "rareelite" and not string.find(level:GetText(), "R+", 1) then
level:SetText(level:GetText() .. "R+")
elseif pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "rare" and not string.find(level:GetText(), "R") then
elseif pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "rare" and not string.find(level:GetText(), "R", 1) then
level:SetText(level:GetText() .. "R")
end
end