The idea is good, but after adding this, you will notice that when a player approaches or you go to cities with players, the game loses fps (possibly this is normal on all clients before adding this, don't know, never had it on my server, probably been using LoadStaticCache forever)
I recommend using the LoadStaticCache, this makes loading slower but will prevent fps drop when rendering nearby players.
Example:
char szFileName[FILE_MAX_NUM];
pRaceData->RegisterMotionMode(pkMotionManager.MODE_GENERAL);
for (const auto& it : m_vecEmotion)
{
snprintf(szFileName, sizeof(szFileName), "%s%s%s", stFolder, "action/", it.stName);
auto pkMootionThing = pRaceData->RegisterMotionData(pkMotionManager.MODE_GENERAL, it.wMotionIndex, szFileName, it.byPercentage);
if (pkMootionThing)
{
CResourceManager::Instance().LoadStaticCache(pkMootionThing->GetFileName());
}
}
For emoticons, I suggest you change the way they are done, for example in game.py:
Replace:
net.SendChatPacket("(double_kill)")
For:
chrmgr.SetEmoticon(-1,14)
net.SendEmoticon(14)
#####Note: If you do the LoadStaticCache instead of making the load faster, it will make it slower.###