aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/CharacterHandler.cpp2
-rw-r--r--src/game/ObjectMgr.cpp9
-rw-r--r--src/game/ObjectMgr.h2
-rw-r--r--src/game/Player.cpp6
-rw-r--r--src/game/Spell.cpp1
-rw-r--r--src/game/SpellEffects.cpp31
6 files changed, 15 insertions, 36 deletions
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index ca6a96c3b08..d82f0a0b518 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -769,7 +769,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 12fb26f0ad8..a448a73f1dc 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -4837,7 +4837,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;
@@ -4848,6 +4848,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->Modelid_A1;
@@ -4855,6 +4858,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->Modelid_H1;
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
index eff1f3812a1..3fe373f6a34 100644
--- a/src/game/ObjectMgr.h
+++ b/src/game/ObjectMgr.h
@@ -418,7 +418,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<uint32>& mapIds );
void GetTransportPathNodes( uint32 path, TransportPath &pathnodes );
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index c0b2b384938..07b5a71cf83 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -230,7 +230,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;
@@ -17232,8 +17232,8 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> 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 5934542f64f..168e6ddd16f 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -598,6 +598,7 @@ void Spell::FillTargetMap()
case SPELL_EFFECT_SELF_RESURRECT:
case SPELL_EFFECT_REPUTATION:
case SPELL_EFFECT_LEARN_SPELL:
+ case SPELL_EFFECT_SEND_TAXI:
if(m_targets.getUnitTarget())
AddUnitTarget(m_targets.getUnitTarget(), i);
// 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 c411ea69bff..63fdf335ad5 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5901,36 +5901,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;
- case 41533: //Fly of the Netherwing
- case 41540: //Fly of the Netherwing
- mountid = 23468;
- break;
- }
-
- ((Player*)unitTarget)->ActivateTaxiPathTo(nodes,mountid);
+ ((Player*)unitTarget)->ActivateTaxiPathTo(nodes);
}