Closed Tobschinski closed 2 years ago
the auras on spawn are reapplied when the home position is reached.
Please verify when they should re-apply them exactly.
Oh yes, I have to be more precise. When the aura was added with creature_template_addon, it will be removed and reapplied. If you use ACID, it will not be renewed (unless I am doing something wrong)
I will shoot some screens to show the retail behavior.
if you do it with acid, you need it to both spawn (reapplied on respawn as well) AND ReachedHome
I should probably try to do a video, but I have a screen that shows an aura that persists even through the evade-phase.
These 2 screens will show you, that the aura is never removed. (not reapplied, that would be visible, as it would have the same effect as 'on spawn')
Second screen was taken during evade-mode.
If you would still like to have a video, I will try to get you one!
well, one would need to research if this is an effect of many/which auras, and dependingly on these results there simply needs to be added an exception to RemoveAurasOnEvade. Obviously all combat-related auras needs to be removed (all debuffs) - but very likely also buffs from friendly npcs. I think the original reapplying on JustReachedHome was done to ensure all negative related auras (passives and such) are really removed.
Maybe the system isn't spell- but phase-dependable. Haven't thought of much, but I do not see any spell that needs to be removed while evading, which has been set on spawn.
Anyways, this isn't a major issue if you use creature_template_addon. The need of adding the same spell twice or even a third time in ACID, is. But as I don't like storing similar information in different tables, I would like to stick to ACID.
Little update here:
I am not quite sure if buffs from friendly NPCs should be removed. e.g. The Battleshout casted by Qiraji Slayers on friendly NPCs if they die is not removed on Evade, nor on ReachHome. It persists until the timer runs out.
Something that for obsious reasons needs to be removed are enrage buffs. I've looked at some from the AQ Bosses and they are removed on ReachHome.
Other creatures in AQ, like the Vekniss Guardian lose their enrage buff on Evade.
At least I am not aware of any correlation between never, evade and home. Could you think, that these buffs (enrages) are explicitely removed in the scripts and not automatically?
The reason why this whole topic matters to me is, because I find it relatively easy to get creatures on evade and let them rejoin the fight immediately after that, without its auras. That's an easy exploit, in my eyes.
well reasonable sollution is for me:
I think there is method to identify if an aura is friendly but how to properly identify enrage?
some friendly auras should be removed on evade. I know that on retail not all auras are removed on evade, but this requires proper research. Maybe there is an attribute for this.
Which spell, that was cast on_spawn should be removed?
Currently all spells are removed on evade (except for vehicle boarding auras). However, are spells that shouldn't be removed on evade, but I couldn't find any general rule for this. Most of the time the negative should be removed, but sometimes also positive auras should be removed (for example positive buffs cast by creature on itself during the encounter should be removed on reset).
No, I mean can you think of any buffs in particular that should be removed except for Frenzy buffs? I'd like get an ID or a name to see the differences.
Because I am doing lots of bosses these days and have yet to see any buffs that are removed in a reset, except for the mentioned Frenzy buffs.
Magmadar does not lose his enrage buff in a reset. Shazzrah does not lose his Magic Grounding buff in a reset (although it is currently a de-buff in CManGOS, that needs to be changed, with lots of other buffs) Frenzy buff of Garr is removed. Inspire, cast by Sulfuron Harbinger is not removed. Not able to test Majordomo Executus right now, he has a shield.
I will do AQ40 soon and report back.
SMART_ACTION_ADD_AURA. It is very well suited) Less hemorrhoids! I can try to rewrite the patches under Mangos!
// ACTION_T_ADD_AURA = 11
struct
{
uint32 spellId;
uint32 target;
} cast;
...
ACTION_T_ADD_AURA
if (!IsSpellValid(e, e.action.cast.spell))
return false;
break;
...
case ACTION_T_ADD_AURA:
{
uint32 spellId = 0;
{
spellId = action.cast.spellId;
}
Unit* target = GetTargetByType(action.cast.target, pActionInvoker, pAIEventSender, reportTargetError, spellId);
else if Unit* target = AddAura(action.cast.target, pActionInvoker, pAIEventSender, reportTargetError, spellId);
if (!target)
{
if (reportTargetError)
sLog.outErrorEventAI("NULL target for ACTION_T_ADD_AURA creature entry %u casting spell id %u", m_creature->GetEntry(), action.cast.spellId);
return;
}
...
I understand from my worthless patch writer, but was worth a try. Took just an example of adding. ACTION_T_CAST will not work for the reason that most spells at evade not cast. For some reason, I can not say. Attribute may need?
ACTION_T_ADD_AURA = ACTION_T_CAST. I already explained this again a few times already. Internally ACTION_T_CAST will call AddAura (or something similar) if the spell that you are casting is an aura.
Aura will be removed on evade no matter in which way you apply the aura, because that's they default evade behavior. If we need to change this, then proper documentation is needed, and also proper setup of positive / negative auras is required.
ACTION_T_ADD_AURA = ACTION_T_CAST. I already explained this again a few times already.
Internally ACTION_T_CAST will call AddAura (or something similar) if the spell that you are casting is an aura.
I understand it very well, but I suggested for what would be auras, which are shot at evade could use the script to restore and create the appearance that they were not removed.
I understand it very well, but I suggested for what would be auras, which are shot at evade could use the script to restore and create the appearance that they were not removed.
This is already happening, and you can already do this by casting the spell again on Event Reached Home. The problem was: if we need to remove positive auras on evade or not
Reached Home - not quite what they say! You also have to provide screenshots, where it is clear that the aura can not be deleted. Therefore suggested that such an option. Picking the kernel on this subject, can easily run into the crash.
I think like @Tobschinski, Positive spell should not be removed from any creature on evade. Only exception is frenzy. Someone maybe have another??? Please think of it. Because if no answer i'll probably fix that behavior.
Let's do some research on attributes first.
Also, this will require some major ACID script rework and probably also some adjustments on SD2, because then all auras that are applied on Reset() will require to have the CAST_AURA_NOT_PRESENT flag, in order to avoid possible stacking.
@xfurry found the reason why castspell in ScriptAI::Reset() not work. Its because creature at that specific time is in evade mode. So spell miss by evade.
So well a simple fix is to move that castspell to JustReachedHome() event instead. There might be a lot of script in that case? But, better is to avoid removing their positive spell as suggested.
Have you tested this on many creatures? I know that on my recent work on Ulduar, I had a lot of auras which were applied on Reset(), and I never saw any problem with this behavior.
I think that this might be something specific only to this spell, and not a general scenario. See for example Freya: https://github.com/scriptdev2/scriptdev2/blob/master/scripts/northrend/ulduar/ulduar/boss_freya.cpp#L255 When I scripted this, all the auras were applied just fine, even after evade.
Huh, the casts happen in void Aggro(). Or do I miss something obvious.
But how could it be just one spell, Golemagg by default has 3 spawn spells (2 of them are currently missing, I will open a PR for them anytime soon). After adding them, they are also not re-applied.
I will look for more creatures.
@xfurry you probably miss link, here i talk only about specific spell cast in Reset(). Reset() may be called in other place btw, but for this case, when it come from EnterEvadeMode() we cannot cast spell in Reset(). They will all fail. Positive or negative.
Reset() is always called by the constructor and by the EnterEvadeMode(). There is none of very few scripts in SD2 that calls Reset() outside of these functions. In my example the Reset is clearly called by the evade function. Just test Freya and you'll see that I'm right.
I think you misunderstaind me.
Freya reset() contain no cast spell wich is what iam talking about from yesterday :) Where golemagg have one. Freya doesn't have any aura at reset. (Select it and try .list auras) Golemagg have auras (SPELL_MAGMA_SPLASH) Freya will get its aura at aggro (Sure its right way?) so no problem to cast it a spell at that time.
My apologies. I gave a wrong example. Thy the following: https://github.com/scriptdev2/scriptdev2/blob/master/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp#L151
As per my knowledge Lady Deathwhisper always had the channeling animation working.
@Tobschinski, @xfurry, @cyberium please see http://cmangos.net/thread-6686.html I finally understood how the castes at evade.
A little bump here, as this is a rather important issue.
1) SD2-Observation: Spells placed into Reset() that is called from ScriptedAI::EnterEvadeMode (default behaviour) i would expect to not be working (As Reset() is called after MoveTargetedHome)
Felmyst has custom EnterEvadeMode, hence no trouble. Lady Deathwhisper is not moving, especially calls SetCombatMovement(false) in Reset() I think these two might be explained with this behaviour already
2) Auras that must not be removed on Evade I added the exception for Vehicle-Boarding, also i had flying auras in mind. As shown here, there exists many more. Question is which ones. This requires strong research.
Yes, if the creature can not move, then he and problems with custom aura okay. Felmyst - If spells, which she uses to evade would interrupt flags, then it would not be able to use them. I say that if there is Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000 the client will not send opcode interrupt spells. But if they had, the user evade mod would not have helped you. I'm on Ultraxion tested.
There is a switchcase for adding such auras, but it would be rather important to not pollute that one without confirming the behavior in sniff, so we might get a general ruleset in place, which auras with what attributes need to be handled like that.
Fixed by implementing SPELL_ATTR_SS_IGNORE_EVADE for spell_template AttributesServerside column. Has to be fixed on a case by case basis.
Auras, that were set on spawn and should last forever (like stealth detection) are removed once a creature evades.
This does not occur on retail servers. The aura should persist until the creature dies.
In order to not need to add a single spell in different phases, a change may be useful.