Jump to content

FIX Sword Strike fails


caanmasu

Recommended Posts

  • Active Member

Hello

I found a base bug and I have found its solution. I share it with you with tests.

Bug 1: Many times when attacking with Sword Strike the damage fails and this damage behavior varies very strange.
Fix: Remove CRUSH flag from skill_proto (index 20)

Bug 2: The damage of Sword Strike is too low compared to the other skills of your group.
Fix: Change eSkillType from MELEE to RANGE in skill_proto (index 20)


Testing bug 1: https://metin2.download/video/s0Wc1OOpxh7SqbafJtk81nd4BN2QWmCG/.mp4

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 2
  • Scream 1
Link to comment
Share on other sites

  • Premium
13 hours ago, AndreiS said:

Is any good this solution ?

No. You're effectively changing how the skill works instead of fixing the issue (which I still don't get what it even is)

Edited by Syreldar

 

"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

  • Active Member

Important!


Update fix

Undo fix 1. Put flag CRUSH again. CRUSH is stun in player skill.



Explication of bug:

This is the code

			if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_CRUSH | SKILL_FLAG_CRUSH_LONG) &&
				!IS_SET(pkChrVictim->GetAIFlag(), AIFLAG_NOMOVE))
			{
				...
				pkChrVictim->Sync(tx, ty);
				pkChrVictim->Goto(tx, ty);
				pkChrVictim->CalculateMoveDuration();

				if (m_pkChr->IsPC() && m_pkChr->m_SkillUseInfo[m_pkSk->dwVnum].GetMainTargetVID() == (DWORD) pkChrVictim->GetVID())
				{
					SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 4, m_pkSk->szName);
				}
				else{
					pkChrVictim->SyncPacket();
				}

 

 

You have to start from some facts.

1. A player skill with the CRUSH flag stuns and pushes at the same time if the victim does not have immunity to blackouts.
2. If a character is stunned and receives a stun flag, they should not be pushed and should not be turned off again.
3. If a monster has CRUSH in his skill, he will always push the enemy

The bug is that the CRUSH skill will always do pushback, whether you have immunity to blackouts or not.
If a character launches sword strike against another character who is immune to blackouts, he pushes him but does not update packets (the push will not be seen). You can check this by looking at the distance in the syslog. The distance changes, even though it was never pushed.

The solution is to push only when one character stuns another.
In case a boss attacks with CRUSH, always push.

Fix:

			if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_CRUSH | SKILL_FLAG_CRUSH_LONG) &&
				!IS_SET(pkChrVictim->GetAIFlag(), AIFLAG_NOMOVE))
			{
				...
				//We remove the move in all cases.
				//pkChrVictim->Sync(tx, ty);
				//pkChrVictim->Goto(tx, ty);
				//pkChrVictim->CalculateMoveDuration();

				bool bIgnoreStun = pkChrVictim->IsAffectFlag(AFF_STUN); //If the character is already stunned we save in variable

				if (m_pkChr->IsPC() && m_pkChr->m_SkillUseInfo[m_pkSk->dwVnum].GetMainTargetVID() == (DWORD) pkChrVictim->GetVID())
				{
					SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 4, m_pkSk->szName);
				}
				//else{
				//	pkChrVictim->SyncPacket();
				//}
				
				
				if ((!bIgnoreStun && !(pkChrVictim->GetPoint(POINT_IMMUNE_STUN))) || m_pkChr->IsNPC()) //If the character has no stun and has no immune, or the attack comes from a monster
				{
					//Make the push and update packets
					pkChrVictim->Sync(tx, ty);
					pkChrVictim->Goto(tx, ty);
					pkChrVictim->CalculateMoveDuration();
					pkChrVictim->SyncPacket();
				}

 

This fix solve the next bug, too: (double slide)

https://metin2.download/video/YnRj2vfthxEKq9yGG7ybMWo01bIMp40b/.mp4

Edited by caanmasu
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
Share on other sites

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.