1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Use toEntity/toXXX methods in Identifier instead VLC objects access

This commit is contained in:
Ivan Savenko
2023-11-02 18:45:46 +02:00
parent 8d5fa41a19
commit 184f5a72cc
29 changed files with 101 additions and 90 deletions

View File

@@ -171,10 +171,10 @@ namespace TriggeredEventsDetail
case EMetaclass::OBJECT:
{
//TODO
std::set<si32> subtypes = VLC->objtypeh->knownSubObjects(type);
auto subtypes = VLC->objtypeh->knownSubObjects(type);
if(!subtypes.empty())
{
si32 subtype = *subtypes.begin();
auto subtype = *subtypes.begin();
auto handler = VLC->objtypeh->getHandlerFor(type, subtype);
identifier = handler->getTypeName();
}