diff options
author | maximius <none@none> | 2009-09-10 09:59:16 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-10 09:59:16 -0700 |
commit | 5633ea57d11e23d8609994bd2ee9cdf7e36ed5e7 (patch) | |
tree | 7518b778737a45d768b1f67edaef5bffcbb105c2 /src/game/Player.cpp | |
parent | 580b3f8805bf307fe057ea852aa469fe9f5e4848 (diff) |
*MrSmite's PetAI patch, plus Hawthorne's Instant Flight Paths (now with actual code! >_<)
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 928caebef6a..d25f27fff66 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17962,14 +17962,22 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc // prevent stealth flight //RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK); - WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); - data << uint32(ERR_TAXIOK); - GetSession()->SendPacket(&data); - - sLog.outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY"); - - GetSession()->SendDoFlight(mount_display_id, sourcepath); - + //Hawthorne - Instant Taxi Option + if ((bool)sWorld.getConfig(CONFIG_INSTANT_TAXI)) + { + TaxiNodesEntry const* lastnode = sTaxiNodesStore.LookupEntry(nodes[nodes.size()-1]); + m_taxi.ClearTaxiDestinations(); + TeleportTo(lastnode->map_id, lastnode->x, lastnode->y, lastnode->z, GetOrientation()); + return false; + } + else + { + WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); + data << uint32(ERR_TAXIOK); + GetSession()->SendPacket(&data); + sLog.outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY"); + GetSession()->SendDoFlight(mount_display_id, sourcepath); + } return true; } |