diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index f6153c80f..1554d0b60 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -753,7 +753,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) { sLog.outDebug( "WORLD: Restart character %u taxi flight", pCurrChar->GetGUIDLow() ); - uint32 MountId = objmgr.GetTaxiMount(sourceNode, pCurrChar->GetTeam()); + uint32 MountId = objmgr.GetTaxiMount(sourceNode, pCurrChar->GetTeam(),true); uint32 path = pCurrChar->m_taxi.GetCurrentTaxiPath(); // search appropriate start path node diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index c68c89859..763532169 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -4639,7 +4639,7 @@ void ObjectMgr::GetTaxiPath( uint32 source, uint32 destination, uint32 &path, ui path = dest_i->second.ID; } -uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team ) +uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team, bool allowed_alt_team /* = false */) { uint16 mount_entry = 0; uint16 mount_id = 0; @@ -4650,6 +4650,9 @@ uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team ) if (team == ALLIANCE) { mount_entry = node->MountCreatureID[1]; + if(!mount_entry && allowed_alt_team) + mount_entry = node->MountCreatureID[0]; + CreatureInfo const *ci = GetCreatureTemplate(mount_entry); if(ci) mount_id = ci->DisplayID_A; @@ -4657,6 +4660,10 @@ uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team ) if (team == HORDE) { mount_entry = node->MountCreatureID[0]; + + if(!mount_entry && allowed_alt_team) + mount_entry = node->MountCreatureID[1]; + CreatureInfo const *ci = GetCreatureTemplate(mount_entry); if(ci) mount_id = ci->DisplayID_H; diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index d58921455..037148be6 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -398,7 +398,7 @@ class ObjectMgr uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team ); void GetTaxiPath( uint32 source, uint32 destination, uint32 &path, uint32 &cost); - uint16 GetTaxiMount( uint32 id, uint32 team ); + uint16 GetTaxiMount( uint32 id, uint32 team, bool allowed_alt_team = false); void GetTaxiPathNodes( uint32 path, Path &pathnodes, std::vector& mapIds ); void GetTransportPathNodes( uint32 path, TransportPath &pathnodes ); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ff6c7d413..10db9a9e8 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -223,7 +223,7 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values, uint } // can't load taxi path without mount set (quest taxi path?) - if(!objmgr.GetTaxiMount(GetTaxiSource(),team)) + if(!objmgr.GetTaxiMount(GetTaxiSource(),team,true)) return false; return true; @@ -16825,8 +16825,8 @@ bool Player::ActivateTaxiPathTo(std::vector const& nodes, uint32 mount_i prevnode = lastnode; } - if(!mount_id) // if not provide then attempt use default. - mount_id = objmgr.GetTaxiMount(sourcenode, GetTeam()); + if(!mount_id) // if not provide then attempt use default, allow seelct alt team mount creature model but for proper team in spell case. + mount_id = objmgr.GetTaxiMount(sourcenode, GetTeam(), npc == NULL); if (mount_id == 0 || sourcepath == 0) { diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 3629d0c4b..a5c856db4 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -613,6 +613,7 @@ void Spell::FillTargetMap() case SPELL_EFFECT_SUMMON_OBJECT_WILD: case SPELL_EFFECT_SELF_RESURRECT: case SPELL_EFFECT_REPUTATION: + case SPELL_EFFECT_SEND_TAXI: if(m_targets.getUnitTarget()) tmpUnitMap.push_back(m_targets.getUnitTarget()); // Triggered spells have additional spell targets - cast them even if no explicit unit target is given (required for spell 50516 for example) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index db243d028..ee66de93b 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6051,32 +6051,7 @@ void Spell::EffectSendTaxi(uint32 i) nodes[0] = entry->from; nodes[1] = entry->to; - uint32 mountid = 0; - switch(m_spellInfo->Id) - { - case 31606: //Stormcrow Amulet - mountid = 17447; - break; - case 45071: //Quest - Sunwell Daily - Dead Scar Bombing Run - case 45113: //Quest - Sunwell Daily - Ship Bombing Run - case 45353: //Quest - Sunwell Daily - Ship Bombing Run Return - mountid = 22840; - break; - case 34905: //Stealth Flight - mountid = 6851; - break; - case 45883: //Amber Ledge to Beryl Point - mountid = 23524; - break; - case 46064: //Amber Ledge to Coldarra - mountid = 6371; - break; - case 53335: //Stormwind Harbor Flight - Peaceful - mountid = 6852; - break; - } - - ((Player*)unitTarget)->ActivateTaxiPathTo(nodes,mountid); + ((Player*)unitTarget)->ActivateTaxiPathTo(nodes); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0461e4aa8..bce01656c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7796" + #define REVISION_NR "7797" #endif // __REVISION_NR_H__