cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
180 stars 47 forks source link

🐛 [Bug Report] Spells with EFFECT_APPLY_AREA_AURA_PARTY #3323

Open miraco opened 1 year ago

miraco commented 1 year ago

Bug Details

Phantom Guest Spell - Dance Vibe These mobs come in a group of 8 or 9 and have 5 different sets of abilitys.

One Version is melee only (maybe uses punch) and use Dance Vibe buff (can cast this infight if another Guest with this buff died.

This spell has 2 bugs

Proof At this video you can see that one of the right side group is melee and has dance vibe, this only spreads to his group. https://youtu.be/BdHT1aQOwdI?t=28 The moving Creature and the mobs from the left group dont get the aura.

Better proove is this (yes i know its from current retail but same as happening on wotlk classic ptr, maybe ill get a video from there too): https://www.youtube.com/watch?v=G6W0r7rj5qY

Proof that spell dont have lower range: https://youtu.be/i-75XBgaV6Y The mobs on this table all have the buff. and even if the middle mob would be the mob spreading this aura WoWScrnShot_032223_191517

WoWScrnShot_032223_191457

Steps to Reproduce

  1. With current creature_event_ai usage its easy to see that mobs can have this aura stacked.
  2. Go kara

Expected behavior

For the first bug, it should never stack even if you pull multiple groups together.

2nd bug, i am not rly sure but my biggest guess is that spells with SPELL_EFFECT_APPLY_AREA_AURA_PARTY only goes on creatures that are linked together as spawn_group.

Suggested Workaround

For first bug UPDATE spell_template SET stackable = '1' WHERE Id = '29521';

Crash Log

No response

Core SHA1 Commit Hash

ef32095b10c648ce7397fcd7c38a48def3b295d5

Database SHA1 Commit Hash

e7fc554ac508c10922495d6102a10e4f4bb340ac

Operating System

Windows

Client Version

2.4.3 (The Burning Crusade)

celguar commented 1 year ago

It also visible if you open combat log near them - it gonna tank your fps and spam auras applied very fast

miraco commented 1 year ago

Yes but this is afaik duo to wrong ai. i already rescripted this and will upload it for discussion/testing soon.

miraco commented 1 year ago

I now had time to get some videos from wotlk classic ptr, and compared them to cMangos. Just to let it stay here: Phantom Dancers - AI - 5 different Types 1) Melee - engineer - Throw Dynamite and Goblin Dragon Gun on current target 2) Melee - priest - Holy Nova on current, Heal on 50% missing (including self) 3) Proximity - hunter - throw as main spell, impale on current 4) Caster - warlock - Searing Pain as main spell, immolate and curse of agony on current 5) melee - Dance Vibe on self (when missing) - punch on current

AI Changes used here: https://github.com/cmangos/tbc-db/pull/1120

Video from cMangos As you can see on this Video, the Buff (casted from the first targeted npc in the video) gets called every seconds on friendly targets, also on the moving npcs around those phantom dancer groups. This shouldnt happen. At the end of the video you can see that the combat log also gets spammed cause of this. CRITICAL

Video vom wotlk classic As you can see in this video from current wotlk ptr, only the Phantom Dancer group (if one of them is type 5) gets the buff. The moving creatures around this group only get the buff when both (the moving creature and the phantom dancer with type 5) enter combat.

First thought its maybe because of the EffectRadius or range, but this video here shows that its not. https://www.youtube.com/watch?v=i-75XBgaV6Y

Same on this: WOTLK PTR And the range betweeon those groups is around 12 WoWScrnShot_032823_015342

Its a quite interesting bug, and for me critical because the combatlog can drop your fps rly hard.

miraco commented 1 year ago

i used a fresh core and database now to get all the changes to this buff and rescripted the mob on a guide based ai so only 1 mob in this room casts the spell on himself. 1 time

https://youtu.be/W-xM4cxfDMU

The problem, and thats why the combat log still gets spammed is that the mobs in range of the npc that casted the spell refresh their buff all the time

if you want to test this like this:

DELETE FROM creature_ai_scripts WHERE creature_id = 16409; INSERT INTO creature_ai_scripts (id, creature_id, event_type, event_inverse_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, event_param6, action1_type, action1_param1, action1_param2, action1_param3, action2_type, action2_param1, action2_param2, action2_param3, action3_type, action3_param1, action3_param2, action3_param3, comment) VALUES ('1640902', '-5320350', '27', '0', '100', '0', '29521', '1', '0', '0', '0', '0', '11', '29521', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Phantom Guest - Cast Dance Vibe OOC (Test)');

miraco commented 1 year ago

I found another group having the same issue.

Wow_mNHCMW4sKg QSW_FFhJRGbqR5

You can see in this screen that on cmangos the Aura of Discipline spreads to nearby friendly npcs all the time. This means, when the patrol that runs around this group comes in range of the legionnaire, they also get the aura. This is wrong.

Also the Aura shouldnt even spread to the group behind the legionnaire as long they are not all infight. https://youtu.be/NBzE0cHyeqY

Im 99% sure that Auras/Spells with SPELL_EFFECT_APPLY_AREA_AURA_PARTY check with what npcs the caster/spreader (that cast and has the aura, for example legionnaire) is in a party (probably spawn_group) as long they are not infight.

Another example for this would be the first group in shattered halls. WowClassic_ayE9vvHGhy

These are 4 spawn_groups + legionnaire as solo patrol. He never spreads the aura as long they are out fight. When you start combat with them, the aura gets spreaded. See here: https://youtu.be/c2_ZdJKWevo

insunaa commented 1 year ago

I've been working on that, there's a PR open for something similar in WotLK. I can extend it to also use aura-party and apply it only to the same spawngroup

miraco commented 1 year ago

I've been working on that, there's a PR open for something similar in WotLK. I can extend it to also use aura-party and apply it only to the same spawngroup

Sounds good to me. But care, this is only true for OOC aura spreading, if groups are infight, aura ignores spawn_group.

But this case seems to be true for other things too. For example: https://youtu.be/yKL5ET7nvrs

Shadowmoon Acolyte can buff his friends incombat and out of combat with "Resist Shadow". In the video you can see he only buffed the friends that are in a party (spawn_group) with the mob. The legionnaire thats patroling before them dont get buffed out of combat. If you start fighting this group now, the acolyte buffs the legionnaire too.

insunaa commented 4 months ago

You should now be able to implement this effect via SpellScript & https://github.com/cmangos/mangos-wotlk/commit/db3f1041ccac430970cde34834ca75da7e60aea7

miraco commented 4 months ago

You should now be able to implement this effect via SpellScript & cmangos/mangos-wotlk@db3f104

Yeah i used it now in here: https://github.com/cmangos/issues/issues/3323 Still i think that not the right way and just hackfixing the real issue. But if someone wants to use it for now, it works like its described in here/ working like one wotlk classic ptr

insunaa commented 4 months ago

I kinda agree, but I was told that buff sharing within a spawn group is not intended core functionality, despite me very much being of the opposite opinion :/