azerothcore-wotlk icon indicating copy to clipboard operation
azerothcore-wotlk copied to clipboard

fix(Core/GameObject): Remove unneeded ClearGossipMenuFor call

Open r4d1sh opened this issue 2 years ago • 2 comments

Changes Proposed:

This PR essentially repeats this - #17596 But for GameObjects

Removed another unnecessary ClearGossipMenuFor call which randomly broke gossip menus.

For example, if you are talking with some NPC, and at that moment you receive/lose some item or gold, your client will send CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY. If at the same time there are some GameObjects near you that can be questgiver, then a chain of method calls will lead to ClearGossipMenuFor and your gossip menu with NPC will suddenly breaks. You won't even understand why this could happen.

This PR proposes changes to:

  • [x] Core (units, players, creatures, game systems).
  • [ ] Scripts (bosses, spell scripts, creature scripts).
  • [ ] Database (SAI, creatures, etc).

Tests Performed:

This PR has been:

  • [x] Tested in-game by the author.
  • [ ] Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • [ ] This pull request requires further testing and may have edge cases to be tested.

r4d1sh avatar Feb 15 '24 01:02 r4d1sh

I find when LUA use GossipMenu , if somebody change the money or when in group and changed subgroup, the Menu will not continue to be clicked. Is this can fix the problem?

kissingers avatar Feb 15 '24 11:02 kissingers

I find when LUA use GossipMenu , if somebody change the money or when in group and changed subgroup, the Menu will not continue to be clicked. Is this can fix the problem?

Yes. Change subgroup / money amount cause the client to send CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY and this problem happens.

Theoretically, this could be a problem in your Lua script. But I am 95% sure that this is exactly the problem that I described, and this PR will fix it. You can check.

r4d1sh avatar Feb 15 '24 13:02 r4d1sh

Good fix, all LUA GossipMenu looks fine when player change money or subgroup!

kissingers avatar Feb 22 '24 02:02 kissingers