File tree Expand file tree Collapse file tree
game/scripts/vscripts/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ export class BaseModifierMotionVertical extends BaseModifier {}
2626export interface BaseModifierMotionBoth extends CDOTA_Modifier_Lua_Motion_Both { }
2727export class BaseModifierMotionBoth extends BaseModifier { }
2828
29+ // Add standard base classes to prototype chain to make `super.*` work as `self.BaseClass.*`
30+ setmetatable ( BaseAbility . prototype , { __index : CDOTA_Ability_Lua ?? C_DOTA_Ability_Lua } ) ;
31+ setmetatable ( BaseItem . prototype , { __index : CDOTA_Item_Lua ?? C_DOTA_Item_Lua } ) ;
32+ setmetatable ( BaseModifier . prototype , { __index : CDOTA_Modifier_Lua ?? C_DOTA_Modifier_Lua } ) ;
33+
2934export const registerAbility = ( name ?: string ) => ( ability : new ( ) => CDOTA_Ability_Lua | CDOTA_Item_Lua ) => {
3035 if ( name !== undefined ) {
3136 // @ts -ignore
You can’t perform that action at this time.
0 commit comments