From c10d9ae26098b7398e8dc55bfd0477141e3c457c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Wed, 12 Jul 2023 12:07:44 +0100 Subject: [PATCH] Update checkRpItemsPosition and getTeam --- .../mission_manager/missions_commands.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp b/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp index 1ba303d34..6c3e95971 100644 --- a/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp +++ b/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp @@ -2003,8 +2003,13 @@ NLMISC_COMMAND(slide, "slide to the powo", " x y cell [z] [h]") } //---------------------------------------------------------------------------- -NLMISC_COMMAND(getPlayersInPowos, "get list of players in a powo", "") +NLMISC_COMMAND(getPlayersInPowos, "get list of players in a powo", "[onlyPowoId]") { + sint32 onlyPowoId = 0; + + if (args.size() >= 1) + fromString(args[0], onlyPowoId); + CPlayerManager::TMapPlayers::const_iterator itPlayer = PlayerManager.getPlayers().begin(); for (; itPlayer != PlayerManager.getPlayers().end(); ++itPlayer) @@ -2015,7 +2020,7 @@ NLMISC_COMMAND(getPlayersInPowos, "get list of players in a powo", "") if (player) { sint32 powo = player->getPowoCell(); - if (powo != 0) + if (powo != 0 && (onlyPowoId == 0 || powo == onlyPowoId)) log.displayNL("%d: %s", powo, player->getName().toString().c_str()); } } @@ -3433,6 +3438,9 @@ NLMISC_COMMAND(getTeam, "get the team of a player","") if (pTeam != NULL) { log.displayNL("%d", c->getTeamId()); + ucstring name = CEntityIdTranslator::getInstance()->getByEntity(pTeam->getLeader()); + CEntityIdTranslator::removeShardFromName(name); + log.displayNL("leader|%s", name.toUtf8().c_str()); for (list::const_iterator it = pTeam->getTeamMembers().begin(); it != pTeam->getTeamMembers().end(); ++it) { ucstring name = CEntityIdTranslator::getInstance()->getByEntity((*it)); -- 2.11.4.GIT