diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index 381b204c..9a785603 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -1674,12 +1674,14 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati float final_z = z; float final_o = orientation; + Position const* transportPosition = m_movementInfo.GetTransportPos(); + if (m_transport) { - final_x += m_movementInfo.GetTransportPos()->x; - final_y += m_movementInfo.GetTransportPos()->y; - final_z += m_movementInfo.GetTransportPos()->z; - final_o += m_movementInfo.GetTransportPos()->o; + final_x += transportPosition->x; + final_y += transportPosition->y; + final_z += transportPosition->z; + final_o += transportPosition->o; } m_teleport_dest = WorldLocation(mapid, final_x, final_y, final_z, final_o); @@ -1698,10 +1700,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati data << uint32(mapid); if (m_transport) { - data << float(m_movementInfo.GetTransportPos()->x); - data << float(m_movementInfo.GetTransportPos()->y); - data << float(m_movementInfo.GetTransportPos()->z); - data << float(m_movementInfo.GetTransportPos()->o); + data << float(transportPosition->x); + data << float(transportPosition->y); + data << float(transportPosition->z); + data << float(transportPosition->o); } else { @@ -6464,7 +6466,7 @@ void Player::DuelComplete(DuelCompleteType type) if (type != DUEL_INTERRUPTED) { data.Initialize(SMSG_DUEL_WINNER, (1 + 20)); // we guess size - data << uint8(type == DUEL_WON ? 0 : 1); // 0 = just won; 1 = fled + data << (uint8)((type == DUEL_WON) ? 0 : 1); // 0 = just won; 1 = fled data << duel->opponent->GetName(); data << GetName(); SendMessageToSet(&data, true); @@ -9714,9 +9716,11 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool ItemPrototype const* itemProto = pItem->GetProto(); if (itemProto->Bonding == BIND_WHEN_PICKED_UP || - itemProto->Bonding == BIND_QUEST_ITEM || - (itemProto->Bonding == BIND_WHEN_EQUIPPED && IsBagPos(pos))) - { pItem->SetBinding(true); } + itemProto->Bonding == BIND_QUEST_ITEM || + (itemProto->Bonding == BIND_WHEN_EQUIPPED && IsBagPos(pos))) + { + pItem->SetBinding(true); + } if (bag == INVENTORY_SLOT_BAG_0) { @@ -9759,7 +9763,9 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool if (itemProto->Bonding == BIND_WHEN_PICKED_UP || itemProto->Bonding == BIND_QUEST_ITEM || (itemProto->Bonding == BIND_WHEN_EQUIPPED && IsBagPos(pos))) - { pItem2->SetBinding(true); } + { + pItem2->SetBinding(true); + } pItem2->SetCount(pItem2->GetCount() + count); if (IsInWorld() && update) diff --git a/src/game/Object/ReputationMgr.cpp b/src/game/Object/ReputationMgr.cpp index 1f3a2200..cc6ca89e 100644 --- a/src/game/Object/ReputationMgr.cpp +++ b/src/game/Object/ReputationMgr.cpp @@ -142,13 +142,14 @@ void ReputationMgr::SendState(FactionState const* faction) for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr) { - if (itr->second.needSend) + FactionState &subFaction = itr->second; + if (subFaction.needSend) { - itr->second.needSend = false; - if (itr->second.ReputationListID != faction->ReputationListID) + subFaction.needSend = false; + if (subFaction.ReputationListID != faction->ReputationListID) { - data << (uint32) itr->second.ReputationListID; - data << (uint32) itr->second.Standing; + data << uint32(subFaction.ReputationListID); + data << uint32(subFaction.Standing); ++count; } diff --git a/src/game/Object/SpellMgr.h b/src/game/Object/SpellMgr.h index 2d3e41d0..31a05b04 100644 --- a/src/game/Object/SpellMgr.h +++ b/src/game/Object/SpellMgr.h @@ -628,7 +628,7 @@ enum ProcFlagsEx struct SpellProcEventEntry { - uint32 schoolMask; + uint32 schoolMask; // if nonzero - bit mask for matching proc condition based on spell candidate's school: Fire=2, Mask=1<<(2-1)=2 uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value ClassFamilyMask spellFamilyMask[MAX_EFFECT_INDEX]; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do) uint32 procFlags; // bitmask for matching proc event diff --git a/src/game/WorldHandlers/QueryHandler.cpp b/src/game/WorldHandlers/QueryHandler.cpp index b32c05f9..3c647dca 100644 --- a/src/game/WorldHandlers/QueryHandler.cpp +++ b/src/game/WorldHandlers/QueryHandler.cpp @@ -253,16 +253,16 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket& /*recv_data*/) if (corpsemapid != _player->GetMapId()) { // search entrance map for proper show entrance - if (InstanceTemplate const* temp = sObjectMgr.GetInstanceTemplate(mapid)) + if (InstanceTemplate const* corpseMapEntry = sObjectMgr.GetInstanceTemplate(mapid)) { - if (temp->ghostEntranceMap >= 0) + if (corpseMapEntry->ghostEntranceMap >= 0) { // if corpse map have entrance - if (TerrainInfo const* entranceMap = sTerrainMgr.LoadTerrain(temp->ghostEntranceMap)) + if (TerrainInfo const* entranceMap = sTerrainMgr.LoadTerrain(corpseMapEntry->ghostEntranceMap)) { - mapid = temp->ghostEntranceMap; - x = temp->ghostEntranceX; - y = temp->ghostEntranceY; + mapid = corpseMapEntry->ghostEntranceMap; + x = corpseMapEntry->ghostEntranceX; + y = corpseMapEntry->ghostEntranceY; z = entranceMap->GetHeightStatic(x, y, MAX_HEIGHT); } } diff --git a/src/game/WorldHandlers/WaypointManager.cpp b/src/game/WorldHandlers/WaypointManager.cpp index edc8a64d..7f1c8bd2 100644 --- a/src/game/WorldHandlers/WaypointManager.cpp +++ b/src/game/WorldHandlers/WaypointManager.cpp @@ -391,7 +391,7 @@ void WaypointManager::Unload() m_pathTemplateMap.clear(); for (WaypointPathMap::iterator itr = m_externalPathTemplateMap.begin(); itr != m_externalPathTemplateMap.end(); ++itr) - _clearPath(itr->second); + { _clearPath(itr->second); } m_externalPathTemplateMap.clear(); } @@ -506,11 +506,11 @@ void WaypointManager::SetNodePosition(uint32 entry, uint32 dbGuid, uint32 point, { // Support only normal movement tables if (wpOrigin != PATH_FROM_GUID && wpOrigin != PATH_FROM_ENTRY) - return; + { return; } WaypointPath* path = GetPathFromOrigin(entry, dbGuid, pathId, wpOrigin); if (!path) - return; + { return; } char const* const table = wpOrigin == PATH_FROM_GUID ? "creature_movement" : "creature_movement_template"; char const* const key_field = wpOrigin == PATH_FROM_GUID ? "id" : "entry"; diff --git a/src/game/WorldHandlers/Weather.cpp b/src/game/WorldHandlers/Weather.cpp index 8cde393c..65d28719 100644 --- a/src/game/WorldHandlers/Weather.cpp +++ b/src/game/WorldHandlers/Weather.cpp @@ -80,7 +80,7 @@ bool Weather::Update(uint32 diff, Map const* _map) { ///- Weather will be removed if not updated (no players in zone anymore) if (!SendWeatherForPlayersInZone(_map)) - return false; + { return false; } } } return true;