mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 05:55:07 +00:00
fix(Core): Removing auras from spells that trigger taxi (#4820)
This commit is contained in:
@@ -802,6 +802,8 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
|
|||||||
m_deathTimer = 0;
|
m_deathTimer = 0;
|
||||||
m_deathExpireTime = 0;
|
m_deathExpireTime = 0;
|
||||||
|
|
||||||
|
m_flightSpellActivated = 0;
|
||||||
|
|
||||||
m_swingErrorMsg = 0;
|
m_swingErrorMsg = 0;
|
||||||
|
|
||||||
for (uint8 j = 0; j < PLAYER_MAX_BATTLEGROUND_QUEUES; ++j)
|
for (uint8 j = 0; j < PLAYER_MAX_BATTLEGROUND_QUEUES; ++j)
|
||||||
@@ -21928,6 +21930,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_flightSpellActivated = spellid;
|
||||||
GetSession()->SendActivateTaxiReply(ERR_TAXIOK);
|
GetSession()->SendActivateTaxiReply(ERR_TAXIOK);
|
||||||
GetSession()->SendDoFlight(mount_display_id, sourcepath);
|
GetSession()->SendDoFlight(mount_display_id, sourcepath);
|
||||||
}
|
}
|
||||||
@@ -21951,6 +21954,12 @@ bool Player::ActivateTaxiPathTo(uint32 taxi_path_id, uint32 spellid /*= 1*/)
|
|||||||
|
|
||||||
void Player::CleanupAfterTaxiFlight()
|
void Player::CleanupAfterTaxiFlight()
|
||||||
{
|
{
|
||||||
|
// For spells that trigger flying paths remove them at arrival
|
||||||
|
if (m_flightSpellActivated)
|
||||||
|
{
|
||||||
|
this->RemoveAurasDueToSpell(m_flightSpellActivated);
|
||||||
|
m_flightSpellActivated = 0;
|
||||||
|
}
|
||||||
m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
|
m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
|
||||||
Dismount();
|
Dismount();
|
||||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
||||||
|
|||||||
@@ -2971,6 +2971,8 @@ private:
|
|||||||
|
|
||||||
bool m_isInstantFlightOn;
|
bool m_isInstantFlightOn;
|
||||||
|
|
||||||
|
uint32 m_flightSpellActivated;
|
||||||
|
|
||||||
// Remote location information
|
// Remote location information
|
||||||
uint32 m_cinematicDiff;
|
uint32 m_cinematicDiff;
|
||||||
uint32 m_lastCinematicCheck;
|
uint32 m_lastCinematicCheck;
|
||||||
|
|||||||
Reference in New Issue
Block a user