Tustin / psn-php

A PHP wrapper for the PSN API
https://tustin.dev/psn-php/
MIT License
354 stars 73 forks source link

When getting the definedTrophies for trophyGroup, it will get the definedTrophies for the entire game #230

Open MnKashpour opened 1 year ago

MnKashpour commented 1 year ago

When I try to access the defined trophies in each trophy group of a title, I get the same result for all groups, here is a code snippet for the title "Horizon Forbidden West" with the outcome

$groups =  $this->getClient()->trophies('NPWR21008_00', 'trophy2')->trophyGroups();

foreach ($groups as $key => $value) {
   echo $value->id() .' : ' . PHP_EOL;
   echo json_encode($value->definedTrophies()) . PHP_EOL;
}

The outcome:

default : 
{"bronze":53,"silver":7,"gold":1,"platinum":1}
001 :
{"bronze":53,"silver":7,"gold":1,"platinum":1}

The default game only has bronze:50 silver:7 gold:1 platinum:1 and the DLC '001' only has bronze:3 silver:0 gold:0 platinum:0

so the result should be:

default : 
{"bronze":50,"silver":7,"gold":1,"platinum":1}
001 :
{"bronze":3,"silver":0,"gold":0,"platinum":0}
owendswang commented 1 year ago

This problem still remains.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.