F-Caneiras Posted January 29, 2019 at 05:39 PM Share Posted January 29, 2019 at 05:39 PM //Reload mob_drop_item Ir para: source/server/game/src/cmd_gm.cpp procurar ACMD(do_reload) dentro do ficheiro encontrar: case 'c': ch->ChatPacket(CHAT_TYPE_INFO, "Reloading cube table."); Cube_init(); break; Adicionar em baixo: de break; #ifdef RELOAD_MOB_DROP_ITEM 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; #endif Ir para: source/server/game/src/item_manager.cpp No final de todo o codigo por: #ifdef RELOAD_MOB_DROP_ITEM 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(); } #endif Ir para: source/server/game/src/item_manager.h procurar por: void Destroy(); Adicionar em baixo: #ifdef RELOAD_MOB_DROP_ITEM void DestroyMobDropItem(); #endif Comando no jogo: (/reload m) para dar reload no mob_drop_item Adaptado:Caneiras 2 1 Link to comment
Marcos Posted January 29, 2019 at 07:25 PM Share Posted January 29, 2019 at 07:25 PM Muito bom, obrigado pela partilha. Link to comment
LuizFernando Posted February 1, 2019 at 01:32 AM Share Posted February 1, 2019 at 01:32 AM Tem para etc_drop_item, special_drop_item, common_drop_item? Link to comment
Marco Posted February 1, 2019 at 04:03 AM Share Posted February 1, 2019 at 04:03 AM 2 horas atrás, LuizFernando disse: Tem para etc_drop_item, special_drop_item, common_drop_item? é o mesmo processo mas com "nomes" diferentes e atalho diferentes ( em vez de "m" metes x g h wtv ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now