Jump to content

Attack Speed Slow


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

With this change, slow effect will also reduce attack speed, and will reduce movement speed more than before, making it a good bonus (and slow immunity relevant).

Video: 

1. Client Source/UserInterface/InstanceBase.h

Search:

AFFECT_NUM = 64,

Add above:

			AFFECT_SLOW_AS = 45,

Search:

NEW_AFFECT_BOW_DISTANCE,

Add below:			
			
			NEW_AFFECT_SLOW_AS = 227,

PythonCharacterModule.cpp:
Search:

PyModule_AddIntConstant(poModule, "AFFECT_SLOW",						CInstanceBase::AFFECT_SLOW);

Add below:

	PyModule_AddIntConstant(poModule, "AFFECT_SLOW_AS",						CInstanceBase::AFFECT_SLOW_AS);

2. 
game/src/affect.h

Cauta:

AFFECT_DEF_GRADE,		

Add below:

	AFFECT_SLOW_AS = 227,
	
Cauta:

AFF_BITS_MAX

Add above:

	AFF_SLOW_AS=45,
	
battle.cpp:
Search:

	AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW,  AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20,		"SLOW");
	
Replace with:

	if (pkAttacker->GetPoint(POINT_SLOW_PCT) && !pkVictim->IsAffectFlag(AFF_SLOW))
	{
		if (number(1, 100) <= pkAttacker->GetPoint(POINT_SLOW_PCT) && !pkVictim->IsImmune(IMMUNE_SLOW))
		{
			pkVictim->AddAffect(AFFECT_SLOW, POINT_MOV_SPEED, -50, AFF_SLOW, 10, 0, true);
			pkVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true);
		}
	}

char_affect.cpp:
Search:

RemoveAffect(AFFECT_SLOW);

Add below:

RemoveAffect(AFFECT_SLOW_AS);

char_skill.cpp:
Search:

else if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_SLOW))

Replace the content with:

				{
					if (iPct && !pkChrVictim->IsAffectFlag(AFF_SLOW))
					{
						if (number(1, 1000) <= iPct && !pkChrVictim->IsImmune(IMMUNE_SLOW))
						{
							pkChrVictim->AddAffect(AFFECT_SLOW, POINT_MOV_SPEED, -50, AFF_SLOW, 10, 0, true);
							pkChrVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true);
						}
					}
				}

Note: to modify the values, change the values inside the AddAffect function call. Example:

 

pkChrVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true);

 

-40 is the value reduced, 10 is the duration of the debuff.

 

 

 

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 11
  • Good 4
  • Love 2
  • Love 6
Link to comment
Share on other sites

  • 2 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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.