SHARE
TWEET

Untitled

a guest Sep 17th, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- abilities.lua
  2.  
  3. Abilities = {}
  4.  
  5. function Abilities.Initialize( ability )
  6.     local getBehavior = ability.GetBehavior
  7.  
  8.     --[[
  9.     function ability:GetBehavior()
  10.         if getBehavior then
  11.             return getBehavior(self)
  12.         end
  13.  
  14.         return self.BaseClass.GetBehavior(self)
  15.     end
  16.     ]]
  17.  
  18.     function ability:HasBehavior( behavior )
  19.         local behaviors = self:GetBehavior()--getBehavior and getBehavior(self) or self.BaseClass.GetBehavior(self)
  20.         return FlagExist(behaviors, behavior)
  21.     end
  22. end
  23.  
  24.  
  25. -- treant_basic_attack.lua
  26.  
  27. treant_basic_attack = class({})
  28.  
  29. LinkLuaModifier( "modifier_treant_natures_punishment", "abilities/heroes/treant/treant_shared_modifiers/modifier_treant_natures_punishment", LUA_MODIFIER_MOTION_NONE )
  30.  
  31. function treant_basic_attack:OnSpellStart()
  32.     if treant_basic_attack:HasBehavior( DOTA_ABILITY_BEHAVIOR_ROOT_DISABLES ) then  
  33.         print("DOTA_ABILITY_BEHAVIOR_ROOT_DISABLES")
  34.     end
  35. end
  36.  
  37. if IsClient() then require("abilities") end
  38. Abilities.Initialize( treant_basic_attack )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top