diff options
author | QAston <none@none> | 2009-06-24 00:12:09 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-24 00:12:09 +0200 |
commit | 0a7691083d5f6109ca0cd0b336b15052ca5cfba4 (patch) | |
tree | ec1648e071060bccee3328c4b0d0ec575bed4d5d | |
parent | d6a3770597f63dadc094a16ef33d27533876c3c6 (diff) |
*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
-rw-r--r-- | src/game/SpellAuras.cpp | 14 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 5 | ||||
-rw-r--r-- | src/game/TaxiHandler.cpp | 1 |
3 files changed, 19 insertions, 1 deletions
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 |