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

Simplified CTypeList class

This commit is contained in:
Ivan Savenko
2023-11-08 22:05:36 +02:00
parent eb167d94a6
commit 4a7fa9bf8c
15 changed files with 96 additions and 405 deletions

View File

@@ -485,7 +485,7 @@ void CVCMIServer::threadHandleClient(std::shared_ptr<CConnection> c)
void CVCMIServer::handleReceivedPack(std::unique_ptr<CPackForLobby> pack)
{
CBaseForServerApply * apply = applier->getApplier(typeList.getTypeID(pack.get()));
CBaseForServerApply * apply = applier->getApplier(CTypeList::getInstance().getTypeID(pack.get()));
if(apply->applyOnServerBefore(this, pack.get()))
addToAnnounceQueue(std::move(pack));
}
@@ -502,7 +502,7 @@ void CVCMIServer::announcePack(std::unique_ptr<CPackForLobby> pack)
c->sendPack(pack.get());
}
applier->getApplier(typeList.getTypeID(pack.get()))->applyOnServerAfter(this, pack.get());
applier->getApplier(CTypeList::getInstance().getTypeID(pack.get()))->applyOnServerAfter(this, pack.get());
}
void CVCMIServer::announceMessage(const std::string & txt)