Nos partenaires et nous-mêmes utilisons différentes technologies, telles que les cookies, pour personnaliser les contenus et les publicités, proposer des fonctionnalités sur les réseaux sociaux et analyser le trafic. Merci de cliquer sur le bouton ci-dessous pour donner votre accord. Vous pouvez changer d’avis et modifier vos choix à tout moment. Informations RGPD
function SmartCastFriend(spell) local haveTarget = UnitExists("target") local target = "player" local f = GetMouseFocus() if (UnitIsVisible("mouseover") and UnitReaction("mouseover", "player") >= 5) then target = "mouseover" elseif (UnitIsVisible(f.unit) and UnitReaction(f.unit, "player") >= 5) then target = f.unit elseif (UnitIsVisible("target") and UnitReaction("target", "player") >= 5) then target = "target" end if (UnitIsUnit(target, "target")) then CastSpellByName(spell) else TargetUnit(target) CastSpellByName(spell) if (haveTarget) then TargetLastTarget() else ClearTarget() end end end