Search: ACMD(do_reload)
Below:
switch (LOWER(*arg1))
{
Add:
Code
- case 'm':
- char szFileName[256];
- snprintf(szFileName, sizeof(szFileName), "%s/mob_drop_item.txt", LocaleService_GetBasePath().c_str());
- ITEM_MANAGER::Instance().DestroyMobDropItem();
- if (!ITEM_MANAGER::Instance().ReadMonsterDropItemGroup(szFileName))
- {
- ch->ChatPacket(CHAT_TYPE_INFO, "[!]Cannot reload mob_drop_item.txt.");
- return;
- }
- else
- {
- ch->ChatPacket(CHAT_TYPE_INFO, "Reloading mob_drop_item.txt.");
- }
- break;
Add to the end of the file:
Code
- void ITEM_MANAGER::DestroyMobDropItem()
- {
- if (!m_map_pkMobItemGroup.empty())
- m_map_pkMobItemGroup.clear();
- if (!m_map_pkDropItemGroup.empty())
- m_map_pkDropItemGroup.clear();
- if (!m_map_pkLevelItemGroup.empty())
- m_map_pkLevelItemGroup.clear();
- if (!m_map_pkGloveItemGroup.empty())
- m_map_pkGloveItemGroup.clear();
- if (!m_map_dwEtcItemDropProb.empty())
- m_map_dwEtcItemDropProb.clear();
- if (!g_vec_pkCommonDropItem->empty())
- g_vec_pkCommonDropItem->clear();
- }
Ingame: /reload m
If you want to reload it for all cores do this instead!
Above:
Add:
Code
- void MobDropReload()
- {
- char szFileName[256];
- snprintf(szFileName, sizeof(szFileName), "%s/mob_drop_item.txt", LocaleService_GetBasePath().c_str());
- ITEM_MANAGER::Instance().DestroyMobDropItem();
- if (!ITEM_MANAGER::Instance().ReadMonsterDropItemGroup(szFileName))
- {
- char buf[64];
- snprintf(buf, sizeof(buf), LC_TEXT("[!]Cannot reload mob_drop_item.txt."));
- SendNotice(buf);
- return;
- }
- else
- {
- char buf[64];
- snprintf(buf, sizeof(buf), LC_TEXT("reload mob_drop_item.txt."));
- SendNotice(buf);
- return;
- }
- }
- ACMD(do_reloadmob)
- {
- MobDropReload();
- TPacketGGMobdropreload p;
- p.bHeader = HEADER_GG_MOBDROP_RELOAD;
- P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGMobdropreload));
- }
Above:
Add:
Ingame: /reloadmob
Check if its already implemented. If not this might help you out