Jump to content

[fix] Mana Tide Totem's health


Guest Ceris

Recommended Posts

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

This patch fixes health of mana tide totem, which should be 10% of caster's health

http://www.wowhead.com/spell=16190

For which repository revision was the patch created?

[10049]

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

couldnt find any

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

me

diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index eae836f..8f5e348 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -53,6 +53,13 @@ void Totem::Update( uint32 time )

void Totem::Summon(Unit* owner)
{
+    // Mana Tide Totem should have 10% of caster's health
+    if (GetSpell() == 16191)
+    {
+        SetMaxHealth(owner->GetMaxHealth()*10/100);
+        SetHealth(GetMaxHealth());
+    }
+
    owner->GetMap()->Add((Creature*)this);

    // select totem model in dependent from owner team

Link to comment
Share on other sites

my version

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 4303e17..11db5c1 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6797,6 +6802,9 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc)
        modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
    pTotem->SetDuration(duration);

+    if (m_spellInfo->Id == 16190)
+        damage = m_caster->GetMaxHealth() * m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_1) / 100;
+
    if (damage)                                             // if not spell info, DB values used
    {
        pTotem->SetMaxHealth(damage);

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