From 0a7691083d5f6109ca0cd0b336b15052ca5cfba4 Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 24 Jun 2009 00:12:09 +0200 Subject: *Fix the bug that player gets dismounted during taxi flights with many flymasters. *Mana feed now gives pet mana during Drain Mana spell. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 14 ++++++++++++++ src/game/SpellEffects.cpp | 5 ++++- src/game/TaxiHandler.cpp | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 3a73990426a..f77f3d01acc 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6348,6 +6348,20 @@ void AuraEffect::PeriodicTick() GetParentAura()->SetAuraDuration(0); } } + // Mana Feed - Drain Mana + if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK + && m_spellProto->SpellFamilyFlags[0] & 0x00000010) + { + int32 manaFeedVal = 0; + if (AuraEffect const * aurEff = GetParentAura()->GetPartAura(1)) + manaFeedVal = aurEff->GetAmount(); + + if(manaFeedVal > 0) + { + manaFeedVal = manaFeedVal * gain_amount / 100; + pCaster->CastCustomSpell(pCaster, 32554, &manaFeedVal, NULL, NULL, true, NULL, this); + } + } break; } case SPELL_AURA_OBS_MOD_ENERGY: diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 6b453a3a6c9..cdc82d09587 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1493,7 +1493,10 @@ void Spell::EffectDummy(uint32 i) for(Unit::AuraEffectList::const_iterator itr = mod.begin(); itr != mod.end(); ++itr) { if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 1982) - manaFeedVal+= (*itr)->GetAmount(); + { + manaFeedVal = (*itr)->GetAmount(); + break; + } } if(manaFeedVal > 0) { diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp index 0928b8ba96a..0587eba4a64 100644 --- a/src/game/TaxiHandler.cpp +++ b/src/game/TaxiHandler.cpp @@ -253,6 +253,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& /*recv_data*/) SendDoFlight( mountDisplayId, path, 1 ); // skip start fly node else GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next + return; } GetPlayer()->m_taxi.ClearTaxiDestinations(); // not destinations, clear source node -- cgit v1.2.3