Лф Dispel Border 3.3.5a работающий на варе
Лф Dispel Border 3.3.5a работающий на варе
Что то типотакого можно или в своим добавь класс военаPHP код:
-- Purge\dispell --
_,Class=UnitClass("player");
if Class == "SHAMAN" or Class == "PRIEST" or Class == "MAGE" or Class == "WARRIOR" then
b = 'Buff' st = 'Stealable' mM = 'Magic' mB = maxBuffs TFUA = 'TargetFrame_UpdateAuras' PFu = PlayerFrame.unit MTB = MAX_TARGET_BUFFS UB = UnitBuff UIE = UnitIsEnemy
hooksecurefunc(TFUA,function(s) sN=s:GetName() iE=UIE(PFu, s.unit) for i=1,MTB do _,_,ic,_,dT = UB(s.unit,i) fN=sN..b..i if(ic and(not s.mB or i<=s.mB))then fS=_G[fN..st] if(iE and dT==mM)then fS:Show() else fS:Hide()
end
end
end
end)
end
Foximys, можешь скинуть свой диспел бордер с прописаным варом?
- - - Updated - - -
can this class dispel specific enemy buffs (of type t)?
function DispelBorder_CanDispelEnemyType(t)
if (t == "Magic") then
-- once again ignoring mages
-- only show for warriors if prot, and for warlock if fel hunter is out
if (eclass == "HUNTER" or eclass == "PRIEST" or eclass == "SHAMAN" or (eclass == "WARLOCK" and HasDispelPet) or (eclass == "WARRIOR" and GetPrimaryTalentTree() == 3)) then
return true
end
elseif (t == "Enrage") then
if (eclass == "HUNTER" or eclass == "ROGUE" or eclass == "DRUID") then
return true
end
end
return false
end
тут вроде вар вписан
В оригинальном вроде как перезапись с хуком за UnitAura ...
Up. Ищу рабочий на варе.
PHP код:
local _UnitAura = UnitAura
local magic, buff = "Magic", "HALPFUL"
UnitAura = function(...)
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = _UnitAura(...)
if debuffType==magic then
local filter = select(3, ...)
if filter and filter==buff then
isStealable = true
end
end
return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable
end
local _UnitBuff = UnitBuff
UnitBuff = function(...)
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = _UnitBuff(...)
if debuffType==magic then
isStealable = true
end
return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable
end
DreamlØlz, спасибо, помог, не мог бы ты в этом коде прописать проверку только на эними таргет, чтобы у френдов не подсвечивалось?
PHP код:
local _UnitAura = UnitAura
local magic, buff, player = "Magic", "HALPFUL", "player"
UnitAura = function(...)
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = _UnitAura(...)
local unit = ...
if not UnitCanAttack(player, unit) then return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable end
if debuffType==magic then
local filter = select(3, ...)
if filter and filter==buff then
isStealable = true
end
end
return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable
end
local _UnitBuff = UnitBuff
UnitBuff = function(...)
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = _UnitBuff(...)
local unit = ...
if not UnitCanAttack(player, unit) then return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable end
if debuffType==magic then
isStealable = true
end
return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable
end
chudo_228 (20.06.2017)
DreamlØlz, все хорошо, но иногда вылетает луа ошибка, что это может быть? Вылетает онли в пвп, когда мобов\маникены бьешь не вылетает ошибка.