Remove spam

4n0n-patch-1
4n0n 2 years ago
parent 5363858a0d
commit 0d1741ac31
  1. 72
      scripts/outlaw.lua
  2. 2
      src/AuraTable/AuraTable.lua
  3. 6
      src/Unit/Unit.lua
  4. 2
      src/_bastion.lua

@ -37,6 +37,9 @@ local Shiv = Bastion.SpellBook:GetSpell(5938)
local KidneyShot = Bastion.SpellBook:GetSpell(408) local KidneyShot = Bastion.SpellBook:GetSpell(408)
local InstantPoison = Bastion.SpellBook:GetSpell(315584) local InstantPoison = Bastion.SpellBook:GetSpell(315584)
local AtrophicPosion = Bastion.SpellBook:GetSpell(381637) local AtrophicPosion = Bastion.SpellBook:GetSpell(381637)
local Evasion = Bastion.SpellBook:GetSpell(5277)
local TricksOfTheTrade = Bastion.SpellBook:GetSpell(57934)
local CheapShot = Bastion.SpellBook:GetSpell(1833)
local IrideusFragment = Bastion.ItemBook:GetItem(193743) local IrideusFragment = Bastion.ItemBook:GetItem(193743)
local Healthstone = Bastion.ItemBook:GetItem(5512) local Healthstone = Bastion.ItemBook:GetItem(5512)
@ -99,6 +102,37 @@ local KickTarget = Bastion.UnitManager:CreateCustomUnit('kick', function(unit)
return purge return purge
end) end)
local Tank = Bastion.UnitManager:CreateCustomUnit('tank', function(unit)
local tank = nil
Bastion.UnitManager:EnumFriends(function(unit)
if Player:GetDistance(unit) > 40 then
return false
end
if not Player:CanSee(unit) then
return false
end
if unit:IsDead() then
return false
end
if unit:IsTank() then
tank = unit
return true
end
return false
end)
if tank == nil then
tank = None
end
return tank
end)
local DefaultAPL = Bastion.APL:New('default') local DefaultAPL = Bastion.APL:New('default')
local AOEAPL = Bastion.APL:New('aoe') local AOEAPL = Bastion.APL:New('aoe')
local SpecialAPL = Bastion.APL:New('special') local SpecialAPL = Bastion.APL:New('special')
@ -119,6 +153,14 @@ SpecialAPL:AddSpell(
end):SetTarget(KickTarget) end):SetTarget(KickTarget)
) )
SpecialAPL:AddSpell(
CheapShot:CastableIf(function(self)
return KickTarget:Exists() and Player:InMelee(KickTarget) and
self:IsKnownAndUsable() and
not Player:IsCastingOrChanneling() and Player:GetAuras():FindMy(Stealth):IsUp()
end):SetTarget(KickTarget)
)
SpecialAPL:AddSpell( SpecialAPL:AddSpell(
Stealth:CastableIf(function(self) Stealth:CastableIf(function(self)
return self:IsKnownAndUsable() and return self:IsKnownAndUsable() and
@ -159,13 +201,29 @@ SpecialAPL:AddSpell(
end):SetTarget(Player) end):SetTarget(Player)
) )
-- SpecialAPL:AddSpell( SpecialAPL:AddItem(
-- Healthstone:UsableIf(function(self) Healthstone:UsableIf(function(self)
-- return self:IsKnownAndUsable() and return self:IsEquippedAndUsable() and
-- not Player:IsCastingOrChanneling() and not Player:IsCastingOrChanneling() and
-- Player:GetHealthPercent() < 40 Player:GetHealthPercent() < 40
-- end):SetTarget(Player) end):SetTarget(Player)
-- ) )
SpecialAPL:AddSpell(
TricksOfTheTrade:CastableIf(function(self)
return Tank:Exists() and self:IsKnownAndUsable() and
not Player:IsCastingOrChanneling() and
Player:IsTanking(Target)
end):SetTarget(Tank)
)
SpecialAPL:AddSpell(
Evasion:CastableIf(function(self)
return self:IsKnownAndUsable() and
not Player:IsCastingOrChanneling() and
Player:GetHealthPercent() < 40
end):SetTarget(Player)
)
SpecialAPL:AddItem( SpecialAPL:AddItem(
IrideusFragment:UsableIf(function(self) IrideusFragment:UsableIf(function(self)

@ -131,7 +131,7 @@ end
-- Update auras -- Update auras
function AuraTable:Update() function AuraTable:Update()
print("Updating auras for " .. tostring(self.unit)) -- print("Updating auras for " .. tostring(self.unit))
self:Clear() self:Clear()
-- self.lastUpdate = GetTime() -- self.lastUpdate = GetTime()

@ -379,4 +379,10 @@ function Unit:IsUnit(unit)
return UnitIsUnit(self.unit, unit.unit) return UnitIsUnit(self.unit, unit.unit)
end end
-- IsTanking
function Unit:IsTanking(unit)
local isTanking, status, threatpct, rawthreatpct, threatvalue = UnitDetailedThreatSituation(self.unit, unit.unit)
return isTanking
end
return Unit return Unit

@ -1,7 +1,7 @@
local Tinkr = ... local Tinkr = ...
local Bastion = { local Bastion = {
DebugMode = true DebugMode = false
} }
Bastion.__index = Bastion Bastion.__index = Bastion

Loading…
Cancel
Save