Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZA Zul'Jin #61

Open
overy opened this issue May 15, 2013 · 18 comments
Open

ZA Zul'Jin #61

overy opened this issue May 15, 2013 · 18 comments

Comments

@overy
Copy link

overy commented May 15, 2013

After party wipe when Zul'jin is transfered into some form, next time he tries transform to any form, he stucks and does nothing.

@Schmoozerd
Copy link
Member

Hmm, no obvious mistake within the script, maybe a possible glitch with these spirits as they might be stunned and hence behave strangely

Can you test this patch please:

diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp
index 0ae3605..5d54d63 100644
--- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp
+++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp
@@ -197,6 +197,7 @@ struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI
         {
             if (Creature* pSpirit = m_pInstance->GetSingleCreatureFromStorage(aZuljinPhases[i].uiSpiritId))
             {
+                pSpirit->RemoveAllAurasOnEvade();
                 pSpirit->SetStandState(UNIT_STAND_STATE_STAND);
                 pSpirit->AI()->EnterEvadeMode();
             }

@xfurry
Copy link
Member

xfurry commented May 15, 2013

@overy please give us more details:

  1. Which SD2 version you have (LK or TBC)?
  2. Which DB version you have?
  3. Which EAI scripts do you use?
  4. Do you have any custom patches or scripts?
  5. Does this issue happen every time, or it's just something which happens randomly?

@overy
Copy link
Author

overy commented May 15, 2013

@xfurry

  1. TBC
    2, 3, TBC-DB Update Pack 1.3.1 (1.4.0 FULL) " Our Happy Hardcore" Has Been Released
  2. nope
  3. yes tested four times

@Schmoozerd
I will try it...

edit: Hmm seems to be good

@xfurry
Copy link
Member

xfurry commented May 16, 2013

@overy so does the patch Schmoo provided work fine? If yes, I will push this to master as soon as possible.

@Schmoozerd
Copy link
Member

i think if this works there must be some other bug - @xfurry please still do your tests, this looks like some hidden issue that the spirit guys don't evade properly (.list auras .npc aiinfo)

@overy
Copy link
Author

overy commented May 16, 2013

@xfurry tested three times and no stuck. So it is possible work.

@overy
Copy link
Author

overy commented May 17, 2013

So patch work fine, but if he cast Whirlwind spell and he is ready for transform, visual stay in Trol model (need interupt Whirwind?).
Pillar of Flame don't do any damage (faction 35 in DB is problem?). When i try set faction the same as Zul'jin pillars do only one tick and "despawn".

@xfurry
Copy link
Member

xfurry commented May 17, 2013

@overy I tested your issue on the exact configuration as you (without the patch from Schmoo) and I couldn't find any problem.
The only thing I could find is a DB issue on unit flags:

 UPDATE `creature_template` SET `unit_flags` = 33536 WHERE `entry`  IN (23877, 23878, 23879, 23880); 

I noticed that without this unit flag some spirits get killed during the fight, so it's obvious that they won't be able to channel the spirit drain spell again, since they can't cast spells while dead 😛
Try to use this patch first (without any SD2 changes) and let me know if it works.

PS. Just seen the message you wrote a few min ago:

  1. Yes, probably we should interrupt whirlwind. I'll do more tests on this.
  2. Yes, that's another DB issue. If you change the faction to hostile, what will happen is that the npc will damage the players. This will make him get in combat, but it can't attack since it has the not_selectable flag, so it ends up evading. On evade, all auras are removed, and that's why you won't see it anymore.
    This is a rather old core issue. Poke @Schmoozerd about it. What you can do, is try to add the aura in creature_template_addon. However this may not be the desired way to fix it.

@overy
Copy link
Author

overy commented May 17, 2013

@xfurry I'am tested it now without this patch and works so there must be something what me with testers do :/ If I find something give feedback about it.

  1. Hm interestring, next possible way is set speed on zero value (or add rooted flag) and remove not_selectable flag. Npc can attack ppl but can't move and do only 1dmg.

BTW: About his Whirlwind it do only 1 tick? It is correct? I can't find any info about it.

xfurry added a commit that referenced this issue May 17, 2013
This fixes some of the issues posted on #61
@overy
Copy link
Author

overy commented May 28, 2013

I found new bugs:

In phase 4 after he use some abilities he stop use autoattack (the same problem as Whirlwind?), Claw rage not working properly it don't do any damage.
In phase 5 Flame Whirl doesnt increase fire damage from Flame Columns (about Flame Breath I don't know).

@xfurry
Copy link
Member

xfurry commented May 28, 2013

  1. This is actually a core issue. You can see that spell http://wotlk.openwow.com/spell=43152 applies aura of Melee Haste with base points = -6000. This means that the time between the melee attacks is reduced a lot. The problem is that when this aura is removed, the melee attack timers aren't reset. I don't know exactly how to debug this, so poke @Schmoozerd
  2. The Flame Whirl should work fine: http://www.wowhead.com/spell=43213 The only issue I could think of is some aura stacking issue or some target related issue. So, also core related.

@overy
Copy link
Author

overy commented May 28, 2013

  1. And this problem broke Claw rage?
  2. Ehm my bad, it hits Zul'jin :D I try solve problem with it :/

@Schmoozerd
Copy link
Member

for the second, try to use zul'jin as original caster for the spell that hits him

@xfurry
Copy link
Member

xfurry commented Aug 21, 2013

Poke @overy is this issue still alive, or can we close this?

@overy
Copy link
Author

overy commented Aug 21, 2013

Looks good.

@Schmoozerd
Copy link
Member

@xfurry - you wrote:

This is actually a core issue. You can see that spell http://wotlk.openwow.com/spell=43152 applies aura of Melee Haste with base points = -6000. This means that the time between the melee attacks is reduced a lot. The problem is that when this aura is removed, the melee attack timers aren't reset. I don't know exactly how to debug this, so poke @Schmoozerd

I think you simply need to reset the attack-timer_s_ to std::min(currentTimer, maxTimerWithoutAura) on auraRemoval.
Dunno the code context, but i think you will figure this pretty fast :)

@xfurry
Copy link
Member

xfurry commented Aug 22, 2013

I haven't tested this, but I think it might do the trick:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 9545dc4..2a670e4 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6346,6 +6346,8 @@ void Aura::HandleModMeleeSpeedPct(bool apply, bool /*Real*/)
     Unit* target = GetTarget();
     target->ApplyAttackTimePercentMod(BASE_ATTACK, float(m_modifier.m_amount), apply);
     target->ApplyAttackTimePercentMod(OFF_ATTACK, float(m_modifier.m_amount), apply);
+    target->resetAttackTimer(BASE_ATTACK);
+    target->resetAttackTimer(OFF_ATTACK);
 }

 void Aura::HandleAuraModRangedHaste(bool apply, bool /*Real*/)

What do you think?

@Schmoozerd
Copy link
Member

hmm, why reset?
just assume you had the next hit coming, and now it is reset too a more distant time. this would not be wanted.

hence i think you need to use some clever system with min/max (remaining current time, and reset-time) and dependend on apply/remove and positive / negative effect.

To be clear:
Case A: Aura with attack-delay - apply
new timer must be std::max(newTime, currentRemainingTime)

CASE B: Aura with attack-speedup, apply
new timer must be std::min(newTime, currentRemainingTime)

case C: Aura with attack-speedup, remove
new timer must be std::max(newTime, currentRemainingTime)

case D: Aura with attack-delay, remove
new timer must be std::min(newTime, currentRemainingTime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants