All pastes #901529 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-12 19:02 UTC
rendered paste body
Index: game/SpellAuras.cpp
===================================================================
--- game/SpellAuras.cpp	(revision 5205)
+++ game/SpellAuras.cpp	(working copy)
@@ -1315,6 +1315,24 @@
                 caster->CastSpell(m_target,finalSpelId,true,NULL,this);
         }
     }
+
+    // lifebloom
+    if ( !apply && 
+		 GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
+         (GetSpellProto()->SpellFamilyFlags & 0x1000000000LL) )
+    {
+        int32 healBasePoints0 = m_modifier.m_amount;
+
+        // have a look if there is still some other lifebloom dummy aura
+        Unit::AuraList auras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
+        for(Unit::AuraList::iterator itr = auras.begin(); itr!=auras.end(); itr++)
+           if((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
+               (*itr)->GetSpellProto()->SpellFamilyFlags & 0x1000000000LL)
+               return;
+
+        m_target->CastCustomSpell(m_target,33778,&healBasePoints0,NULL,NULL,true);
+    }
+
 }
 
 void Aura::HandleAuraMounted(bool apply, bool Real)
Index: game/Unit.cpp
===================================================================
--- game/Unit.cpp	(revision 5205)
+++ game/Unit.cpp	(working copy)
@@ -6339,6 +6525,11 @@
             if (spellProto->SpellFamilyFlags & 0x000000002000LL) // Healing stream from totem (add 6% per tick from hill bonus owner)
                 CastingTime = 210;                               // 
             break;
+		case  SPELLFAMILY_DRUID:
+			// Lifebloom final heal
+			if (spellProto->SpellFamilyFlags & 0x1000000000LL && damagetype != DOT)
+                CastingTime = 1500;
+            break;
     }
     // Level Factor
     float LvlPenalty = 0.0f;
@@ -7580,6 +7771,13 @@
             modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DOT, value);
     }
 
+    // Lifebloom dummy needs to be saved with precalculated ammount already
+    if ( target && spellProto->SpellFamilyName == SPELLFAMILY_DRUID &&
+        (spellProto->SpellFamilyFlags & 0x1000000000LL) &&
+        spellProto->EffectApplyAuraName[effect_index] == SPELL_AURA_DUMMY )
+        pdamage = SpellHealingBonus(spellProto, value, SPELL_DIRECT_DAMAGE, target);
+
+
     return value;
 }