initial commit

This commit is contained in:
achmad
2026-05-29 15:11:31 +07:00
commit 777ee9bad8
1539 changed files with 172449 additions and 0 deletions
@@ -0,0 +1,30 @@
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
local ____exports = {}
--- Как в defension (lib/utils.ts + lib/Filters.ts): от юнита к «настоящему» герою игрока для учёта урона.
function ____exports.getTrueHeroFromEntity(self, ent)
if not ent then
return nil
end
if ent:IsBaseNPC() then
local npc = ent
if npc:IsRealHero() then
return npc
end
local ownerEnt = npc:GetOwner()
if ownerEnt and ownerEnt:IsBaseNPC() then
local owner = ownerEnt
if owner:IsRealHero() then
return owner
end
end
local player = npc:GetPlayerOwner()
if player ~= nil then
local hero = player:GetAssignedHero()
if hero and hero:IsRealHero() then
return hero
end
end
end
return nil
end
return ____exports