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

Multiple Buff_Has - checks with operator || do not work #34

Closed
Atariar opened this issue Mar 12, 2022 · 3 comments
Closed

Multiple Buff_Has - checks with operator || do not work #34

Atariar opened this issue Mar 12, 2022 · 3 comments

Comments

@Atariar
Copy link

Atariar commented Mar 12, 2022

Hello everyone,

Regarding Buff_Has I've experienced a issue checking if a npc has multiple buffs.

My aim is to identify if a npc has beend executed while being burned by a fire spell.
Multiple Buff_Has with operator || doesn't work for me. See:
// I. E. condition in ZS_Dead if (Buff_Has(slf, burn_firebolt_exp)) || (Buff_Has(slf, burn_firebolt)) || (Buff_Has(slf, burn_fireball_exp)) || (Buff_Has(slf, burn_fireball)) || (Buff_Has(slf, burn_firestorm_exp)) || (Buff_Has(slf, burn_firestorm)) || (Buff_Has(slf, burn_firerain_exp)) || (Buff_Has(slf, burn_firerain)) || (Buff_Has(slf, burn_firearrow_exp)) || (Buff_Has(slf, burn_firearrow)) || (Buff_Has(slf, burn_fire_exp)) { PrintS("Test"); //Nothing happens };

For the exact same situation, only asking for the correct Buff without || works fine
if Buff_Has(slf, burn_fireball_exp) { PrintS("Test"); //This works for the exact same situation. };

My setup is:

  • Ikarus 1.22
  • LeGo 2.8

What do you think?

@Lehona
Copy link
Owner

Lehona commented Mar 12, 2022

Can you try changing https://github.com/Lehona/LeGo/blob/dev/Buffs.d#L254 to return +Buff_BuffHndl; (I added a plus)? This should fix that behaviour.

@Atariar
Copy link
Author

Atariar commented Mar 12, 2022

@Lehona Thanks alot! It resolved the issue. :)

@Lehona
Copy link
Owner

Lehona commented Mar 12, 2022

Thanks for reporting :)

@Lehona Lehona closed this as completed Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants