azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.59k stars 2.64k forks source link

DB/creature: Death Knight Understudy can disappear on "Dismiss" action #4198

Closed Si1ker closed 5 months ago

Si1ker commented 3 years ago

NPC = Death Knight Understudy Location: Naxxramas (Map 533) at Military Quarter

CURRENT BEHAVIOUR:

If you use right-click a controlled Death Knight Understudy and click on "Dismiss", the NPC disappears. o.o !

image

image

EXPECTED BLIZZLIKE BEHAVIOUR:

The NPC should not disappear after you click on "dismiss", it is not a summoned pet, sometimes you will get the bug and sometimes not, the chance to get the bug is 50/50.

https://www.youtube.com/watch?v=8elL14VTND8

image

image

STEPS TO REPRODUCE THE PROBLEM:
  1. Adjust raid difficulty to 10man
  2. .go xyz 2812.673 -3089.319 272.425 533 3.300
  3. Use an Obedience Crystal to control a Death Knight Understudy
  4. Right-click on the controlled Death Knight Understudy picture and click on "Dismiss" as shown above then.... If it remains => try again If it disappears => You have reproduced the bug
EXTRA NOTES:

N/A

AC HASH/COMMIT:

79aa560

OPERATING SYSTEM:

Windows 10

MODULES:

N/A

OTHER CUSTOMIZATIONS:

HD textures Legion models

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/95701871-db-creature-death-knight-understudy-can-disappear-on-dismiss-action?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github).
Gultask commented 7 months ago

https://github.com/chromiecraft/chromiecraft/issues/6968 https://github.com/chromiecraft/chromiecraft/issues/6932

Likely caused because they're TempSummons

heyitsbench commented 5 months ago

They're being despawned by this PetHandler line. Maybe needs a check to see if pet owner matches charm unit?

heyitsbench commented 5 months ago

Could also be that they're supposed to use the (unimplemented) Cannot Dismiss Pet summon property flag.

Nyeriah commented 5 months ago

Could also be that they're supposed to use the (unimplemented) Cannot Dismiss Pet summon property flag.

They are not summons though, they're mind controlled npcs

heyitsbench commented 5 months ago

They are not summons though, they're mind controlled npcs

https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp#L77-L82 I'm just spitballing here.

sogladev commented 5 months ago

Allowing to "unsummon" charmed NPCs pet->ToTempSummon()->UnSummon() when not the owner feels wrong.

Comparing to TC 335 https://github.com/TrinityCore/TrinityCore/blob/14501c0d7af9ae06e3febcb7567407191249d821/src/server/game/Handlers/PetHandler.cpp#L238 only stopping the charm is present here

Desummoning pets that are owned are handled here https://github.com/azerothcore/azerothcore-wotlk/blob/8e9e134924efc5da5f50d3dd197f613cabadaa33/src/server/game/Handlers/PetHandler.cpp#L308

Not sure for what special case there's a clause in AC to allow it when player is not the owner https://github.com/azerothcore/azerothcore-wotlk/blob/8e9e134924efc5da5f50d3dd197f613cabadaa33/src/server/game/Handlers/PetHandler.cpp#L290