Jump to content

Reload Mob_drop_item.txt


MiGueLiT0
 Share

Recommended Posts

Ah muchos quizas les servira o si ya lo tienen ps se los comparto igual :V 

 

Buscas en CMD_GM
  
ACMD(do_reload)
    
                case 'c':
                ch->ChatPacket(CHAT_TYPE_INFO, "Reloading cube table.");
                Cube_init();
                break;

Añades:

#ifdef RELOAD_DROP_FLASH
            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
Añades esto en item_manager.cpp

#ifdef RELOAD_DROP_FLASH
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
Añades esto en item_manager.h

#ifdef RELOAD_DROP_FLASH
        void            DestroyMobDropItem();
#endif
Por ultimo en service.h
añades: 

#define RELOAD_DROP_FLASH

 

Creditos Infomanii.ro

 

😉 😄

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...