fix(Core/Player): Fix potential freeze on login after skipping cinematics (#9577)

Move to static_cast and matching it up with tc stops the error on console and first login characters from being frozen when skipping cinematics
This commit is contained in:
acidmanifesto
2021-12-08 15:50:49 +01:00
committed by GitHub
parent 7c6edbd2bc
commit fa1c2eca9d

View File

@@ -12421,7 +12421,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
WorldObject* Player::GetViewpoint() const
{
if (ObjectGuid guid = GetGuidValue(PLAYER_FARSIGHT))
return (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*this, guid, TYPEMASK_SEER);
return static_cast<WorldObject*>(ObjectAccessor::GetObjectByTypeMask(*this, guid, TYPEMASK_SEER));
return nullptr;
}