aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/NPCHandler.cpp
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-01-28 05:00:28 +0100
committerShauren <shauren.trinity@gmail.com>2019-07-21 21:06:54 +0200
commitb485f3e6733950920cc1b9afe2a81a30eeeeaa95 (patch)
treed1a4171eb3a5d9f3b4f8a6a011addeb32a2f76eb /src/server/game/Handlers/NPCHandler.cpp
parente6885d50c688437ea21855eb0161373de02bcf9f (diff)
Few small optimizations here and there (#18684)
Changes list: - Added CharacterGuidByNameContainer which contains name -> guid unordered map (updated along CharacterInfo) - Extended CharacterInfo structure with GuildId - Extended CharacterInfo structure with ArenaTeamId[3], for all possible teams (2v2, 3v3, 5v5) - Removed CHAR_SEL_GUID_BY_NAME and CHAR_SEL_CHAR_GUID_BY_NAME synchronous queries, name -> guid can be now retrieved in World::GetCharacterGuidByName - Removed CHAR_SEL_GUID_RACE_ACC_BY_NAME synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid - Removed CHAR_SEL_CHAR_LEVEL synchronous query, level can be retrieved by guid - Changed CHAR_SEL_CHARACTER_ACTIONS_SPEC to asynchronous query, action bars are now loaded asynchronously - Removed CHAR_SEL_CHARACTER_NAME_CLASS synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid - Removed CHAR_SEL_PLAYER_ARENA_TEAMS and CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID synchronous queries, arena teams are now stored in CharacterInfo - Replaced synchronous db calls with CharacterInfo lookups - Removed ObjectMgr::GetPlayerGUIDByName, as it used db query - Replaced some unnecessary UpdateObjectVisibility() calls because they were either duplicated (called few lines above in other function) or it is enough to call DestroyForNearbyPlayers because object is being removed or should be invisible and DestroyForNearbyPlayers is faster - Corrected typo in Player::DestroyForPlayer, only items in slots 0 to EQUIPMENT_SLOT_END are sent to other players - Renamed Player::GetGuildIdFromDB to Player::GetGuildIdFromCharacterInfo and changed the function to use CharacterInfo structure - Renamed Player::GetArenaTeamIdFromDB to Player::GetArenaTeamIdFromCharacterInfo and changed the function to use CharacterInfo structure - Renamed Player::GetLevelFromDB to Player::GetLevelFromCharacterInfo and changed the function to use CharacterInfo structure - Removed GameEventMgr::_questToEventLinks and associated functions, eventId is now stored in Quest class under _eventIdForQuest variable - Changed some functions checking quest status to use other functions for quest status check instead of duplicating code - Removed callback from add friend, because we can get the guid from appropriate storage, no need to make db query - Removed callback from add ignore, because we can get the guid from appropriate storage, no need to make db query - Added callback to unwrap wrapped items asynchronously - Removed synchronous select in tutorials to check if we have any entries in db, if any entry exists in db, m_TutorialsChanged variable will have TUTORIALS_FLAG_LOADED_FROM_DB flag added and it is no longer necessary to query database (cherrypicked from b955456008191e60b6bda1f22e3486a3792b08db)
Diffstat (limited to 'src/server/game/Handlers/NPCHandler.cpp')
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index ba17b382bb0..e756f48f7ac 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -315,13 +315,7 @@ void WorldSession::SendSpiritResurrect()
if (corpseGrave != ghostGrave)
_player->TeleportTo(corpseGrave->MapID, corpseGrave->Loc.X, corpseGrave->Loc.Y, corpseGrave->Loc.Z, (corpseGrave->Facing * M_PI) / 180); // Orientation is initially in degrees
- // or update at original position
- else
- _player->UpdateObjectVisibility();
}
- // or update at original position
- else
- _player->UpdateObjectVisibility();
}
void WorldSession::HandleBinderActivateOpcode(WorldPackets::NPC::Hello& packet)