So I posted something similar in the main Clarity issues page, but I had an additional problem I'd like to solve. Since CDOTA_DataDire's or CDOTA_DataRadiant'sm_vecDataTeam.000X.m_nPissibleHeroSelection seems to be returning -1 for the entire match on new replays, I noticed that I can at least see what heroes are being used with CDOTA_Unit_Hero_X where X is the hero's CDOTA name. The problem is the index values of the CDOTA_Unit_Hero classes seem to always be different, so I would have to search all indexes and compare them against all heroes in Dota 2 to find which are being used. Is there a way to retrieve all classes that begin with "CDOTA_Unit_Hero_" so I don't have to iterate through them all?
Entities has a method getAllByPredicate(predicate) which will pre-filter the list for you.
Just write a predicate that'll return true if the entity.getDtClass().getName().startsWith(...)
So I posted something similar in the main Clarity issues page, but I had an additional problem I'd like to solve. Since
CDOTA_DataDire's
orCDOTA_DataRadiant's
m_vecDataTeam.000X.m_nPissibleHeroSelection
seems to be returning -1 for the entire match on new replays, I noticed that I can at least see what heroes are being used withCDOTA_Unit_Hero_X
where X is the hero's CDOTA name. The problem is the index values of theCDOTA_Unit_Hero
classes seem to always be different, so I would have to search all indexes and compare them against all heroes in Dota 2 to find which are being used. Is there a way to retrieve all classes that begin with"CDOTA_Unit_Hero_"
so I don't have to iterate through them all?