diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index b366d3c2b..80e034cf4 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -46,7 +46,7 @@ public: // Pass parameters between AI virtual void DoAction(int32 /*param = 0 */) {} - virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id = 0 */) {} + virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id = 0 */) {} virtual ObjectGuid GetGUID(int32 /*id = 0 */) const { return ObjectGuid::Empty; } static int32 Permissible(GameObject const* go); diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 17533d4e4..71cfe8d5b 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -217,7 +217,7 @@ public: virtual void DoAction(int32 /*param*/) {} virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; } virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} - virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id*/ = 0) {} + virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/ = 0) {} virtual ObjectGuid GetGUID(int32 /*id*/ = 0) const { return ObjectGuid::Empty; } // Select the best target (in order) from the threat list that fulfill the following: diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp b/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp index 120a75582..12d5a6368 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp @@ -42,7 +42,7 @@ void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItem player->PlayerTalkClass->GetGossipMenu().AddMenuItem(gossipMenuID, gossipMenuItemID, sender, action, boxMoney); } -void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const guid) +void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid) { player->PlayerTalkClass->SendGossipMenu(npcTextID, guid); } diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h index eee841148..b88aea5c4 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h +++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h @@ -94,7 +94,7 @@ void AddGossipItemFor(Player* player, uint32 icon, std::string const& text, uint void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action, uint32 boxMoney = 0); // Send menu text -void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const guid); +void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid); void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature); // Close menu diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index cb4067e0c..c1dead666 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -993,7 +993,7 @@ void SmartAI::SetData(uint32 id, uint32 value, WorldObject* invoker) GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, unit, id, value, false, nullptr, gob); } -void SmartAI::SetGUID(ObjectGuid /*guid*/, int32 /*id*/) +void SmartAI::SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/) { } diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 5bd9fcd8b..48d0eda37 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -164,7 +164,7 @@ public: void SetData(uint32 id, uint32 value, WorldObject* invoker); // Used in scripts to share variables - void SetGUID(ObjectGuid guid, int32 id = 0) override; + void SetGUID(ObjectGuid const& guid, int32 id = 0) override; // Used in scripts to share variables ObjectGuid GetGUID(int32 id = 0) const override; diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index f74aebff2..2adb61047 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -855,7 +855,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z return go; } -Creature* Battlefield::GetCreature(ObjectGuid const guid) +Creature* Battlefield::GetCreature(ObjectGuid const& guid) { if (!m_Map) return nullptr; @@ -863,7 +863,7 @@ Creature* Battlefield::GetCreature(ObjectGuid const guid) return m_Map->GetCreature(guid); } -GameObject* Battlefield::GetGameObject(ObjectGuid const guid) +GameObject* Battlefield::GetGameObject(ObjectGuid const& guid) { if (!m_Map) return nullptr; diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 6b2abdfc5..c4f94f071 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -303,8 +303,8 @@ public: Creature* SpawnCreature(uint32 entry, Position pos, TeamId teamId); GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o); - Creature* GetCreature(ObjectGuid const guid); - GameObject* GetGameObject(ObjectGuid const guid); + Creature* GetCreature(ObjectGuid const& guid); + GameObject* GetGameObject(ObjectGuid const& guid); // Script-methods diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index 249ac7adb..1971a3dc7 100644 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -121,7 +121,7 @@ void Corpse::DeleteFromDB(CharacterDatabaseTransaction trans) DeleteFromDB(GetOwnerGUID(), trans); } -void Corpse::DeleteFromDB(ObjectGuid const ownerGuid, CharacterDatabaseTransaction trans) +void Corpse::DeleteFromDB(ObjectGuid const& ownerGuid, CharacterDatabaseTransaction trans) { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CORPSE); stmt->SetData(0, ownerGuid.GetCounter()); diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h index e74f2c943..9027a608a 100644 --- a/src/server/game/Entities/Corpse/Corpse.h +++ b/src/server/game/Entities/Corpse/Corpse.h @@ -63,7 +63,7 @@ public: bool LoadCorpseFromDB(ObjectGuid::LowType guid, Field* fields); void DeleteFromDB(CharacterDatabaseTransaction trans); - static void DeleteFromDB(ObjectGuid const ownerGuid, CharacterDatabaseTransaction trans); + static void DeleteFromDB(ObjectGuid const& ownerGuid, CharacterDatabaseTransaction trans); [[nodiscard]] ObjectGuid GetOwnerGUID() const { return GetGuidValue(CORPSE_FIELD_OWNER); } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index d8897ab12..4bad8703e 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -3051,13 +3051,13 @@ SpellInfo const* GameObject::GetSpellForLock(Player const* player) const return nullptr; } -void GameObject::AddToSkillupList(ObjectGuid playerGuid) +void GameObject::AddToSkillupList(ObjectGuid const& playerGuid) { int32 timer = GetMap()->IsDungeon() ? -1 : 10 * MINUTE * IN_MILLISECONDS; m_SkillupList[playerGuid] = timer; } -bool GameObject::IsInSkillupList(ObjectGuid playerGuid) const +bool GameObject::IsInSkillupList(ObjectGuid const& playerGuid) const { for (auto const& itr : m_SkillupList) { diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 1b8ccd047..5ca9ad61e 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -231,8 +231,8 @@ public: void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; } void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; } - void AddToSkillupList(ObjectGuid playerGuid); - [[nodiscard]] bool IsInSkillupList(ObjectGuid playerGuid) const; + void AddToSkillupList(ObjectGuid const& playerGuid); + [[nodiscard]] bool IsInSkillupList(ObjectGuid const& playerGuid) const; void AddUniqueUse(Player* player); void AddUse() { ++m_usetimes; } diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h index a8d99fe80..5a3deff9e 100644 --- a/src/server/game/Entities/Object/ObjectGuid.h +++ b/src/server/game/Entities/Object/ObjectGuid.h @@ -269,7 +269,7 @@ class PackedGuid explicit PackedGuid(ObjectGuid guid) : _packedGuid(PACKED_GUID_MIN_BUFFER_SIZE) { _packedGuid.appendPackGUID(guid.GetRawValue()); } void Set(uint64 guid) { _packedGuid.wpos(0); _packedGuid.appendPackGUID(guid); } - void Set(ObjectGuid guid) { _packedGuid.wpos(0); _packedGuid.appendPackGUID(guid.GetRawValue()); } + void Set(ObjectGuid const& guid) { _packedGuid.wpos(0); _packedGuid.appendPackGUID(guid.GetRawValue()); } [[nodiscard]] std::size_t size() const { return _packedGuid.size(); } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a82d55eb8..a8cb733de 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2088,7 +2088,7 @@ bool Player::CanInteractWithQuestGiver(Object* questGiver) return false; } -Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) +Creature* Player::GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask) { // unit checks if (!guid) @@ -2145,7 +2145,7 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) return creature; } -GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const +GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const { if (GameObject* go = GetMap()->GetGameObject(guid)) { @@ -4616,7 +4616,7 @@ void Player::KillPlayer() //UpdateObjectVisibility(); // pussywizard: not needed } -void Player::OfflineResurrect(ObjectGuid const guid, CharacterDatabaseTransaction trans) +void Player::OfflineResurrect(ObjectGuid const& guid, CharacterDatabaseTransaction trans) { Corpse::DeleteFromDB(guid, trans); CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index ea2cd277a..1e57a5649 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1128,8 +1128,8 @@ public: void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool onEnterMap); bool CanInteractWithQuestGiver(Object* questGiver); - Creature* GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask); - [[nodiscard]] GameObject* GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const; + Creature* GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask); + [[nodiscard]] GameObject* GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const; void ToggleAFK(); void ToggleDND(); @@ -2033,7 +2033,7 @@ public: Corpse* CreateCorpse(); void RemoveCorpse(); void KillPlayer(); - static void OfflineResurrect(ObjectGuid const guid, CharacterDatabaseTransaction trans); + static void OfflineResurrect(ObjectGuid const& guid, CharacterDatabaseTransaction trans); [[nodiscard]] bool HasCorpse() const { return _corpseLocation.GetMapId() != MAPID_INVALID; } [[nodiscard]] WorldLocation GetCorpseLocation() const { return _corpseLocation; } uint32 GetResurrectionSpellId(); diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index d5b5fdf59..8ace05873 100644 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -37,7 +37,7 @@ uint32 PlayerSocial::GetNumberOfSocialsWithFlag(SocialFlag flag) const return counter; } -bool PlayerSocial::AddToSocialList(ObjectGuid friendGuid, SocialFlag flag) +bool PlayerSocial::AddToSocialList(ObjectGuid const& friendGuid, SocialFlag flag) { // check client limits if (GetNumberOfSocialsWithFlag(flag) >= (((flag & SOCIAL_FLAG_FRIEND) != 0) ? SOCIALMGR_FRIEND_LIMIT : SOCIALMGR_IGNORE_LIMIT)) @@ -71,7 +71,7 @@ bool PlayerSocial::AddToSocialList(ObjectGuid friendGuid, SocialFlag flag) return true; } -void PlayerSocial::RemoveFromSocialList(ObjectGuid friendGuid, SocialFlag flag) +void PlayerSocial::RemoveFromSocialList(ObjectGuid const& friendGuid, SocialFlag flag) { auto itr = m_playerSocialMap.find(friendGuid); if (itr == m_playerSocialMap.end()) // not exist @@ -102,7 +102,7 @@ void PlayerSocial::RemoveFromSocialList(ObjectGuid friendGuid, SocialFlag flag) } } -void PlayerSocial::SetFriendNote(ObjectGuid friendGuid, std::string note) +void PlayerSocial::SetFriendNote(ObjectGuid const& friendGuid, std::string note) { auto itr = m_playerSocialMap.find(friendGuid); if (itr == m_playerSocialMap.end()) // not exist @@ -176,7 +176,7 @@ void PlayerSocial::SendSocialList(Player* player, uint32 flags) LOG_DEBUG("network", "WORLD: Sent SMSG_CONTACT_LIST"); } -bool PlayerSocial::_checkContact(ObjectGuid guid, SocialFlag flags) const +bool PlayerSocial::_checkContact(ObjectGuid const& guid, SocialFlag flags) const { auto const& itr = m_playerSocialMap.find(guid); if (itr != m_playerSocialMap.end()) @@ -185,12 +185,12 @@ bool PlayerSocial::_checkContact(ObjectGuid guid, SocialFlag flags) const return false; } -bool PlayerSocial::HasFriend(ObjectGuid friend_guid) const +bool PlayerSocial::HasFriend(ObjectGuid const& friend_guid) const { return _checkContact(friend_guid, SOCIAL_FLAG_FRIEND); } -bool PlayerSocial::HasIgnore(ObjectGuid ignore_guid) const +bool PlayerSocial::HasIgnore(ObjectGuid const& ignore_guid) const { return _checkContact(ignore_guid, SOCIAL_FLAG_IGNORED); } @@ -209,7 +209,7 @@ SocialMgr* SocialMgr::instance() return &instance; } -void SocialMgr::GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo& friendInfo) +void SocialMgr::GetFriendInfo(Player* player, ObjectGuid const& friendGUID, FriendInfo& friendInfo) { if (!player) return; @@ -247,14 +247,14 @@ void SocialMgr::GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo& } } -void SocialMgr::MakeFriendStatusPacket(FriendsResult result, ObjectGuid guid, WorldPacket* data) +void SocialMgr::MakeFriendStatusPacket(FriendsResult result, ObjectGuid const& guid, WorldPacket* data) { data->Initialize(SMSG_FRIEND_STATUS, 9); *data << uint8(result); *data << guid; } -void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, ObjectGuid friendGuid, bool broadcast) +void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, ObjectGuid const& friendGuid, bool broadcast) { FriendInfo fi; GetFriendInfo(player, friendGuid, fi); @@ -316,7 +316,7 @@ void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet) } } -PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, ObjectGuid guid) +PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, ObjectGuid const& guid) { PlayerSocial* social = &m_socialMap[guid]; social->SetPlayerGUID(guid); diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h index a35187b6f..5995f05e9 100644 --- a/src/server/game/Entities/Player/SocialMgr.h +++ b/src/server/game/Entities/Player/SocialMgr.h @@ -104,19 +104,19 @@ class PlayerSocial public: PlayerSocial(); // adding/removing - bool AddToSocialList(ObjectGuid friend_guid, SocialFlag flag); - void RemoveFromSocialList(ObjectGuid friend_guid, SocialFlag flag); - void SetFriendNote(ObjectGuid friendGuid, std::string note); + bool AddToSocialList(ObjectGuid const& friend_guid, SocialFlag flag); + void RemoveFromSocialList(ObjectGuid const& friend_guid, SocialFlag flag); + void SetFriendNote(ObjectGuid const& friendGuid, std::string note); // Packet send's void SendSocialList(Player* player, uint32 flags); // Misc - bool HasFriend(ObjectGuid friend_guid) const; - bool HasIgnore(ObjectGuid ignore_guid) const; - ObjectGuid GetPlayerGUID() const { return m_playerGUID; } - void SetPlayerGUID(ObjectGuid guid) { m_playerGUID = guid; } + bool HasFriend(ObjectGuid const& friend_guid) const; + bool HasIgnore(ObjectGuid const& ignore_guid) const; + ObjectGuid const& GetPlayerGUID() const { return m_playerGUID; } + void SetPlayerGUID(ObjectGuid const& guid) { m_playerGUID = guid; } uint32 GetNumberOfSocialsWithFlag(SocialFlag flag) const; private: - bool _checkContact(ObjectGuid guid, SocialFlag flags) const; + bool _checkContact(ObjectGuid const& guid, SocialFlag flags) const; typedef std::map PlayerSocialMap; PlayerSocialMap m_playerSocialMap; ObjectGuid m_playerGUID; @@ -131,14 +131,14 @@ class SocialMgr public: static SocialMgr* instance(); // Misc - void RemovePlayerSocial(ObjectGuid guid) { m_socialMap.erase(guid); } - static void GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo& friendInfo); + void RemovePlayerSocial(ObjectGuid const& guid) { m_socialMap.erase(guid); } + static void GetFriendInfo(Player* player, ObjectGuid const& friendGUID, FriendInfo& friendInfo); // Packet management - void MakeFriendStatusPacket(FriendsResult result, ObjectGuid friend_guid, WorldPacket* data); - void SendFriendStatus(Player* player, FriendsResult result, ObjectGuid friend_guid, bool broadcast); + void MakeFriendStatusPacket(FriendsResult result, ObjectGuid const& friend_guid, WorldPacket* data); + void SendFriendStatus(Player* player, FriendsResult result, ObjectGuid const& friend_guid, bool broadcast); void BroadcastToFriendListers(Player* player, WorldPacket* packet); // Loading - PlayerSocial* LoadFromDB(PreparedQueryResult result, ObjectGuid guid); + PlayerSocial* LoadFromDB(PreparedQueryResult result, ObjectGuid const& guid); private: typedef std::map SocialMap; SocialMap m_socialMap; diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index f9a4cb01e..22a9d39b1 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -112,7 +112,7 @@ namespace PlayerNameMapHolder } // namespace PlayerNameMapHolder -WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid const guid) +WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid const& guid) { switch (guid.GetHigh()) { @@ -138,7 +138,7 @@ WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid con return nullptr; } -Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, ObjectGuid const guid, uint32 typemask) +Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, ObjectGuid const& guid, uint32 typemask) { switch (guid.GetHigh()) { @@ -176,27 +176,27 @@ Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, ObjectGuid con return nullptr; } -Corpse* ObjectAccessor::GetCorpse(WorldObject const& u, ObjectGuid const guid) +Corpse* ObjectAccessor::GetCorpse(WorldObject const& u, ObjectGuid const& guid) { return u.GetMap()->GetCorpse(guid); } -GameObject* ObjectAccessor::GetGameObject(WorldObject const& u, ObjectGuid const guid) +GameObject* ObjectAccessor::GetGameObject(WorldObject const& u, ObjectGuid const& guid) { return u.GetMap()->GetGameObject(guid); } -Transport* ObjectAccessor::GetTransport(WorldObject const& u, ObjectGuid const guid) +Transport* ObjectAccessor::GetTransport(WorldObject const& u, ObjectGuid const& guid) { return u.GetMap()->GetTransport(guid); } -DynamicObject* ObjectAccessor::GetDynamicObject(WorldObject const& u, ObjectGuid const guid) +DynamicObject* ObjectAccessor::GetDynamicObject(WorldObject const& u, ObjectGuid const& guid) { return u.GetMap()->GetDynamicObject(guid); } -Unit* ObjectAccessor::GetUnit(WorldObject const& u, ObjectGuid const guid) +Unit* ObjectAccessor::GetUnit(WorldObject const& u, ObjectGuid const& guid) { if (guid.IsPlayer()) return GetPlayer(u, guid); @@ -207,17 +207,17 @@ Unit* ObjectAccessor::GetUnit(WorldObject const& u, ObjectGuid const guid) return GetCreature(u, guid); } -Creature* ObjectAccessor::GetCreature(WorldObject const& u, ObjectGuid const guid) +Creature* ObjectAccessor::GetCreature(WorldObject const& u, ObjectGuid const& guid) { return u.GetMap()->GetCreature(guid); } -Pet* ObjectAccessor::GetPet(WorldObject const& u, ObjectGuid const guid) +Pet* ObjectAccessor::GetPet(WorldObject const& u, ObjectGuid const& guid) { return u.GetMap()->GetPet(guid); } -Player* ObjectAccessor::GetPlayer(Map const* m, ObjectGuid const guid) +Player* ObjectAccessor::GetPlayer(Map const* m, ObjectGuid const& guid) { if (Player * player = HashMapHolder::Find(guid)) if (player->IsInWorld() && player->GetMap() == m) @@ -226,12 +226,12 @@ Player* ObjectAccessor::GetPlayer(Map const* m, ObjectGuid const guid) return nullptr; } -Player* ObjectAccessor::GetPlayer(WorldObject const& u, ObjectGuid const guid) +Player* ObjectAccessor::GetPlayer(WorldObject const& u, ObjectGuid const& guid) { return GetPlayer(u.GetMap(), guid); } -Creature* ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const& u, ObjectGuid const guid) +Creature* ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const& u, ObjectGuid const& guid) { if (guid.IsPet()) return GetPet(u, guid); diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 2fbe70bf5..2a78eee0d 100644 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -60,18 +60,18 @@ public: namespace ObjectAccessor { // these functions return objects only if in map of specified object - WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const guid); - Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const guid, uint32 typemask); - Corpse* GetCorpse(WorldObject const& u, ObjectGuid const guid); - GameObject* GetGameObject(WorldObject const& u, ObjectGuid const guid); - Transport* GetTransport(WorldObject const& u, ObjectGuid const guid); - DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const guid); - Unit* GetUnit(WorldObject const&, ObjectGuid const guid); - Creature* GetCreature(WorldObject const& u, ObjectGuid const guid); - Pet* GetPet(WorldObject const&, ObjectGuid const guid); - Player* GetPlayer(Map const*, ObjectGuid const guid); - Player* GetPlayer(WorldObject const&, ObjectGuid const guid); - Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const); + WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const& guid); + Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const& guid, uint32 typemask); + Corpse* GetCorpse(WorldObject const& u, ObjectGuid const& guid); + GameObject* GetGameObject(WorldObject const& u, ObjectGuid const& guid); + Transport* GetTransport(WorldObject const& u, ObjectGuid const& guid); + DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const& guid); + Unit* GetUnit(WorldObject const&, ObjectGuid const& guid); + Creature* GetCreature(WorldObject const& u, ObjectGuid const& guid); + Pet* GetPet(WorldObject const&, ObjectGuid const& guid); + Player* GetPlayer(Map const*, ObjectGuid const& guid); + Player* GetPlayer(WorldObject const&, ObjectGuid const& guid); + Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const&); // these functions return objects if found in whole world // ACCESS LIKE THAT IS NOT THREAD SAFE diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index de0e4a9bd..85f8275e8 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2358,27 +2358,27 @@ void BattlegroundMap::RemoveAllPlayers() player->TeleportTo(player->GetEntryPoint()); } -Corpse* Map::GetCorpse(ObjectGuid const guid) +Corpse* Map::GetCorpse(ObjectGuid const& guid) { return _objectsStore.Find(guid); } -Creature* Map::GetCreature(ObjectGuid const guid) +Creature* Map::GetCreature(ObjectGuid const& guid) { return _objectsStore.Find(guid); } -GameObject* Map::GetGameObject(ObjectGuid const guid) +GameObject* Map::GetGameObject(ObjectGuid const& guid) { return _objectsStore.Find(guid); } -Pet* Map::GetPet(ObjectGuid const guid) +Pet* Map::GetPet(ObjectGuid const& guid) { return dynamic_cast(_objectsStore.Find(guid)); } -Transport* Map::GetTransport(ObjectGuid guid) +Transport* Map::GetTransport(ObjectGuid const& guid) { if (guid.GetHigh() != HighGuid::Mo_Transport && guid.GetHigh() != HighGuid::Transport) return nullptr; @@ -2387,7 +2387,7 @@ Transport* Map::GetTransport(ObjectGuid guid) return go ? go->ToTransport() : nullptr; } -DynamicObject* Map::GetDynamicObject(ObjectGuid guid) +DynamicObject* Map::GetDynamicObject(ObjectGuid const& guid) { return _objectsStore.Find(guid); } @@ -2679,7 +2679,7 @@ void Map::RemoveCorpse(Corpse* corpse) _corpseBones.erase(corpse); } -Corpse* Map::ConvertCorpseToBones(ObjectGuid const ownerGuid, bool insignia /*= false*/) +Corpse* Map::ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia /*= false*/) { Corpse* corpse = GetCorpseByPlayer(ownerGuid); if (!corpse) diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 20551da8a..06451fb1d 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -338,12 +338,12 @@ public: GameObject* SummonGameObject(uint32 entry, Position const& pos, float rotation0 = 0.0f, float rotation1 = 0.0f, float rotation2 = 0.0f, float rotation3 = 0.0f, uint32 respawnTime = 100, bool checkTransport = true); void SummonCreatureGroup(uint8 group, std::list* list = nullptr); - Corpse* GetCorpse(ObjectGuid const guid); - Creature* GetCreature(ObjectGuid const guid); - GameObject* GetGameObject(ObjectGuid const guid); - Transport* GetTransport(ObjectGuid const guid); - DynamicObject* GetDynamicObject(ObjectGuid const guid); - Pet* GetPet(ObjectGuid const guid); + Corpse* GetCorpse(ObjectGuid const& guid); + Creature* GetCreature(ObjectGuid const& guid); + GameObject* GetGameObject(ObjectGuid const& guid); + Transport* GetTransport(ObjectGuid const& guid); + DynamicObject* GetDynamicObject(ObjectGuid const& guid); + Pet* GetPet(ObjectGuid const& guid); MapStoredObjectTypesContainer& GetObjectsStore() { return _objectsStore; } @@ -438,7 +438,7 @@ public: void DeleteCorpseData(); void AddCorpse(Corpse* corpse); void RemoveCorpse(Corpse* corpse); - Corpse* ConvertCorpseToBones(ObjectGuid const ownerGuid, bool insignia = false); + Corpse* ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia = false); void RemoveOldCorpses(); static void DeleteRespawnTimesInDB(uint16 mapId, uint32 instanceId); diff --git a/src/server/game/World/WorldState.cpp b/src/server/game/World/WorldState.cpp index ebb11b8bf..b22c0de6a 100644 --- a/src/server/game/World/WorldState.cpp +++ b/src/server/game/World/WorldState.cpp @@ -852,7 +852,7 @@ void WorldState::HandleSunsReachSubPhaseTransition(int32 subPhaseMask, bool init if (!initial) { std::lock_guard guard(m_sunsReachData.m_sunsReachReclamationMutex); - for (ObjectGuid& guid : m_sunsReachData.m_sunsReachReclamationPlayers) + for (ObjectGuid const& guid : m_sunsReachData.m_sunsReachReclamationPlayers) if (Player* player = ObjectAccessor::FindPlayer(guid)) { if (start) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp index cf39b53a1..873cfdc74 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -118,7 +118,7 @@ public: return !victim->HasAura(SPELL_TIMELAPSE); } - void SetGUID(ObjectGuid guid, int32 id) override + void SetGUID(ObjectGuid const& guid, int32 id) override { if (id == GUID_LEVER_USER) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index 4b82654fb..de984f635 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -152,7 +152,7 @@ public: } } - void SetGUID(ObjectGuid const guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { _charmerGUID = guid; } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index 1280914f4..6cde45bdd 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -183,7 +183,7 @@ public: } } - void SetGUID(ObjectGuid guid, int32 index) override + void SetGUID(ObjectGuid const& guid, int32 index) override { if (index == GO_LAVA_BURST) { diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index e4125d70d..b1afd209a 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -131,7 +131,7 @@ public: uint32 checkTimer; ObjectGuid playerGUID; - void SetGUID(ObjectGuid guid, int32) override + void SetGUID(ObjectGuid const& guid, int32) override { playerGUID = guid; } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index f804a2878..15e175dde 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -151,7 +151,7 @@ struct boss_shade_of_aran : public BossAI return me->GetDistance2d(roomCenter.GetPositionX(), roomCenter.GetPositionY()) < 45.0f; } - void SetGUID(ObjectGuid guid, int32 id) override + void SetGUID(ObjectGuid const& guid, int32 id) override { if (id == ACTION_ATIESH_REACT && !_atieshReaction) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index b70c90063..c8244d493 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -396,7 +396,7 @@ public: AttackStart(attacker); } - void SetGUID(ObjectGuid guid, int32) override + void SetGUID(ObjectGuid const& guid, int32) override { gothikGUID = guid; events.ScheduleEvent(EVENT_GHOUL_MOVE_TO_PIT, 3s); @@ -806,7 +806,7 @@ public: ObjectGuid prisonerGUID; - void SetGUID(ObjectGuid guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { if (!prisonerGUID) prisonerGUID = guid; @@ -866,7 +866,7 @@ public: ObjectGuid minerGUID; - void SetGUID(ObjectGuid guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { minerGUID = guid; } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index b455b71e8..ad623291f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -250,7 +250,7 @@ public: } } - void SetGUID(ObjectGuid const guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == ACTION_CHARGE) { @@ -564,7 +564,7 @@ public: RevivePlayer(victim, reviveGUID); } - void SetGUID(ObjectGuid const guid, int32 /*type = 0 */) override + void SetGUID(ObjectGuid const& guid, int32 /*type = 0 */) override { reviveGUID = guid; } @@ -612,7 +612,7 @@ public: revivePlayerGUID.Clear(); } - void SetGUID(ObjectGuid const guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { revivePlayerGUID = guid; } diff --git a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp index 6b5ff5937..6f9246e3f 100644 --- a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp @@ -93,7 +93,7 @@ public: _faction = faction; } - void SetGUID(ObjectGuid guid, int32) override + void SetGUID(ObjectGuid const& guid, int32) override { _playerGUID = guid; me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index dcfd61342..efd608da0 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -118,7 +118,7 @@ public: _events.ScheduleEvent(EVENT_MULTI_SHOT, 10s); } - void SetGUID(ObjectGuid guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == GUID_EVENT_INVOKER) { diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index 31d72e61a..84138e5d3 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -1743,7 +1743,7 @@ struct npc_coren_direbrew_sisters : public ScriptedAI { npc_coren_direbrew_sisters(Creature* creature) : ScriptedAI(creature) { } - void SetGUID(ObjectGuid guid, int32 id) override + void SetGUID(ObjectGuid const& guid, int32 id) override { if (id == DATA_TARGET_GUID) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 6caa1ff95..7b1ccf257 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -335,7 +335,7 @@ struct boss_archimonde : public BossAI Talk(SAY_SLAY); } - void SetGUID(ObjectGuid guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == GUID_GAIN_SOUL_CHARGE_PLAYER) { diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 7b56c464d..10141d57c 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -154,7 +154,7 @@ struct boss_ossirian : public BossAI } } - void SetGUID(ObjectGuid guid, int32 action) override + void SetGUID(ObjectGuid const& guid, int32 action) override { if (action == ACTION_TRIGGER_WEAKNESS && guid != _firstCrystalGUID) { @@ -317,7 +317,7 @@ public: { go_ossirian_crystalAI(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { } - void SetGUID(ObjectGuid guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == GUID_TRIGGER_PAIR) { diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp index c3a76fc63..0efe73836 100644 --- a/src/server/scripts/Kalimdor/zone_darkshore.cpp +++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp @@ -552,7 +552,7 @@ public: } } - void SetGUID(ObjectGuid /*guid*/, int32 type) override + void SetGUID(ObjectGuid const& /*guid*/, int32 type) override { if (type == GUID_SCRIPT_INVOKER && _scriptRunning == false) { diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp index 276c37bd8..94fb1505f 100644 --- a/src/server/scripts/Kalimdor/zone_desolace.cpp +++ b/src/server/scripts/Kalimdor/zone_desolace.cpp @@ -129,7 +129,7 @@ public: ImmuneFlagSet(false, _faction); } - void SetGUID(ObjectGuid playerGUID, int32 faction) override + void SetGUID(ObjectGuid const& playerGUID, int32 faction) override { _playerGUID = playerGUID; _faction = faction; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index 7f18b8474..afc11c5cc 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -1293,7 +1293,7 @@ public: } } - void SetGUID(ObjectGuid guid, int32 /*type*/) override + void SetGUID(ObjectGuid const& guid, int32 /*type*/) override { _chaseGUID = guid; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index 5deccbc0b..599477698 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -533,7 +533,7 @@ public: return _bloodboltedPlayers.count(guid) != 0; } - void SetGUID(ObjectGuid guid, int32 type = 0) override + void SetGUID(ObjectGuid const& guid, int32 type = 0) override { switch (type) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index f4bd5ff7b..c9cfe56d4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -703,7 +703,7 @@ public: } } - void SetGUID(ObjectGuid guid, int32 id/* = 0*/) override + void SetGUID(ObjectGuid const& guid, int32 id/* = 0*/) override { if (id != ACTION_SHIP_VISITS_ENEMY && id != ACTION_SHIP_VISITS_SELF) return; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 165e8e77e..a7f0794fa 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -745,7 +745,7 @@ public: ObjectGuid targetGUID; - void SetGUID(ObjectGuid guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == -1) targetGUID = guid; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index f64788381..2dc55ae95 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -698,7 +698,7 @@ public: uint32 _existenceCheckTimer; uint16 _asphyxiationTimer; - void SetGUID(ObjectGuid guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == DATA_TRAPPED_PLAYER) _trappedPlayerGUID = guid; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index ecaf28219..b33567ca0 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -2536,7 +2536,7 @@ public: } } - void SetGUID(ObjectGuid guid, int32 /* = 0*/) override + void SetGUID(ObjectGuid const& guid, int32 /* = 0*/) override { _grabbedPlayer = guid; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 64d616b5d..74221610a 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -772,7 +772,7 @@ public: } } - void SetGUID(ObjectGuid guid, int32 type/* = 0*/) override + void SetGUID(ObjectGuid const& guid, int32 type/* = 0*/) override { if (type == ACTION_VRYKUL_DEATH) { diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 03d0df839..2ff4dc6d2 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -1421,7 +1421,7 @@ public: _playerGUID.Clear(); } - void SetGUID(ObjectGuid guid, int32 /*action*/) override + void SetGUID(ObjectGuid const& guid, int32 /*action*/) override { if (_playerGUID) return; diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index a7eab2215..b8e657602 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -1093,7 +1093,7 @@ public: me->GetMotionMaster()->Clear(); } - void SetGUID(ObjectGuid guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { if (playerGUID || events.HasTimeUntilEvent(998) || events.HasTimeUntilEvent(2)) return; diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index 3b7a60e26..df5dd8c7d 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -241,7 +241,7 @@ struct npc_stolen_soul : public ScriptedAI }); } - void SetGUID(ObjectGuid guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { _targetGuid = guid; } diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index fcf8f38c5..a4c40812f 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -114,7 +114,7 @@ struct boss_murmur : public BossAI return true; } - void SetGUID(ObjectGuid guid, int32 index) override + void SetGUID(ObjectGuid const& guid, int32 index) override { if (index == GUID_MURMUR_NPCS) { diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index e024541c8..81e4b4b5a 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -670,7 +670,7 @@ public: } // Used for getting involved player guid. Parameter id is used for defining if is a large(Monument) or small(Relic) node - void SetGUID(ObjectGuid guid, int32 id) override + void SetGUID(ObjectGuid const& guid, int32 id) override { me->SetCanFly(true); diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index d0c6df380..7f462f79e 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -303,7 +303,7 @@ public: uint32 HealTimer; uint32 FrostShockTimer; - void SetGUID(ObjectGuid guid, int32 /*questId*/) override + void SetGUID(ObjectGuid const& guid, int32 /*questId*/) override { me->SetStandState(UNIT_STAND_STATE_STAND); Start(true, false, guid); diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index c014ab876..71cb5064b 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -99,7 +99,7 @@ public: npc_escortAI::MoveInLineOfSight(who); } - void SetGUID(ObjectGuid playerGUID, int32 type) override + void SetGUID(ObjectGuid const& playerGUID, int32 type) override { if (type == DATA_START_ENCOUNTER) { diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index 2bd68ffcd..458984900 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -219,7 +219,7 @@ public: }); } - void SetGUID(ObjectGuid guid, int32 type) override + void SetGUID(ObjectGuid const& guid, int32 type) override { if (type == GUID_DRAGON) {