Jump to content
  • 0

Wolfman bug metin2


JinHan

Question

Hy everybody ,first of all, thanks for your helping anytime. now i come with two bugs,

the first one, i can't add points to wolfman skills

3Y2QSyA.jpgIf i click on+ nothing happens, i know from where the problem comes, from type of skill in navicat if i put type 6 i can add points, but if i put type 7 i can't add, the problems is in char_skill.cpp from islearnableskill function

that's what i have 

bool CHARACTER::IsLearnableSkill(DWORD dwSkillVnum) const
{
	const CSkillProto * pkSkill = CSkillManager::instance().Get(dwSkillVnum);
	if (!pkSkill)
		return false;

	if (GetSkillLevel(dwSkillVnum) >= SKILL_MAX_LEVEL)
		return false;

	if (pkSkill->dwType == 0)
	{
		if (GetSkillLevel(dwSkillVnum) >= pkSkill->bMaxLevel)
			return false;

		return true;
	}

	if (pkSkill->dwType == 5)
	{
		if (dwSkillVnum == SKILL_HORSE_WILDATTACK_RANGE && GetJob() != JOB_ASSASSIN)
			return false; 

		return true;
	}

	if (GetSkillGroup() == 0)
		return false;

	if (pkSkill->dwType - 1 == GetJob())
		return true;

	if (pkSkill->dwType == 5)
	{
		if (SKILL_7_A_ANTI_TANHWAN <= dwSkillVnum && dwSkillVnum <= SKILL_7_D_ANTI_YONGBI)
		{
			for (int i = 0 ; i < 4 ; i++)
			{
				if (unsigned(SKILL_7_A_ANTI_TANHWAN + i) != dwSkillVnum)
				{
					if (0 != GetSkillLevel(SKILL_7_A_ANTI_TANHWAN + i))
					{
						return false;
					}
				}
			}

			return true;
		}

		if (SKILL_8_A_ANTI_GIGONGCHAM <= dwSkillVnum && dwSkillVnum <= SKILL_8_D_ANTI_BYEURAK)
		{
			for (int i = 0 ; i < 4 ; i++)
			{
				if (unsigned(SKILL_8_A_ANTI_GIGONGCHAM + i) != dwSkillVnum)
				{
					if (0 != GetSkillLevel(SKILL_8_A_ANTI_GIGONGCHAM + i))
						return false;
				}
			}
			
			return true;
		}
	}

	if (pkSkill->dwType == 6)
	{
		if (dwSkillVnum >= SKILL_CHAYEOL && dwSkillVnum <= SKILL_CHEONGRANG)
		{
			return true;
		}
	}

	return false;
}

i have tried to add that 

	if (pkSkill->dwType == 7 && GetJob() == JOB_WOLFMAN)
	{
		return true;
	}	

but problem has not fixed, i tried to change this

if (pkSkill->dwType == 6)

with this

if (pkSkill->dwType == 7)

but the same thing, does anybody know what i can fix that? can you help me,thanks in advance

.the secound problem is that i have a buff after teleport which dissapear after few secounds ,there's a picture about this http://prntscr.com/6ax4yh         ,i am using allwip source.thanks so much

 

Link to comment
  • Answers 12
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

12 answers to this question

Recommended Posts

  • 0

Here is my and work's

bool CHARACTER::IsLearnableSkill(DWORD dwSkillVnum) const
{
    const CSkillProto * pkSkill = CSkillManager::instance().Get(dwSkillVnum);

    if (!pkSkill)
        return false;

    if (GetSkillLevel(dwSkillVnum) >= SKILL_MAX_LEVEL)
        return false;

    if (pkSkill->dwType == 0)
    {
        if (GetSkillLevel(dwSkillVnum) >= pkSkill->bMaxLevel)
            return false;

        return true;
    }

    if (pkSkill->dwType == 5)
    {
        if (dwSkillVnum == SKILL_HORSE_WILDATTACK_RANGE && GetJob() != JOB_ASSASSIN)
            return false;

        return true;
    }

    if (GetSkillGroup() == 0)
        return false;

    if (pkSkill->dwType - 1 == GetJob())
        return true;

    if (6 == pkSkill->dwType)
    {
        if (SKILL_7_A_ANTI_TANHWAN <= dwSkillVnum && dwSkillVnum <= SKILL_7_D_ANTI_YONGBI)
        {
            for (int i=0 ; i < 4 ; i++)
            {
                if (unsigned(SKILL_7_A_ANTI_TANHWAN + i) != dwSkillVnum)
                {
                    if (0 != GetSkillLevel(SKILL_7_A_ANTI_TANHWAN + i))
                    {
                        return false;
                    }
                }
            }

            return true;
        }

        if (SKILL_8_A_ANTI_GIGONGCHAM <= dwSkillVnum && dwSkillVnum <= SKILL_8_D_ANTI_BYEURAK)
        {
            for (int i=0 ; i < 4 ; i++)
            {
                if (unsigned(SKILL_8_A_ANTI_GIGONGCHAM + i) != dwSkillVnum)
                {
                    if (0 != GetSkillLevel(SKILL_8_A_ANTI_GIGONGCHAM + i))
                        return false;
                }
            }
            
            return true;
        }
    }

    return false;
}
Link to comment
  • 0

 

Here is my and work's

bool CHARACTER::IsLearnableSkill(DWORD dwSkillVnum) const
{
    const CSkillProto * pkSkill = CSkillManager::instance().Get(dwSkillVnum);

    if (!pkSkill)
        return false;

    if (GetSkillLevel(dwSkillVnum) >= SKILL_MAX_LEVEL)
        return false;

    if (pkSkill->dwType == 0)
    {
        if (GetSkillLevel(dwSkillVnum) >= pkSkill->bMaxLevel)
            return false;

        return true;
    }

    if (pkSkill->dwType == 5)
    {
        if (dwSkillVnum == SKILL_HORSE_WILDATTACK_RANGE && GetJob() != JOB_ASSASSIN)
            return false;

        return true;
    }

    if (GetSkillGroup() == 0)
        return false;

    if (pkSkill->dwType - 1 == GetJob())
        return true;

    if (6 == pkSkill->dwType)
    {
        if (SKILL_7_A_ANTI_TANHWAN <= dwSkillVnum && dwSkillVnum <= SKILL_7_D_ANTI_YONGBI)
        {
            for (int i=0 ; i < 4 ; i++)
            {
                if (unsigned(SKILL_7_A_ANTI_TANHWAN + i) != dwSkillVnum)
                {
                    if (0 != GetSkillLevel(SKILL_7_A_ANTI_TANHWAN + i))
                    {
                        return false;
                    }
                }
            }

            return true;
        }

        if (SKILL_8_A_ANTI_GIGONGCHAM <= dwSkillVnum && dwSkillVnum <= SKILL_8_D_ANTI_BYEURAK)
        {
            for (int i=0 ; i < 4 ; i++)
            {
                if (unsigned(SKILL_8_A_ANTI_GIGONGCHAM + i) != dwSkillVnum)
                {
                    if (0 != GetSkillLevel(SKILL_8_A_ANTI_GIGONGCHAM + i))
                        return false;
                }
            }
            
            return true;
        }
    }

    return false;
}

it works with type7 in skill proto?

Link to comment
  • 0

i give you my source if you need it , but i don't understed what problem you got with skills.Why you don't use 6 type

so if i put skills on type 7 i cant add points if i put on 6 i can add

ro

daca pun skillurile pe type 7 nu pot adauga puncte adica de exemplu cand apas pe plus sa le fac 1,2,3,4,5,6,7,8,9,10.... pana la m1.... acum ai inteles?

Link to comment
  • 0

i ask you why you need type 7

 

 

ro :

 

te-am intrebat de ce ai nevoie de type 7.

because type in client and server must be the same, i know that it will work with type 6 too but i want type 7

Link to comment

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

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.