Best way to do that is to use a Searcher struct and apply it to all nearby cells of the player. If mangos doesn't already have such searcher structs already built in GridNotifiers.cpp/h, I believe ScriptDev2 has some that they are using in some of their scripts for just this purpose of finding the closest gameobject/creature from a player. For best examples, you can check out their code on how they do this, just do a search in all SD2 files for "->Visit(". A lot of them (all?) use this idea of a searcher struct to find nearby objects in the cells.