diff options
author | megamage <none@none> | 2009-03-02 16:34:17 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-02 16:34:17 -0600 |
commit | 5997e2d5db5618e5d84733bd224426499f621f33 (patch) | |
tree | 345db0d11ce4feb8c9ca68e52458cbc954b05bd6 /src/game/Unit.cpp | |
parent | 352df954f6e1a8542118e8108928ea5fe268f431 (diff) | |
parent | cdd178b9c29853d5e498b474006a3635009a50a4 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d0bd170b931..69884279379 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5485,14 +5485,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 56160; break; } - // Glyph of Dispel Magic
- case 55677:
- {
- if(!target->IsFriendlyTo(this))
- return false;
-
- basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100);
- triggered_spell_id = 56131;
+ // Glyph of Dispel Magic + case 55677: + { + if(!target->IsFriendlyTo(this)) + return false; + + basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100); + triggered_spell_id = 56131; break; } // Oracle Healing Bonus ("Garments of the Oracle" set) @@ -6330,6 +6330,30 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } break; } + case SPELLFAMILY_POTION: + { + if (dummySpell->Id == 17619) + { + if (procSpell->SpellFamilyName == SPELLFAMILY_POTION) + { + for (uint8 i=0;i<3;i++) + { + if (procSpell->Effect[i]==SPELL_EFFECT_HEAL) + { + triggered_spell_id = 21399; + } + else if (procSpell->Effect[i]==SPELL_EFFECT_ENERGIZE) + { + triggered_spell_id = 21400; + } + else continue; + basepoints0 = CalculateSpellDamage(procSpell,i,procSpell->EffectBasePoints[i],this) * 0.4f; + CastCustomSpell(this,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura); + } + return true; + } + } + } default: break; } @@ -12302,6 +12326,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss) // FORM_SPIRITOFREDEMPTION and related auras pVictim->CastSpell(pVictim,27827,true,NULL,*itr); + pVictim->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // should not be attackable SpiritOfRedemption = true; break; } @@ -12312,6 +12337,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss) { DEBUG_LOG("SET JUST_DIED"); pVictim->setDeathState(JUST_DIED); + pVictim->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // reactive attackable flag } // 10% durability loss on death |