diff options
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 58 |
1 files changed, 18 insertions, 40 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index ec6a9ea4213..9f93097577e 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1186,6 +1186,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const case FORM_GHOSTWOLF: spellId = 67116; break; + case FORM_DIREBEAR: case FORM_GHOUL: case FORM_AMBIENT: case FORM_STEALTH: @@ -1248,7 +1249,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE))) continue; - if (spellInfo->Stances & (1<<(GetMiscValue()-1))) + if (spellInfo->Stances & (1 << (GetMiscValue() - 1))) target->CastSpell(target, glyph->SpellId, true, NULL, this); } } @@ -1262,14 +1263,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const target->CastSpell(target, 24932, true, NULL, this); } - // Improved Barkskin - apply/remove armor bonus due to shapeshift - if (plrTarget->HasSpell(63410) || target->ToPlayer()->HasSpell(63411)) - { - target->RemoveAurasDueToSpell(66530); - if (GetMiscValue() == FORM_TRAVEL || GetMiscValue() == FORM_NONE) // "while in Travel Form or while not shapeshifted" - target->CastSpell(target, 66530, true); - } - // Heart of the Wild if (HotWSpellId) { // hacky, but the only way as spell family is not SPELLFAMILY_DRUID @@ -1289,8 +1282,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const switch (GetMiscValue()) { case FORM_CAT: + // Savage Roar + if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0, 0x10000000, 0)) + target->CastSpell(target, 62071, true); // Nurturing Instinct - if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0)) + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, EFFECT_0)) { uint32 spellId3 = 0; switch (aurEff->GetId()) @@ -1305,42 +1301,36 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const target->CastSpell(target, spellId3, true, NULL, this); } // Master Shapeshifter - Cat - if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_GENERIC, 2851, EFFECT_0)) { int32 bp = aurEff->GetAmount(); target->CastCustomSpell(target, 48420, &bp, NULL, NULL, true); } - break; + break; case FORM_BEAR: // Master Shapeshifter - Bear - if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_GENERIC, 2851, EFFECT_0)) { int32 bp = aurEff->GetAmount(); target->CastCustomSpell(target, 48418, &bp, NULL, NULL, true); } // Survival of the Fittest - if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DRUID, 961, 0)) + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DRUID, 961, EFFECT_0)) { int32 bp = aurEff->GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster()); target->CastCustomSpell(target, 62069, &bp, NULL, NULL, true, 0, this); } - break; + break; case FORM_MOONKIN: // Master Shapeshifter - Moonkin - if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) + if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_HEALING_DONE_PERCENT, SPELLFAMILY_GENERIC, 2851, EFFECT_0)) { int32 bp = aurEff->GetAmount(); target->CastCustomSpell(target, 48421, &bp, NULL, NULL, true); } - break; - // Master Shapeshifter - Tree of Life - case FORM_TREE: - if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0)) - { - int32 bp = aurEff->GetAmount(); - target->CastCustomSpell(target, 48422, &bp, NULL, NULL, true); - } - break; + break; + default: + break; } } } @@ -1351,17 +1341,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (spellId2) target->RemoveAurasDueToSpell(spellId2); - // Improved Barkskin - apply/remove armor bonus due to shapeshift - if (Player* player=target->ToPlayer()) - { - if (player->HasSpell(63410) || player->HasSpell(63411)) - { - target->RemoveAurasDueToSpell(66530); - target->CastSpell(target, 66530, true); - } - } - - const Unit::AuraEffectList& shapeshifts = target->GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT); + Unit::AuraEffectList const& shapeshifts = target->GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT); AuraEffect* newAura = NULL; // Iterate through all the shapeshift auras that the target has, if there is another aura with SPELL_AURA_MOD_SHAPESHIFT, then this aura is being removed due to that one being applied for (Unit::AuraEffectList::const_iterator itr = shapeshifts.begin(); itr != shapeshifts.end(); ++itr) @@ -1376,7 +1356,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const for (Unit::AuraApplicationMap::iterator itr = tAuras.begin(); itr != tAuras.end();) { // Use the new aura to see on what stance the target will be - uint32 newStance = (1<<((newAura ? newAura->GetMiscValue() : 0)-1)); + uint32 newStance = (1 << ((newAura ? newAura->GetMiscValue() : 0) -1)); // If the stances are not compatible with the spell, remove it if (itr->second->GetBase()->IsRemovedOnShapeLost(target) && !(itr->second->GetBase()->GetSpellInfo()->Stances & newStance)) @@ -1874,9 +1854,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo if (!target->CanUseAttackType(BASE_ATTACK)) { if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) - { target->ToPlayer()->_ApplyWeaponDamage(EQUIPMENT_SLOT_MAINHAND, pItem->GetTemplate(), NULL, apply); - } } } @@ -1888,7 +1866,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo { SpellShapeshiftFormEntry const* shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form); // Learn spells for shapeshift form - no need to send action bars or add spells to spellbook - for (uint8 i = 0; i<MAX_SHAPESHIFT_SPELLS; ++i) + for (uint8 i = 0; i < MAX_SHAPESHIFT_SPELLS; ++i) { if (!shapeInfo->stanceSpell[i]) continue; |