Skip to content

Instantly share code, notes, and snippets.

@rsa
Created December 12, 2010 19:02
Show Gist options
  • Save rsa/738244 to your computer and use it in GitHub Desktop.
Save rsa/738244 to your computer and use it in GitHub Desktop.
pets 4
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 2de95d6..ab8fda0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6214,10 +6214,7 @@ Pet* Unit::GetPet() const
.
Pet* Unit::_GetPet(ObjectGuid guid) const
{
- if (Map* pMap = GetMap())
- return pMap->GetPet(guid);
- else
- return NULL;
+ return ObjectAccessor::FindPet(guid);
}
.
void Unit::RemoveMiniPet()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment