forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

[Bug]: [1.4.2] Conditions are not working for spells/weapons .lua files

Open Wirless opened this issue 1 year ago • 9 comments

By submitting this bug issue, you agree to the following.

  • [X] 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)
  • [X] This issue is reproducible without changes to the C++ code in this repository
  • [X] This bug has not been resolved in master branch
  • [X] There is no existing issue for this bug already

Does this bug crash tfs?

no

Server Version

1.4.x (Release)

Operation System

all (listed below)

OS Description

No response

Bug description

Damage is only dealt on players combat.

Possible Pull Requests which are to blame

  • [ ] #
  • [ ] #

Steps to reproduce

Code to reproduce the issue:

-- paste your script here

Actual Behavior

When player casts spell which should give condition the condition does apply but never ticks the only time u get a tick if player (owner of condition) deals the damage to the monster. e.g try using poison arrow itself it does not actually work dealing the poison ticks over time no matter what way you add condition I tried 50 different ways to force condition create second combat object and everything issue possibly comes from Updated lua libraries or some other stuff while it might have worked in 2018-2019 it does in fact not work nowadays.

Expected Behavior

Conditions should tick in their own respected time use poison arrow for reference. there is never a second tick ever unless player deals the damage to monster via weapon/spell/ or other combat only then it ticks and player has to finely TIME his hit with the tick otherwise it wont tick either.

Backtrace

No response

Wirless avatar Oct 22 '24 14:10 Wirless

in the mean time im probably gonna create "invisible" condition fields that I want :/

Wirless avatar Oct 22 '24 14:10 Wirless

seems fine for the fluids however but thats on self which is odd

Wirless avatar Oct 22 '24 14:10 Wirless

i could not find any reference to the poison arrow addConditionDamage or whatever htat function is anywhere in luascripts

Wirless avatar Oct 22 '24 15:10 Wirless

can you provided some example script?

probably this is source of problems: https://github.com/otland/forgottenserver/blob/3bca716b7a547a5fb78b73483c802b8e523bd8c0/src/combat.cpp#L677

ArturKnopik avatar Oct 27 '24 18:10 ArturKnopik

seems like it happens when u apply a Condition to combat.

nok1111 avatar Nov 05 '24 12:11 nok1111

Provide example to reproduce

nekiro avatar Dec 01 '24 10:12 nekiro

Poison arrow in weapons

Wirless avatar Dec 02 '24 07:12 Wirless

yeah conditions applied in combat only tick if the combat is ticking if there is no reaction to combat then the condition time is not running or its running but skipping the tick adding yoiu have to hit monster at either extactly the tick time or near it for the tick to happen e.g when monster is not in combat the conditions from weapons are not running

Wirless avatar Dec 08 '24 09:12 Wirless