diff options
Diffstat (limited to 'src/game/TaxiHandler.cpp')
-rw-r--r-- | src/game/TaxiHandler.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp index 9c395f78528..1effa944cda 100644 --- a/src/game/TaxiHandler.cpp +++ b/src/game/TaxiHandler.cpp @@ -54,7 +54,7 @@ void WorldSession::SendTaxiStatus( uint64 guid ) uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam()); // not found nearest - if(curloc == 0) + if (curloc == 0) return; sLog.outDebug( "WORLD: current location %u ",curloc); @@ -82,11 +82,11 @@ void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data ) } // remove fake death - if(GetPlayer()->hasUnitState(UNIT_STAT_DIED)) + if (GetPlayer()->hasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // unknown taxi node case - if( SendLearnNewTaxiNode(unit) ) + if ( SendLearnNewTaxiNode(unit) ) return; // known taxi node case @@ -102,7 +102,7 @@ void WorldSession::SendTaxiMenu( Creature* unit ) return; bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater(); - if(unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it. + if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it. sLog.outDebug( "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc); @@ -141,7 +141,7 @@ bool WorldSession::SendLearnNewTaxiNode( Creature* unit ) if ( curloc == 0 ) return true; // `true` send to avoid WorldSession::SendTaxiMenu call with one more curlock seartch with same false result. - if( GetPlayer()->m_taxi.SetTaximaskNode(curloc) ) + if ( GetPlayer()->m_taxi.SetTaximaskNode(curloc) ) { WorldPacket msg(SMSG_NEW_TAXI_PATH, 0); SendPacket( &msg ); @@ -181,7 +181,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data ) nodes.push_back(node); } - if(nodes.empty()) + if (nodes.empty()) return; sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back()); @@ -194,7 +194,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) sLog.outDebug( "WORLD: Received CMSG_MOVE_SPLINE_DONE" ); uint64 guid; // used only for proper packet read - if(!recv_data.readPackGUID(guid)) + if (!recv_data.readPackGUID(guid)) return; MovementInfo movementInfo; // used only for proper packet read @@ -208,15 +208,15 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) // we need process only (1) uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination(); - if(!curDest) + if (!curDest) return; TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest); // far teleport case - if(curDestNode && curDestNode->map_id != GetPlayer()->GetMapId()) + if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId()) { - if(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE) + if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE) { // short preparations to continue flight FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top()); @@ -239,7 +239,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) // Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path) if (GetPlayer()->isTaxiCheater()) { - if(GetPlayer()->m_taxi.SetTaximaskNode(sourcenode)) + if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode)) { WorldPacket data(SMSG_NEW_TAXI_PATH, 0); _player->GetSession()->SendPacket( &data ); @@ -253,7 +253,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) uint32 path, cost; objmgr.GetTaxiPath( sourcenode, destinationnode, path, cost); - if(path && mountDisplayId) + if (path && mountDisplayId) SendDoFlight( mountDisplayId, path, 1 ); // skip start fly node else GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next @@ -262,7 +262,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) GetPlayer()->CleanupAfterTaxiFlight(); GetPlayer()->SetFallInformation(0, GetPlayer()->GetPositionZ()); - if(GetPlayer()->pvpInfo.inHostileArea) + if (GetPlayer()->pvpInfo.inHostileArea) GetPlayer()->CastSpell(GetPlayer(), 2479, true); } |