Trinitycore: PvP Combat timer never gets refreshed while meleeing

Created on 9 Dec 2018  Â·  9Comments  Â·  Source: TrinityCore/TrinityCore

Description:

PvP combat will always expire after ~5s, timer never gets refreshed even if you're currently attacking in melee.

Current behaviour:

(description)

Expected behaviour:

PvP Combat timer should get reset to max duration after each attack.

Steps to reproduce the problem:

  1. Get two characters to duel
  2. Get character A to melee character B
  3. See that even if A hits every time, combat will still expire after ~5s.
    (Players will still re enter combat after the next hit)

Branch(es):

3.3.5

TC rev. hash/commit:
e6f9f182019b1e194d840e78c4b2583b2b57b0bd

Operating system: Windows x64

Additional notes:
It seems to fail here:
https://github.com/TrinityCore/TrinityCore/blob/2b332d570708e1cb762d008e3e487992272c5cd1/src/server/game/Entities/Unit/Unit.cpp#L8167-8168
The refresh would happen if the code reached the SetInCombatWith a few lines below.

Branch-3.3.5a Comp-Core Sub-Combat

Most helpful comment

All 9 comments

maybe that line has to be changed for pvp ?

I've fixed it like this on my port: https://github.com/ValorenWoW/sunstrider-core/commit/06d99c5e8fbf34ad3bb8968b586ff88ade657b69
I can PR it if that looks okay to you.

@Treeston (https://github.com/TrinityCore/TrinityCore/issues/22851#issuecomment-445730545) good for you?

Those bracers :-1:

any news on this? its still an issue

@Treeston could you take a look at this when you have time ?

TrinityCore rev. a149261 2020-01-09 23:10:46 +0100 (3.3.5 branch) (Unix, RelWithDebInfo, Static)
(https://tcubuntu.northeurope.cloudapp.azure.com/)

Last night, I noticed something odd, even though I have not tested this extensively, but it appears that PvP player status does not turn on when attacking opposite faction guard NPCs. While gathering Exploration achievements on my level 70 orc hunter character, I "had to" kill a handful of Ironforge mountaineer guards, level 30 and 65, in Dun Morogh/ Coldridge Valley, but did not get flagged PvP at all. Also, I thought that the forced PvP flag when entering the Stormwind map, even briefly, should take ≈ 5 minutes to wear off. I don't know, I may have misunderstood that last scenario.

@kelno could you open a PR ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rushor picture Rushor  Â·  3Comments

Lopfest picture Lopfest  Â·  3Comments

Keader picture Keader  Â·  3Comments

Rochet2 picture Rochet2  Â·  3Comments

tje3d picture tje3d  Â·  3Comments