Interface ICustomEffect


  • public interface ICustomEffect
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getEveryXTick()
      Returns the tick interval at which this effect fires its script tick event.
      int getFrameCount()
      Returns the number of frames in the icon animation.
      int getFrameTime()
      Returns the duration of each animation frame in ticks.
      int getHeight()
      Returns the height of the icon.
      String getIcon()
      Returns the resource path of the icon texture.
      int getIconX()
      Returns the X offset of the icon within the texture.
      int getIconY()
      Returns the Y offset of the icon within the texture.
      int getID()
      Returns the unique ID of this custom effect.
      int getIndex()
      Utilized by DBC Addon or other Addons to tell which map of Effects to Match to.
      String getMenuName()
      Returns the display name shown in menus.
      String getName()
      Returns the internal name of this custom effect.
      int getWidth()
      Returns the width of the icon.
      boolean isAnimated()
      Returns whether the icon texture is animated.
      boolean isLossOnDeath()
      Returns whether this effect is removed when the player dies.
      ICustomEffect save()
      Saves this custom effect to the effect controller.
      void setAnimated​(boolean animated)
      Sets whether the icon texture is animated.
      void setEveryXTick​(int everyXTick)
      Sets the tick interval at which this effect fires its script tick event.
      void setFrameCount​(int frameCount)
      Sets the number of frames in the icon animation.
      void setFrameTime​(int frametime)
      Sets the duration of each animation frame in ticks.
      void setHeight​(int height)
      Sets the height of the icon.
      void setIcon​(String icon)
      Sets the resource path of the icon texture.
      void setIconX​(int iconX)
      Sets the X offset of the icon within the texture.
      void setIconY​(int iconY)
      Sets the Y offset of the icon within the texture.
      void setID​(int id)
      Sets the unique ID of this custom effect.
      void setLossOnDeath​(boolean lossOnDeath)
      Sets whether this effect is removed when the player dies.
      void setMenuName​(String name)
      Sets the display name shown in menus.
      void setName​(String name)
      Sets the internal name of this custom effect.
      void setWidth​(int width)
      Sets the width of the icon.
    • Method Detail

      • getID

        int getID()
        Returns the unique ID of this custom effect.
        Returns:
        the effect ID, or -1 if not yet assigned
      • getName

        String getName()
        Returns the internal name of this custom effect.
        Returns:
        the effect name
      • setMenuName

        void setMenuName​(String name)
        Sets the display name shown in menus. Supports color codes using '&' (converted to section signs).
        Parameters:
        name - the display name to set; ignored if null or empty
      • getMenuName

        String getMenuName()
        Returns the display name shown in menus.
        Returns:
        the menu display name
      • setName

        void setName​(String name)
        Sets the internal name of this custom effect.
        Parameters:
        name - the name to set; ignored if null or empty
      • getIcon

        String getIcon()
        Returns the resource path of the icon texture.
        Returns:
        the icon texture path
      • setIcon

        void setIcon​(String icon)
        Sets the resource path of the icon texture.
        Parameters:
        icon - the icon texture path
      • getEveryXTick

        int getEveryXTick()
        Returns the tick interval at which this effect fires its script tick event.
        Returns:
        the tick interval (always a multiple of 10, minimum 10)
      • setEveryXTick

        void setEveryXTick​(int everyXTick)
        Sets the tick interval at which this effect fires its script tick event. The value is rounded to the nearest multiple of 10 with a minimum of 10.
        Parameters:
        everyXTick - the desired tick interval
      • getIconX

        int getIconX()
        Returns the X offset of the icon within the texture.
        Returns:
        the icon X offset in pixels
      • setIconX

        void setIconX​(int iconX)
        Sets the X offset of the icon within the texture.
        Parameters:
        iconX - the icon X offset in pixels
      • getIconY

        int getIconY()
        Returns the Y offset of the icon within the texture.
        Returns:
        the icon Y offset in pixels
      • setIconY

        void setIconY​(int iconY)
        Sets the Y offset of the icon within the texture.
        Parameters:
        iconY - the icon Y offset in pixels
      • getWidth

        int getWidth()
        Returns the width of the icon.
        Returns:
        the icon width in pixels
      • setWidth

        void setWidth​(int width)
        Sets the width of the icon.
        Parameters:
        width - the icon width in pixels
      • getHeight

        int getHeight()
        Returns the height of the icon.
        Returns:
        the icon height in pixels
      • setHeight

        void setHeight​(int height)
        Sets the height of the icon.
        Parameters:
        height - the icon height in pixels
      • isLossOnDeath

        boolean isLossOnDeath()
        Returns whether this effect is removed when the player dies.
        Returns:
        true if the effect is lost on death
      • setLossOnDeath

        void setLossOnDeath​(boolean lossOnDeath)
        Sets whether this effect is removed when the player dies.
        Parameters:
        lossOnDeath - true to remove the effect on death
      • save

        ICustomEffect save()
        Saves this custom effect to the effect controller.
        Returns:
        the saved effect instance
      • setID

        void setID​(int id)
        Sets the unique ID of this custom effect.
        Parameters:
        id - the effect ID to assign
      • getIndex

        int getIndex()
        Utilized by DBC Addon or other Addons to tell which map of Effects to Match to. Index: 0 - CNPC+ Index: 1 - DBC Addon
        Returns:
        the effect's index in the effect list
      • isAnimated

        boolean isAnimated()
        Returns whether the icon texture is animated.
        Returns:
        true if the icon is animated
      • setAnimated

        void setAnimated​(boolean animated)
        Sets whether the icon texture is animated.
        Parameters:
        animated - true to enable icon animation
      • getFrameCount

        int getFrameCount()
        Returns the number of frames in the icon animation.
        Returns:
        the frame count (minimum 1)
      • setFrameCount

        void setFrameCount​(int frameCount)
        Sets the number of frames in the icon animation. Values less than 1 are clamped to 1.
        Parameters:
        frameCount - the number of animation frames
      • getFrameTime

        int getFrameTime()
        Returns the duration of each animation frame in ticks.
        Returns:
        the frame time in ticks (minimum 1)
      • setFrameTime

        void setFrameTime​(int frametime)
        Sets the duration of each animation frame in ticks. Values less than 1 are clamped to 1.
        Parameters:
        frametime - the frame duration in ticks