TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

[335] PvP Flag - Manual toggle does not work properly (PvE Realm)

Open MrSmite opened this issue 12 years ago • 15 comments

Core: 0392bf9bdfaed726a1ef473bb477b338765f4806 DB: N/A

Bug:

On a PVE realm (realm type 6) when a player types /PVP to turn on their flag, it is not properly tracked across logout or zone changes from hearthing. The core doesn't handle it properly when the player is spawned into the world.

Finally, if you type /PVP to turn off your flag, when the timer runs out it does not remove the player's PvP status.

Details:

Example 1

  • Log in and go to a non-sanctuary zone (such as Goldshire)
  • Type /PVP to turn on your flag
  • Log out
  • Log in

At this point the player will NOT have the PVP flag on their portrait and IsPvP() returns FALSE however typing /PVP thinking it will turn the flag on displays the message:

You will be unflagged for PvP in five minutes...

Example 2

  • Type /PVP to turn on your flag
  • Use your Hearthstone

At this point the player will NOT have the PVP flag on their portrait and typing /PVP thinking it will turn the flag on displays the message:

You will be unflagged for PvP in five minutes...

Example 3

  • Type /PVP to turn on your flag
  • Type /PVP to turn off your flag

Wait until the timer runs out (don't hearth or change zones). Notice you are still flagged for PvP until you hearth or change zones.

Conclusion

The core doesn't seem to be properly tracking the PvP status. In some cases, IsPvP() it thinks it's disabled but in terms of /PVP it thinks it's enabled. Other cases it simply doesn't remove PVP status when it should.

Notes:

  • I honestly can't remember if it should be disabled at logout or not. I don't think it should unless logged out longer than 5 minutes but I can't be sure.
  • I don't know about other realm types but I don't think this is realm specific, it seems more like a generic PvP issue.
  • I haven't tested on normal zone changes (eg: loading screens into / out of the Deeprun Tram)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

MrSmite avatar Sep 11 '14 21:09 MrSmite

Updated original report to reflect that the toggle doesn't remove PVP properly either.

MrSmite avatar Sep 13 '14 02:09 MrSmite

Addition: Turn on your PVP flag and turn it off again. Start some non-PVP-actions like questing or just killing some npcs. Your flag will not turn off after 5 minutes.

Pitcrawler avatar Sep 13 '14 04:09 Pitcrawler

Addition: Turn on your PVP flag and turn it off again. Start some non-PVP-actions like questing or just killing some npcs. Your flag will not turn off after 5 minutes.

Yes, that's Example 3 :)

On the other hand, I had the flag randomly turn off while I was killing Defias in Westfall. Unable to duplicate it so I didn't put an Example 4 ... yet.

MrSmite avatar Sep 13 '14 06:09 MrSmite

confirming, its an old issue

Maybe, but an old issue with no bug report is still unknown.

MrSmite avatar Sep 13 '14 18:09 MrSmite

so probably we can try to find out first, why typing /pvp after relog returns the error-message. there must be something which saves the pvp-status after login and logout :/

Lumber-Jack-2 avatar Jan 22 '15 11:01 Lumber-Jack-2

i think the problem is somewhere here in the toggleaction: https://github.com/Rushor/TrinityCore/blob/3.3.5/src/server/game/Handlers/MiscHandler.cpp#L467

Lumber-Jack-2 avatar Jan 23 '15 14:01 Lumber-Jack-2

Confirmed.

ghost avatar Apr 15 '15 18:04 ghost

confirmation is useless

Lumber-Jack-2 avatar Apr 15 '15 18:04 Lumber-Jack-2

Can someone try this ? http://pastebin.com/Ubd6uvHW

ghost avatar Apr 15 '15 22:04 ghost

Still confirmed on https://github.com/TrinityCore/TrinityCore/commit/2263cb9e1015ed0f6dbf83b63d8f0332bcbe6205

ghost avatar Jul 02 '15 08:07 ghost

New note: On my server it's done only for some characters, not all. For some players pvp turn on or off properly, but for some characters totally not.

ghost avatar Aug 27 '15 08:08 ghost

Any news?

Keader avatar Jan 02 '16 02:01 Keader

Keader pls..

Lumber-Jack-2 avatar Jan 02 '16 10:01 Lumber-Jack-2

@Frytiks: i tested your patch and sadly it doesn't changed anything

Lumber-Jack-2 avatar Jan 26 '16 07:01 Lumber-Jack-2

This was fixed by https://github.com/TrinityCore/TrinityCore/pull/19930 ?

Lumber-Jack-2 avatar Apr 25 '18 08:04 Lumber-Jack-2