Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow NPC Protect Effect #488

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Commits on Oct 28, 2024

  1. Fix ProtectEffect not Working

    Corrected ProtectEffect not working as the wrong Start() method was being called.
    tegstewart committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    9e60c7c View commit details
    Browse the repository at this point in the history
  2. Fix Null Exception for NPC Protect Effect

    Remedied protect effect code assuming the source was a player and causing a null exception when that is not the case.
    tegstewart committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    7fe5fdf View commit details
    Browse the repository at this point in the history
  3. Allow NPC Protect Effects

    ProtectEffect no longer assumes both the source and target are players, allowing the effect to work and no longer throw exceptions when the effect is being applied by and/or to NPCs.
    
    Removed a superfluous player group check, as that is already done in ProtectAbilityHandler.Execute().
    
    I'm specifically using this for custom pets that protect their owner, but it could in theory be used in other contexts.  Somebody could create a group vs group fight between NPCs, and have tank NPCs apply protect to healing NPCs, for example.
    
    While I was there, I cleaned up the code and addressed compiler warnings.
    tegstewart committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    e5f19ef View commit details
    Browse the repository at this point in the history