TrinityCore / TrinityCore

TrinityCore Open Source MMO Framework (master = 10.2.7.55261, 3.3.5 = 3.3.5a.12340, wotlk_classic = 3.4.3.54261, cata classic = 4.4.0.55262)
http://www.trinitycore.org
GNU General Public License v2.0
9.27k stars 6k forks source link

Serverside ATs dont trigger for dead player #29413

Open Naddley opened 8 months ago

Naddley commented 8 months ago

Description

Serverside ATs dont trigger while youre dead/ a ghost

Expected behaviour

Serverside ATs should have the possibility to get triggered by dead players.

Used for Quest: 38765 (Enter the Illidari: Shivarra) https://www.wowhead.com/quest=38765/enter-the-illidari-shivarra

Steps to reproduce the problem

  1. Step: Die near a Serverside AT (example Mage Tower SW)
  2. Step: try to trigger the teleport of the Serverside AT

Branch

master

TC rev. hash/commit

a0fdac0ecc11+

Operating system

Win10

Custom changes

None

BertiRean commented 2 months ago

Is legit that Dead players trigger that ?. Or should be triggered by ghost players also ?

mdX7 commented 2 months ago

Is legit that Dead players trigger that ?. Or should be triggered by ghost players also ?

the specific case linked above should -only- be triggered by dead players even

BertiRean commented 2 months ago

It's caused by the AnyUnitInObjectRangeCheck check on the searchers of AreaTrigger. One possible solution is add a boolean parameter to constructor of check to handle alive/dead cases. Currently just handle this:

https://github.com/TrinityCore/TrinityCore/blob/8e3024a96ab06b5e2d6da529c5e3db9ce5744c4e/src/server/game/Grids/Notifiers/GridNotifiers.h#L1082

Here:

https://github.com/TrinityCore/TrinityCore/blob/8e3024a96ab06b5e2d6da529c5e3db9ce5744c4e/src/server/game/Grids/Notifiers/GridNotifiers.h#L1078

I could do the change if it's not a problem for the team

meji46 commented 2 months ago

I have some work done for this since clientside areatriggers also have cases where they only trigger for ghost or dead players

BertiRean commented 2 months ago

Is it a common case the client side trigger for ghost or alives ?. If that is the case then a boolean will not be enough, maybe a kind of flag thing will be better instead.

meji46 commented 2 months ago

There are several cases for clientside ones. Some support ghosts and dead players and others only one or the other (they're always triggered for alive players)

BertiRean commented 2 months ago

I think that is better just have all units with searcher alive or not. And filter the list using a kind of criteria.