In french, the keyword "fabule" used for detection is never at the beginning of the enemy name (the adjective "fabuleux" or "fabuleuse" comes after the noun).
To fix it in my version, I had to retrieve your previous code before the factorization into markerCheck(), that uses :find rather than a comparison.
function AH.FabledCheck()
local extantMarker = GetUnitTargetMarkerType("reticleover")
if (extantMarker == _G.TARGET_MARKER_TYPE_NONE) then
if (GetUnitName("reticleover"):find(fabledText) and not IsUnitDead("reticleover")) then
local marker = getAvailableMarker()
AssignTargetMarkerToReticleTarget(marker)
end
elseif (extantMarker ~= _G.TARGET_MARKER_TYPE_EIGHT) then
-- sanity check
local index = getMarkerIndex(extantMarker)
if ((not GetUnitName("reticleover"):find(fabledText)) and (not AH.MARKERS[index].manual)) then
AssignTargetMarkerToReticleTarget(extantMarker)
makeMarkerAvailable(extantMarker)
end
end
end
Either this, or using only :find in function markerCheck (at the cost of bad perfs?), or adding a parameter to markerCheck() to choose the keyword detection method between :find and equality test.
In french, the keyword "fabule" used for detection is never at the beginning of the enemy name (the adjective "fabuleux" or "fabuleuse" comes after the noun).
To fix it in my version, I had to retrieve your previous code before the factorization into markerCheck(), that uses :find rather than a comparison.
Either this, or using only :find in function markerCheck (at the cost of bad perfs?), or adding a parameter to markerCheck() to choose the keyword detection method between :find and equality test.