Description
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)
- Have mana or/and life leech condition
- 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.