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

Mana potions + life/mana leech fix #4506

Open
2 tasks done
Unknown-Soldier opened this issue Jul 19, 2023 · 1 comment
Open
2 tasks done

Mana potions + life/mana leech fix #4506

Unknown-Soldier opened this issue Jul 19, 2023 · 1 comment

Comments

@Unknown-Soldier
Copy link

Unknown-Soldier commented Jul 19, 2023

Before creating an issue, please ensure:

  • This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. Have mana or/and life leech condition
  2. Use mana potion

Expected behaviour

Player gains mana declared by potion script
https://imgur.com/E7WcWJp

Actual behaviour

Player gains mana declared by potion script + addtional mana and health based on mana and life leech bonus values
https://imgur.com/gFSDXoC

Possible solution is given by and Otland user here:
https://otland.net/threads/leech-bug-again-using-mana-potion-returns-health-and-additional-mana.285511/

So changing
if (!damage.leeched && damage.primary.type != COMBAT_HEALING && casterPlayer && damage.origin != ORIGIN_CONDITION) {
to
if (!damage.leeched && damage.primary.type != COMBAT_HEALING && casterPlayer && target != caster && damage.origin != ORIGIN_CONDITION) {

It helps cause I have tested this, however someone experienced might look at this. Hopefully it solves the problem without creating a new one.

@MillhioreBT
Copy link
Contributor

I think your solution is correct, we simply have to verify if the target is not yourself.

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