61 lines
2.5 KiB
Lua
61 lines
2.5 KiB
Lua
local ____lualib = require("lualib_bundle")
|
|
local __TS__Class = ____lualib.__TS__Class
|
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
local __TS__SourceMapTraceBack = ____lualib.__TS__SourceMapTraceBack
|
|
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["8"] = 1,["9"] = 1,["10"] = 1,["11"] = 1,["12"] = 1,["13"] = 4,["14"] = 5,["15"] = 4,["16"] = 5,["17"] = 6,["18"] = 7,["21"] = 9,["22"] = 10,["25"] = 13,["26"] = 16,["27"] = 17,["28"] = 19,["31"] = 22,["32"] = 6,["33"] = 5,["34"] = 5,["35"] = 5,["36"] = 4,["39"] = 5,["40"] = 26,["41"] = 27,["42"] = 26,["43"] = 27,["44"] = 28,["45"] = 29,["46"] = 28,["47"] = 31,["48"] = 32,["49"] = 31,["50"] = 34,["51"] = 35,["52"] = 34,["53"] = 27,["54"] = 27,["55"] = 27,["56"] = 26,["59"] = 27});
|
|
local ____exports = {}
|
|
local ____dota_ts_adapter = require("lib.dota_ts_adapter")
|
|
local BaseItem = ____dota_ts_adapter.BaseItem
|
|
local BaseModifier = ____dota_ts_adapter.BaseModifier
|
|
local registerAbility = ____dota_ts_adapter.registerAbility
|
|
local registerModifier = ____dota_ts_adapter.registerModifier
|
|
____exports.item_restock = __TS__Class()
|
|
local item_restock = ____exports.item_restock
|
|
item_restock.name = "item_restock"
|
|
__TS__ClassExtends(item_restock, BaseItem)
|
|
function item_restock.prototype.OnSpellStart(self)
|
|
if not IsServer() then
|
|
return
|
|
end
|
|
local caster = self:GetCaster()
|
|
if not caster then
|
|
return
|
|
end
|
|
local heroes = HeroList:GetAllHeroes()
|
|
for ____, hero in ipairs(heroes) do
|
|
if hero:IsRealHero() then
|
|
hero:AddNewModifier(caster, self, "modifier_item_restock", {})
|
|
end
|
|
end
|
|
UTIL_Remove(self)
|
|
end
|
|
item_restock = __TS__Decorate(
|
|
item_restock,
|
|
item_restock,
|
|
{registerAbility(nil)},
|
|
{kind = "class", name = "item_restock"}
|
|
)
|
|
____exports.item_restock = item_restock
|
|
____exports.modifier_item_restock = __TS__Class()
|
|
local modifier_item_restock = ____exports.modifier_item_restock
|
|
modifier_item_restock.name = "modifier_item_restock"
|
|
__TS__ClassExtends(modifier_item_restock, BaseModifier)
|
|
function modifier_item_restock.prototype.RemoveOnDeath(self)
|
|
return false
|
|
end
|
|
function modifier_item_restock.prototype.IsHidden(self)
|
|
return false
|
|
end
|
|
function modifier_item_restock.prototype.GetTexture(self)
|
|
return "blackshop/restock"
|
|
end
|
|
modifier_item_restock = __TS__Decorate(
|
|
modifier_item_restock,
|
|
modifier_item_restock,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_item_restock"}
|
|
)
|
|
____exports.modifier_item_restock = modifier_item_restock
|
|
return ____exports
|