Jump to content

Sura Manashield Bug


Recommended Posts

  • Management

Hello,

I'm testing the damages on my server and we realized that magic sura using it's protection gets much more damage than he takes without it...

My skill proto row

INSERT INTO `skill_proto`(`dwVnum`, `szName`, `bType`, `bLevelStep`, `bMaxLevel`, `bLevelLimit`, `szPointOn`, `szPointPoly`, `szSPCostPoly`, `szDurationPoly`, `szDurationSPCostPoly`, `szCooldownPoly`, `szMasterBonusPoly`, `szAttackGradePoly`, `setFlag`, `setAffectFlag`, `szPointOn2`, `szPointPoly2`, `szDurationPoly2`, `setAffectFlag2`, `szPointOn3`, `szPointPoly3`, `szDurationPoly3`, `szGrandMasterAddSPCostPoly`, `prerequisiteSkillVnum`, `prerequisiteSkillLevel`, `eSkillType`, `iMaxHit`, `szSplashAroundDamageAdjustPoly`, `dwTargetRange`, `dwSplashRange`) VALUES (79, 0xC8E6BDC5BCF6C8A3, 3, 1, 1, 0, 'DEF_GRADE', '(0.5*iq+15)*k', '20+30*k', '60+120*k', '5+10*k', '63+120*k', '(0.5*iq+15)*k', '', 'SELFONLY,TOGGLE', 'MANASHIELD', 'MANASHIELD', '100-((iq*0.84)*k)', '60+120*k', '', '', '', '', '20+30*k', 0, 0, 'MAGIC', 1, '0.8', 0, 0);

My char_battle.cpp

			// POINT_MANASHIELD �� �۾������� ����
			int iDamageSPPart = (dam * GetPoint(POINT_MANASHIELD)) / 100;
			int iDamageToSP = iDamageSPPart * 0.2f;
			int iSP = GetSP();

			// SP�� ������ ������ ������ ���� ����
			if (iDamageToSP <= iSP)
			{
				PointChange(POINT_SP, -iDamageToSP);
				dam -= iDamageSPPart;
			}
			else
			{
				// ���ŷ��� ���ڶ��� �ǰ� �� �←���ҋ�
				PointChange(POINT_SP, -GetSP());
				dam -= (iSP / 20) * 100;
			}

Does anyone know what is wrong?

raw

raw

Link to comment
Share on other sites

  • Replies 17
  • Created
  • Last Reply

Top Posters In This Topic

  • Premium
3 hours ago, charparodar said:

BUMP

You changed the formula didn't you? It's different from usual. What were you trying to do? I can write it for you.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Management
1 minute ago, Syreldar said:

You changed the formula didn't you? It's different from usual. What were you trying to do? I can write it for you.

I didn't touch the formula actually, and I even compared the formula with another serverfiles and it was the same...

I've touched every other skill that does damage, like warrior aura, triple attack, etc, didn't touch defensive skills

raw

raw

Link to comment
Share on other sites

  • Premium
	if (IsAffectFlag(AFF_MANASHIELD))
	{
		// POINT_MANASHIELD ´Â ÀÛ¾ÆÁú¼ö·Ï ÁÁ´Ù
		int iDamageSPPart = dam / 3;
		int iDamageToSP = iDamageSPPart * GetPoint(POINT_MANASHIELD) / 100;
		int iSP = GetSP();

		// SP°¡ ÀÖÀ¸¸é ¹«Á¶°Ç µ¥¹ÌÁö Àý¹Ý °¨¼Ò
		if (iDamageToSP <= iSP)
		{
			PointChange(POINT_SP, -iDamageToSP);
			dam -= iDamageSPPart;
		}
		else
		{
			// Á¤½Å·ÂÀÌ ¸ðÀÚ¶ó¼­ ÇÇ°¡ ´õ ±ï¿©¾ßÇÒ‹š
			PointChange(POINT_SP, -GetSP());
			dam -= iSP * 100 / MAX(GetPoint(POINT_MANASHIELD), 1);
		}
	}

This is the real formula.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Management

Ah that formula, yes I changed it. I'm using the one from vanilla's source, but I tried both original and the one from vanilla, even thought the results were different, it wasn't what it was supposed to do...

raw

raw

Link to comment
Share on other sites

  • Premium
1 minute ago, charparodar said:

Ah that formula, yes I changed it. I'm using the one from vanilla's source, but I tried both original and the one from vanilla, even thought the results were different, it wasn't what it was supposed to do...

What do you mean?

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Management
Just now, Syreldar said:

What do you mean?

I tested with the original source formula and the one from vanilla that can be activated and deactivated with a config option.

The one from vanilla is letting the sura getting much more damage. An example, yesterday me and my friends tested, while I was without the manashield I got 800 of damage (hit), when I used the manashield I started getting 3000 (hit) (it was neither critic or penetration)

With the original formula I can't remember exactly what was the difference, but it wasn't doing what was supposed to as well...

raw

raw

Link to comment
Share on other sites

  • 1 month later...
  • Management
8 hours ago, WeedHex said:

Show us you manashield formula 

INSERT INTO `player`.`skill_proto`(`dwVnum`, `szName`, `bType`, `bLevelStep`, `bMaxLevel`, `bLevelLimit`, `szPointOn`, `szPointPoly`, `szSPCostPoly`, `szDurationPoly`, `szDurationSPCostPoly`, `szCooldownPoly`, `szMasterBonusPoly`, `szAttackGradePoly`, `setFlag`, `setAffectFlag`, `szPointOn2`, `szPointPoly2`, `szDurationPoly2`, `setAffectFlag2`, `szPointOn3`, `szPointPoly3`, `szDurationPoly3`, `szGrandMasterAddSPCostPoly`, `prerequisiteSkillVnum`, `prerequisiteSkillLevel`, `eSkillType`, `iMaxHit`, `szSplashAroundDamageAdjustPoly`, `dwTargetRange`, `dwSplashRange`) VALUES (79, 0xC8E6BDC5BCF6C8A3, 3, 1, 1, 0, 'DEF_GRADE', '(0.5*iq+15)*k', '20+30*k', '60+120*k', '5+10*k', '63+120*k', '(0.5*iq+15)*k', '', 'SELFONLY,TOGGLE', 'MANASHIELD', 'MANASHIELD', '100-((iq*0.84)*k)', '60+120*k', '', '', '', '', '20+30*k', 0, 0, 'MAGIC', 1, '0.8', 0, 0);

On source I'm using the one, also tried the one from vanilla source but didn't work:

		if(!bugfix_sura_manashield)
		{
			// POINT_MANASHIELD ´Â ÀÛ¾ÆÁú¼ö·Ï ÁÁ´Ù
			int iDamageSPPart = dam / 3;
			int iDamageToSP = iDamageSPPart * GetPoint(POINT_MANASHIELD) / 100;
			int iSP = GetSP();

			// SP°¡ ÀÖÀ¸¸é ¹«Á¶°Ç µ¥¹ÌÁö Àý¹Ý °¨¼Ò
			if (iDamageToSP <= iSP)
			{
				PointChange(POINT_SP, -iDamageToSP);
				dam -= iDamageSPPart;
			}
			else
			{
				// Á¤½Å·ÂÀÌ ¸ðÀÚ¶ó¼­ ÇÇ°¡ ´õ ±ï¿©¾ßÇÒ‹š
				PointChange(POINT_SP, -GetSP());
				dam -= iSP * 100 / MAX(GetPoint(POINT_MANASHIELD), 1);
			}
		} else {
			// POINT_MANASHIELD ´Â ÀÛ¾ÆÁú¼ö·Ï ÁÁ´Ù
			int iDamageSPPart = (dam * GetPoint(POINT_MANASHIELD)) / 100;
			int iDamageToSP = iDamageSPPart * 0.2f;
			int iSP = GetSP();

			// SP°¡ ÀÖÀ¸¸é ¹«Á¶°Ç µ¥¹ÌÁö Àý¹Ý °¨¼Ò
			if (iDamageToSP <= iSP)
			{
				PointChange(POINT_SP, -iDamageToSP);
				dam -= iDamageSPPart;
			}
			else
			{
				// Á¤½Å·ÂÀÌ ¸ðÀÚ¶ó¼­ ÇÇ°¡ ´õ ±ï¿©¾ßÇÒ‹š
				PointChange(POINT_SP, -GetSP());
				dam -= (iSP / 20) * 100;
			}
		}

 

raw

raw

Link to comment
Share on other sites

  • 3 weeks later...
6 hours ago, charparodar said:

BUMP

    if (IsAffectFlag(AFF_MANASHIELD)) 
    {
        // POINT_MANASHIELD 는 작아질수록 좋다
        int iDamageSPPart = dam / 3;
        int iDamageToSP = iDamageSPPart * GetPoint(POINT_MANASHIELD) / 100;
        int iSP = GetSP();

        // SP가 있으면 무조건 데미지 절반 감소
        if (iDamageToSP <= iSP)
        {
            PointChange(POINT_SP, -iDamageToSP);
            dam -= iDamageSPPart;
        }
        else
        {
            // 정신력이 모자라서 피가 더 깍여야할
            PointChange(POINT_SP, -GetSP());
            dam -= iSP * 100 / MAX(GetPoint(POINT_MANASHIELD), 1);
        }
    }

Link to comment
Share on other sites

  • Management
10 minutes ago, zeimpekis9 said:

    if (IsAffectFlag(AFF_MANASHIELD)) 
    {
        // POINT_MANASHIELD 는 작아질수록 좋다
        int iDamageSPPart = dam / 3;
        int iDamageToSP = iDamageSPPart * GetPoint(POINT_MANASHIELD) / 100;
        int iSP = GetSP();

        // SP가 있으면 무조건 데미지 절반 감소
        if (iDamageToSP <= iSP)
        {
            PointChange(POINT_SP, -iDamageToSP);
            dam -= iDamageSPPart;
        }
        else
        {
            // 정신력이 모자라서 피가 더 깍여야할
            PointChange(POINT_SP, -GetSP());
            dam -= iSP * 100 / MAX(GetPoint(POINT_MANASHIELD), 1);
        }
    }

Thanks, but that's what I already have...

That doesn't work neither does work the one from vanilla source...

raw

raw

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



  • Similar Content

  • Activity

    1. 0

      Moving server from FreeBSD 11.2 to 13.2 - lib needed

    2. 0

      I just implemented some costumes and they are not visible

    3. 0

      Skill Tree Problem

    4. 97

      Ulthar SF V2 (TMP4 Base)

    5. 5

      Client Crashes through Offline Shop (Ikarus)

    6. 5

      VIVY-WORLD2 - FARM TO THE TOP

    7. 0

      ToolTip Bug?

    8. 0

      Skill tree build erorr

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.