Jump to content

[spell] Decimate (Naxxramas: Gluth)


Guest przemratajczak

Recommended Posts

MaNGOS 9754

SD2 1677

UDB 389

Bug:

Spell Decimate does not "Reduce the current health of all nearby units to 5% of their maximum health."

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index dc35dff..cb2d69c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5782,6 +5782,15 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)

                    return;
                }
+                case 28374:                                 // Decimate (Naxxramas: Gluth)
+                {
+                    if (!unitTarget || unitTarget->GetHealthPercent() <= 5.0f)
+                        return;
+
+                    int32 damage = unitTarget->GetHealth() - unitTarget->GetMaxHealth() * 0.05;
+                    unitTarget->CastCustomSpell(unitTarget, 28375, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
+                    return;
+                }
                case 29830:                                 // Mirren's Drinking Hat
                {
                    uint32 item = 0;

http://paste2.org/p/778958

Link to comment
Share on other sites

it is "reduce [...] to 5% of their maximum health", not "by".

so both of your patches are wrong. the correct calculation looks like this:

int32 damage = unitTarget->GetMaxHealth() * 0.05;

EDIT: damn, too late for me... sorry, of course the first patch was correct!

:(

Link to comment
Share on other sites

lol just use

case 71123:                                 // Decimate (ICC: Stinky/Prec)
{
  if (!unitTarget || unitTarget->GetHealthPercent() <= 5.0f)
     return;

 int32 damage = unitTarget->GetHealth() - unitTarget->GetMaxHealth() * 0.05;
   unitTarget->CastCustomSpell(unitTarget, 71123, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
   return;
}

Link to comment
Share on other sites

lol just use

case 71123:                                 // Decimate (ICC: Stinky/Prec)
{
  if (!unitTarget || unitTarget->GetHealthPercent() <= 15.0f)
     return;

 int32 damage = unitTarget->GetHealth() - unitTarget->GetMaxHealth() * 0.15;
   unitTarget->CastCustomSpell(unitTarget, 71123, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
   return;
}

typo for this one :)

Link to comment
Share on other sites

I doubt this;

(wowhead Gluth-article)

Decimate - Every 105 seconds Gluth will use this ability and reduce the health of everybody in the room (players and Zombie Chows) to 5%. After Decimate, all Zombies will attempt to run to Gluth and ignore threat tables.

the other decimate spell has no send-event effect

So I think the SpellEffect is to handle the Dmg to the targets (as original patch)

and the SendEvent effect for the Gluth spell to change the threatmanagement for the Gluth-Adds

Link to comment
Share on other sites

I doubt this;

the other decimate spell has no send-event effect

So I think the SpellEffect is to handle the Dmg to the targets (as original patch)

and the SendEvent effect for the Gluth spell to change the threatmanagement for the Gluth-Adds

When did I say "send event"?

I was referring to the script effect part of the spell. Since there is a seperate damage spell, it would make sense for this script effect to cause the damage spell. Then the damage would have to be implemented as part of this seperate spell, in Spell::EffectSchoolDMG(). All the Decimate spells have this script effect as part of them.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use