diff options
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 0a90f721899..e8e45c96db4 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17230,6 +17230,10 @@ void Player::RestoreSpellMods(Spell * spell) else mod->charges++; + // Do not set more spellmods than avalible + if (mod->ownerAura->GetAuraCharges() < mod->charges) + mod->charges = mod->ownerAura->GetAuraCharges(); + // Skip this check for now - aura charges may change due to various reason // TODO: trac these changes correctly //assert (mod->ownerAura->GetAuraCharges() <= mod->charges); @@ -17656,6 +17660,14 @@ bool Player::ActivateTaxiPathTo( uint32 taxi_path_id, uint32 spellid /*= 0*/ ) return ActivateTaxiPathTo(nodes,NULL,spellid); } +void Player::CleanupAfterTaxiFlight() +{ + m_taxi.ClearTaxiDestinations(); // not destinations, clear source node + Unmount(); + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); + getHostilRefManager().setOnlineOfflineState(true); +} + void Player::ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs ) { // last check 2.0.10 @@ -19366,7 +19378,7 @@ void Player::SummonIfPossible(bool agree) if(isInFlight()) { GetMotionMaster()->MovementExpired(); - m_taxi.ClearTaxiDestinations(); + CleanupAfterTaxiFlight(); } // drop flag at summon |