Jump to content

//Reload mob_drop_item


F-Caneiras

Recommended Posts

//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

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...