Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- abilities.lua
- Abilities = {}
- function Abilities.Initialize( ability )
- local getBehavior = ability.GetBehavior
- --[[
- function ability:GetBehavior()
- if getBehavior then
- return getBehavior(self)
- end
- return self.BaseClass.GetBehavior(self)
- end
- ]]
- function ability:HasBehavior( behavior )
- local behaviors = self:GetBehavior()--getBehavior and getBehavior(self) or self.BaseClass.GetBehavior(self)
- return FlagExist(behaviors, behavior)
- end
- end
- -- treant_basic_attack.lua
- treant_basic_attack = class({})
- LinkLuaModifier( "modifier_treant_natures_punishment", "abilities/heroes/treant/treant_shared_modifiers/modifier_treant_natures_punishment", LUA_MODIFIER_MOTION_NONE )
- function treant_basic_attack:OnSpellStart()
- if treant_basic_attack:HasBehavior( DOTA_ABILITY_BEHAVIOR_ROOT_DISABLES ) then
- print("DOTA_ABILITY_BEHAVIOR_ROOT_DISABLES")
- end
- end
- if IsClient() then require("abilities") end
- Abilities.Initialize( treant_basic_attack )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement