Jump to content

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • Premium

Hi.

If you want a different function, duplicate purge (cmd.cpp cmd_gm.cpp) and change its names.

After, at cmd_gm.cpp search for (the name will be your duplicated one):

struct FuncPurge

And edit here the max range:

if (!m_bAll && iDist >= 1000)
            return;

 

Or you can just change the range there for the current purge function.

Link to comment
Share on other sites

22 hours ago, tierrilopes said:

Hi.

If you want a different function, duplicate purge (cmd.cpp cmd_gm.cpp) and change its names.

After, at cmd_gm.cpp search for (the name will be your duplicated one):

struct FuncPurge

And edit here the max range:

if (!m_bAll && iDist >= 1000)
            return;

 

Or you can just change the range there for the current purge function.

For how much need change 1000? If I need purge mobs on big map?

Link to comment
Share on other sites

23 hours ago, Istny said:

SECTREE_MANAGER::instance().PurgeMonstersInMap(ch->GetMapIndex());

you mean so?

struct FuncPurge
{
    LPCHARACTER m_pkGM;
    bool    m_bAll;

    FuncPurge(LPCHARACTER ch) : m_pkGM(ch), m_bAll(false)
    {
    }

    void operator () (LPENTITY ent)
    {
        if (!ent->IsType(ENTITY_CHARACTER))
            return;

        LPCHARACTER pkChr = (LPCHARACTER) ent;

        
SECTREE_MANAGER::instance().PurgeMonstersInMap(ch->GetMapIndex());
            return;

        sys_log(0, "PURGE: %s %d", pkChr->GetName(), iDist);

        if (pkChr->IsNPC() && !pkChr->IsPet() && pkChr->GetRider() == NULL)
        {
            M2_DESTROY_CHARACTER(pkChr);
        }
    }
};

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.