Jump to content

Skill Buff Wolfman!


Recommended Posts

check this https://metin2dev.org/board/index.php?/topic/5029-c-party-flag/&page=1 , if you already installed this, check this function  in char_skill.cpp 

FPartyPIDCollector f;
GetParty()->ForEachOnMapMember(f, GetMapIndex());
for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
{
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
if (ch)
ch->ComputeSkill(dwVnum, ch);
}

 

then ,delete if(ch), done.

Link to comment
Share on other sites

4 hours ago, JinHan said:

check this https://metin2dev.org/board/index.php?/topic/5029-c-party-flag/&page=1 , if you already installed this, check this function  in char_skill.cpp 

FPartyPIDCollector f;
GetParty()->ForEachOnMapMember(f, GetMapIndex());
for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
{
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
if (ch)
ch->ComputeSkill(dwVnum, ch);
}

 

then ,delete if(ch), done.

in char_skill.cpp

i have this:

 

    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
    {
        FPartyPIDCollector f;
        GetParty()->ForEachOnMapMember(f, GetMapIndex());
        for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
        {
            LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
            if (ch)
                ch->ComputeSkill(dwVnum, ch);
        }
    }

 

make to this;

Spoiler

    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
    {
        FPartyPIDCollector f;
        GetParty()->ForEachOnMapMember(f, GetMapIndex());
        for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
        {
            LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
            if
                ch->ComputeSkill(dwVnum, ch);
        }
    }

 

 

Link to comment
Share on other sites

i test this:

else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
    {
        FPartyPIDCollector f;
        GetParty()->ForEachOnMapMember(f, GetMapIndex());
        for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
        {
            LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
                ch->ComputeSkill(dwVnum, ch);
        }
    }

and the problem not fix!

Link to comment
Share on other sites

char_skill.cpp

    if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
        ComputeSkill(dwVnum, this);
    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())ComputeSkill(dwVnum, this);
    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
    {
        FPartyPIDCollector f;
        GetParty()->ForEachOnMapMember(f, GetMapIndex());
        for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
        {
            LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
            ComputeSkill(dwVnum, ch);
        }
    }

  • Love 1
Link to comment
Share on other sites

1 minute ago, z35 said:

char_skill.cpp

    if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
        ComputeSkill(dwVnum, this);
    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())ComputeSkill(dwVnum, this);
    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
    {
        FPartyPIDCollector f;
        GetParty()->ForEachOnMapMember(f, GetMapIndex());
        for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
        {
            LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
            ComputeSkill(dwVnum, ch);
        }
    }

i check later :)

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.