Skip to content

Instantly share code, notes, and snippets.

@tst12
Created May 28, 2012 10:45
Show Gist options
  • Save tst12/2818460 to your computer and use it in GitHub Desktop.
Save tst12/2818460 to your computer and use it in GitHub Desktop.
WorldSession::HandleSetSelectionOpcode
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index a470a21..5578cdd 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -410,9 +410,12 @@ void WorldSession::HandleSetSelectionOpcode( WorldPacket & recv_data )
// update reputation list if need
Unit* unit = ObjectAccessor::GetUnit(*_player, guid ); // can select group members at diff maps
if (!unit)
- return;
-
- _player->SetSelectionGuid(guid);
+ {
+ _player->SetSelectionGuid(ObjectGuid());
+ return;
+ }
+ else
+ _player->SetSelectionGuid(guid);
if(FactionTemplateEntry const* factionTemplateEntry = sFactionTemplateStore.LookupEntry(unit->getFaction()))
_player->GetReputationMgr().SetVisible(factionTemplateEntry);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment