Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (31 sloc) 1.27 KB
item_bear_cloak = class({})
LinkLuaModifier( "modifier_item_bear_cloak", "modifiers/modifier_item_bear_cloak", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_item_bear_cloak_effect", "modifiers/modifier_item_bear_cloak_effect", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function item_bear_cloak:GetIntrinsicModifierName()
return "modifier_item_bear_cloak"
end
--------------------------------------------------------------------------------
function item_bear_cloak:Spawn()
self.required_level = self:GetSpecialValueFor( "required_level" )
end
--------------------------------------------------------------------------------
function item_bear_cloak:OnHeroLevelUp()
if IsServer() then
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
self:OnUnequip()
self:OnEquip()
end
end
end
--------------------------------------------------------------------------------
function item_bear_cloak:IsMuted()
if self.required_level > self:GetCaster():GetLevel() then
return true
end
if not self:GetCaster():IsHero() then
return true
end
return self.BaseClass.IsMuted( self )
end
--------------------------------------------------------------------------------
You can’t perform that action at this time.