Closed yduke closed 1 month ago
You are looking through the games (trophy titles) from a user, these will only have the id and associated user data related to said game.
You'll have to lookup the game itself to get things like DLC names.
// Get "groups" (game ("default") and DLCs ("001, 002, 003..."))
foreach ($client->trophies($trophyTitle->npCommunicationId(), $trophyTitle->serviceName())->trophyGroups() as $trophyGroup) {
$groupId = $trophyGroup->id();
$groupName = $trophyGroup->name();
$groupDetail = $trophyGroup->detail();
}
Thank you! It works! This issue has troubled me for several days. You are absolutely right about it. Cheers!
For some games with DLCs and have trophies in each DLCs, I have tried to get each DLC names, for example:
Nioh 2
So, I've tried:
https://github.com/Tustin/psn-php/blob/b4ecb23e16a39815237bd884f50950a777e882e7/src/Model/Trophy/TrophyGroup.php#L48-L54
The name of DLC ($trophyGroup->name() ) will always be an empty string, I've tried to var_dump each whole
$trophyGroup
, not found the DLC name in there, thetrophyGroupId
is there though, given "default", "001", "002" ....ext.Is there any other way to get DLC name(s) for a game (trohyTitle) ? Thank you for any help.