Fix #7450: Only 3 standard entertainer costumes can be chosen

String value rather than string arrays were not being processed for enterainer costumes in object json files.
This commit is contained in:
Ted John 2018-04-26 22:00:48 +01:00
parent 2d92ecf10b
commit 2ef549b055
1 changed files with 3 additions and 5 deletions

View File

@ -154,12 +154,10 @@ void SceneryGroupObject::ReadJson(IReadObjectContext * context, const json_t * r
uint32 SceneryGroupObject::ReadJsonEntertainerCostumes(const json_t * jCostumes)
{
uint32 costumes = 0;
size_t index;
json_t * jCostume;
json_array_foreach(jCostumes, index, jCostume)
auto szCostumes = ObjectJsonHelpers::GetJsonStringArray(jCostumes);
for (const auto& szCostume : szCostumes)
{
auto costume = ObjectJsonHelpers::GetString(jCostume);
auto entertainer = ParseEntertainerCostume(costume);
auto entertainer = ParseEntertainerCostume(szCostume);
// For some reason the flags are +4 from the actual costume IDs
// See staff_get_available_entertainer_costumes