ModDota / BugTracker

Listing bugs for Dota 2 Custom Games
9 stars 1 forks source link

ModifierLua can not find invisble units in aura #120

Open robincodex opened 7 years ago

robincodex commented 7 years ago
"modifier_test"
{
    "Passive"                 "1"
    "IsHidden"                "1"

    "Aura"          "modifier_truesight"
    "Aura_Radius"   "1500"
    "Aura_Teams"    "DOTA_UNIT_TARGET_TEAM_ENEMY"
    "Aura_Types"    "DOTA_UNIT_TARGET_HERO"
    "Aura_Flags"    "DOTA_UNIT_TARGET_FLAG_INVULNERABLE"
}

Similar to

function public:IsAura()
    return true
end

--------------------------------------------------------------------------------

function public:GetModifierAura()
    return "modifier_truesight"
end

--------------------------------------------------------------------------------

function public:GetAuraSearchTeam()
    return DOTA_UNIT_TARGET_TEAM_ENEMY
end

--------------------------------------------------------------------------------

function public:GetAuraSearchType()
    return DOTA_UNIT_TARGET_HERO
end

--------------------------------------------------------------------------------

function public:GetAuraSearchFlags()
    return DOTA_UNIT_TARGET_FLAG_INVULNERABLE
end

--------------------------------------------------------------------------------

function public:GetAuraRadius()
    return 1500
end

--------------------------------------------------------------------------------

If this is a ModifierLua's modifier, then it can not be find invisble units.

DoctorGester commented 7 years ago

https://github.com/DoctorGester/crumbling-island-arena/blob/master/game/scripts/vscripts/abilities/venge/modifier_venge_r.lua https://github.com/DoctorGester/crumbling-island-arena/blob/master/game/scripts/vscripts/abilities/venge/modifier_venge_r_target.lua

works fine for me

robincodex commented 7 years ago

@DoctorGester yeah, I have tried with you almost the same code, but there is the same situation. The aura modifier to the boss, and then hero invisible close to the boss, the hero not be disable invisible, because this hero is not add GetModifierAura(), and GetAuraEntityReject () is not called. The boss is creature unit.