-
Автор темы
- #1
In new update, there is no modifier_truesight. here is my previous code for detecting if we are visible under enemy ward:
but it won't work in new update because there is no more modifier_truesight. any solution?
C++:
bool IsSeenByEnemy(const CDOTABaseNPC_Hero* hero)
{
const auto modifierManager = hero->GetModifierManager();
if (!modifierManager)
return false;
auto modifierList = modifierManager->GetModifierList();
for (int32_t i = 0; i < modifierList.size(); i++)
{
const auto modifier = modifierList[i];
if (!modifier)
continue;
auto name = modifier->GetName();
if (!name)
continue;
if (strstr(name, "modifier_truesight"))
{
return true;
}
}
return false;
}