Skip to content

Mana potions + life/mana leech fix #4506

Open
@Unknown-Soldier

Description

@Unknown-Soldier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions