Jump to content

Recommended Posts

 Hi,

After this modification if the attack is BLOCKED or DODGED the attack cannot cause poisoning/fainting/slowing.
(New Bonus for block the NORMAL_MAGIC attack)

 

Server/Common/

Spoiler

service.h

Spoiler

 

Add:

#define ADVANCED_BLOCK_DODGE

 

length.h

Spoiler

Search for:

	APPLY_ANTI_PENETRATE_PCT,

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	APPLY_MAGIC,
#endif

 

 

Server/db/

Spoiler

 db/ProtoReader.cpp

Spoiler

Search for:

int get_Item_ApplyType_Value(string inputString)
{

Add after:

string arApplyType[] = {

this:

#ifdef ADVANCED_BLOCK_DODGE
			"APPLY_MAGIC",
#endif

 

 

Server/game/

Spoiler

battle.cpp

Spoiler

Search for:

NormalAttackAffect(pkAttacker, pkVictim);

Replace with:

#ifdef ADVANCED_BLOCK_DODGE
	//NormalAttackAffect(pkAttacker, pkVictim);
#else
	NormalAttackAffect(pkAttacker, pkVictim);
#endif

 

char.cpp

Spoiler

Search for:

		case POINT_DODGE:

Add after:

#ifdef ADVANCED_BLOCK_DODGE
		case POINT_MAGIC:
#endif

Search for:

		case APPLY_DODGE:

Add after:

#ifdef ADVANCED_BLOCK_DODGE
		case APPLY_MAGIC:
#endif

 

char.h 

Spoiler

Search for:

	DAMAGE_TYPE_NORMAL_RANGE,

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	DAMAGE_TYPE_NORMAL_MAGIC,
#endif

 Search for:

	POINT_RESIST_PENETRATE = 137,

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	POINT_MAGIC = 138,
#endif

 

char_battle.cpp

Spoiler

Search for:

if (DAMAGE_TYPE_MAGIC == type)

Replace with:

#ifdef ADVANCED_BLOCK_DODGE
	if (DAMAGE_TYPE_MAGIC == type || DAMAGE_TYPE_NORMAL_MAGIC == type)
#else
	if (DAMAGE_TYPE_MAGIC == type)
#endif

Search for:

else if (type == DAMAGE_TYPE_NORMAL || type == DAMAGE_TYPE_NORMAL_RANGE)

Replace with:

#ifdef ADVANCED_BLOCK_DODGE
	else if (type == DAMAGE_TYPE_NORMAL || type == DAMAGE_TYPE_NORMAL_RANGE || type == DAMAGE_TYPE_NORMAL_MAGIC)
#else
	else if (type == DAMAGE_TYPE_NORMAL || type == DAMAGE_TYPE_NORMAL_RANGE)
#endif

Search for:

			if (GetPoint(POINT_BLOCK) && number(1, 100) <= GetPoint(POINT_BLOCK))
			{
				if (test_server)
				{
					pAttacker->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 블럭! (%d%%)"), GetName(), GetPoint(POINT_BLOCK));
					ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 블럭! (%d%%)"), GetName(), GetPoint(POINT_BLOCK));
				}

				SendDamagePacket(pAttacker, 0, DAMAGE_BLOCK);
				return false;
			}

Add after:

#ifdef ADVANCED_BLOCK_DODGE
			NormalAttackAffect(pAttacker, this);
#endif

Search for:

			if (GetPoint(POINT_DODGE) && number(1, 100) <= GetPoint(POINT_DODGE))
			{
				if (test_server)
				{
					pAttacker->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 회피! (%d%%)"), GetName(), GetPoint(POINT_DODGE));
					ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 회피! (%d%%)"), GetName(), GetPoint(POINT_DODGE));
				}

				SendDamagePacket(pAttacker, 0, DAMAGE_DODGE);
				return false;
			}

Add after:

#ifdef ADVANCED_BLOCK_DODGE
			NormalAttackAffect(pAttacker, this);
#endif

 Search for:

		if (IsAffectFlag(AFF_JEONGWIHON))
			dam = (int) (dam * (100 + GetSkillPower(SKILL_JEONGWI) * 25 / 100) / 100);

Add befor:

#ifdef ADVANCED_BLOCK_DODGE
		else if (type == DAMAGE_TYPE_NORMAL_MAGIC)
		{
			if (GetPoint(POINT_MAGIC) && number(1, 100) <= GetPoint(POINT_MAGIC))
			{
				if (test_server)
				{
					pAttacker->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 회피! (%d%%)"), GetName(), GetPoint(POINT_MAGIC));
					ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 회피! (%d%%)"), GetName(), GetPoint(POINT_MAGIC));
				}

				SendDamagePacket(pAttacker, 0, DAMAGE_BLOCK);
				return false;
			}
			NormalAttackAffect(pAttacker, this);
		}	
#endif

Search for:

		case DAMAGE_TYPE_NORMAL:
		case DAMAGE_TYPE_NORMAL_RANGE:

Add after:

#ifdef ADVANCED_BLOCK_DODGE
		case DAMAGE_TYPE_NORMAL_MAGIC:
#endif

2x Search for:

NormalAttackAffect(m_me, pkVictim);

Replace with:

#ifdef ADVANCED_BLOCK_DODGE
						//NormalAttackAffect(m_me, pkVictim);
#else
						NormalAttackAffect(m_me, pkVictim);
#endif

Search for:

pkVictim->Damage(m_me, iDam, DAMAGE_TYPE_MAGIC);

Replace with:

#ifdef ADVANCED_BLOCK_DODGE
						pkVictim->Damage(m_me, iDam, DAMAGE_TYPE_NORMAL_MAGIC);
#else
						pkVictim->Damage(m_me, iDam, DAMAGE_TYPE_MAGIC);
#endif

 

constants.cpp 

Spoiler

Search for:

	{ POINT_RESIST_PENETRATE,		},

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	{ POINT_MAGIC,		},   // APPLY_MAGIC,	92
#endif

Search for:

    { "BLOCK",		APPLY_BLOCK		},

Add after:

#ifdef ADVANCED_BLOCK_DODGE
    { "MAGIC",		APPLY_MAGIC		},
#endif

 

skill.cpp 

Spoiler

Search for:

	{ "NORMAL_HIT_DAMAGE_BONUS", POINT_NORMAL_HIT_DAMAGE_BONUS	},

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	{ "MAGIC", POINT_MAGIC	},
#endif

 

 

DumpProto/

Spoiler

ItemCSVReader.cpp

Spoiler

Add on top:

#define ADVANCED_BLOCK_DODGE

Search for:

int get_Item_ApplyType_Value(string inputString)
{

Add after:

string arApplyType[] = {

this:

#ifdef ADVANCED_BLOCK_DODGE
			"APPLY_MAGIC",
#endif

 

 

 Client/src/

Spoiler

UserInterface/Locale_inc.h

Spoiler

Add:

#define ADVANCED_BLOCK_DODGE

 

UserInterface/Packet.h

Spoiler

Search for:

	POINT_RESIST_PENETRATE = 137,

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	POINT_MAGIC = 138,
#endif

 

UserInterface/PythonApplicationModule.cpp

Spoiler

Search for:

	PyModule_AddIntConstant(poModule, "CAMERA_STOP",			CPythonApplication::CAMERA_STOP);

Add after:

#ifdef ADVANCED_BLOCK_DODGE
	PyModule_AddIntConstant(poModule, "ENABLE_ADVANCED_BLOCK_DODGE", 1);
#else
	PyModule_AddIntConstant(poModule, "ENABLE_ADVANCED_BLOCK_DODGE", 0);
#endif

 

UserInterface/PythonItemModule.cpp

Spoiler

Search for:

	PyModule_AddIntConstant(poModule, "APPLY_ANTI_PENETRATE_PCT",	CItemData::APPLY_ANTI_PENETRATE_PCT );

 

Add after:

#ifdef ADVANCED_BLOCK_DODGE	
	PyModule_AddIntConstant(poModule, "APPLY_MAGIC",	CItemData::APPLY_MAGIC );		
#endif

 

 

GameLib\ItemData.h

Spoiler

Search for:

			APPLY_ANTI_PENETRATE_PCT,

 

Add after:

#ifdef ADVANCED_BLOCK_DODGE
			APPLY_MAGIC,
#endif

 

 

Client/game/

Spoiler

root/uitooltip.py

Spoiler

Add after:

	AFFECT_DICT = {
...
	}

this:

	if app.ENABLE_ADVANCED_BLOCK_DODGE:
		AFFECT_DICT[item.APPLY_MAGIC] = localeInfo.TOOLTIP_APPLY_MAGIC

 

Locale_xy/locale/xy/locale_game.txt

Spoiler

Add:

TOOLTIP_APPLY_MAGIC	Esély a mágikus támadás levédésére %d%%	SA

 

 

SQL

Spoiler

player/item_attr

Spoiler

Add to the 'apply' column:

'MAGIC'

 

 

 

  • Love 1
Link to comment
https://metin2.dev/topic/32883-advanced-point_block-point_dodge/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.