Jump to content

[FIX] Mark of Kaz'rogal


Guest Forusim

Recommended Posts

What bug does the patch fix? What features does the patch add?

Activate detonation when Player have no mana to burn

For which repository revision was the patch created?

9690++

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://www.scriptdev2.com/project.php?issueid=822

Who has been writing this patch? Please include either forum user names or email addresses.

Me with a bit of help of Patman

Code diff:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp

index c766522..4f6fe8d 100644

--- a/src/game/SpellAuras.cpp

+++ b/src/game/SpellAuras.cpp

@@ -7333,6 +7333,16 @@ void Aura::PeriodicTick()

sLog.outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",

GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());

+ // Mark of Kaz'rogal

+ if (m_spellProto->Id == 31447 && m_target->GetPower(power) < pdamage)

+ {

+ if (m_target && m_target->GetTypeId() == TYPEID_PLAYER && m_target->getPowerType() == POWER_MANA)

+ {

+ m_target->CastSpell(m_target, 31463, true);

+ }

+ m_target->RemoveAura(GetId(), GetEffIndex());

+ }

+

int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power);

// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

For latest Rev 10018:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 876526a..f7e5a12 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7446,6 +7446,16 @@ void Aura::PeriodicTick()
            DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
                GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());

+            // Mark of Kaz'rogal
+            if (m_spellProto->Id == 31447 && m_target->GetPower(power) < pdamage)
+            {
+                if (m_target && m_target->GetTypeId() == TYPEID_PLAYER && m_target->getPowerType() == POWER_MANA)
+                {
+                    m_target->CastSpell(m_target, 31463, true);
+                }
+                m_target->RemoveAura(GetId(), GetEffIndex());
+            }
+
            int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power);

            // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)

Link to comment
Share on other sites

  • 1 year later...

why the check target == PLAYER?

I think that's unnecessary.

I think the remove is wrong, because the player with 0 mana should die in explosion. If one player with 0 mana have 15k life, this player is alive after explosion (Basepoints from Explosion BasePoints = 10213 to 11288). But without remove the player dies in next tick :).

+ switch (GetId())

+ {

+ case 31447: // Mark of Kaz'rogal

+ {

+ if (target->getPowerType() == POWER_MANA && target->GetPower(POWER_MANA) == 0)

+ {

+ target->CastSpell(target, 31463, true, NULL, this);

+ }

+ break;

+ }

+ }

NOT TESTET

Link to comment
Share on other sites

×
×
  • 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