Jump to content

Kiss your shamana ๐Ÿ˜


Recommended Posts

  • Active Member

Hello

Once I was bored and it occurred to me to create a feature to kiss your own shaman.

This feature was tested in Aslan's shaman system.

ย 

Now you can feel a little more... accompanied.ย ๐Ÿ˜


GIF:ย https://metin2.download/picture/xi0bvz0b58BySGFx2G19o462XJgd1l3g/.gif

spacer.png

ย 

CommonDefines.h / service.h

#define ENABLE_ASLAN_BUFF_NPC_SYSTEM
#ifdef ENABLE_ASLAN_BUFF_NPC_SYSTEM
	[...]
	#define ENABLE_ASLAN_BUFF_EMOTION //add new
#endif

ย 

char.cpp
ย 

LPCHARACTER CHARACTER::FindCharacterInView(const char * c_pszName, bool bFindPCOnly)
{
	ENTITY_MAP::iterator it = m_map_view.begin();

	for (; it != m_map_view.end(); ++it)
	{
		if (!it->first->IsType(ENTITY_CHARACTER))
			continue;

		LPCHARACTER tch = (LPCHARACTER) it->first;

		if (bFindPCOnly && tch->IsNPC()
#if defined(ENABLE_ASLAN_BUFF_NPC_SYSTEM) && defined(ENABLE_ASLAN_BUFF_EMOTION)
			&& !tch->IsBuffNPC()
#endif
		)
			continue;

		if (!strcasecmp(tch->GetName(), c_pszName)
#if defined(ENABLE_ASLAN_BUFF_NPC_SYSTEM) && defined(ENABLE_ASLAN_BUFF_EMOTION)
			&& GetBuffNPCSystem()->GetOwner() == this
#endif
		)
			return (tch);
	}

	return NULL;
}

ย 

cmd_emotion.cpp

#if defined(ENABLE_ASLAN_BUFF_NPC_SYSTEM) && defined(ENABLE_ASLAN_BUFF_EMOTION)
#include "buff_npc_system.h"
#endif


Inย ACMD(do_emotion):

1. Find:

		if (!victim->IsPC() || victim == ch)
			return;

Replace for:

		if ((!victim->IsPC()
#if defined(ENABLE_ASLAN_BUFF_NPC_SYSTEM) && defined(ENABLE_ASLAN_BUFF_EMOTION)
			&& !victim->IsBuffNPC())
#endif
		|| victim == ch
		)
			return;

2. Find: (if your serverfile are old, likely you have this:ย s_emotion_set.insert(std::make_pair(ch->GetVID(), victim->GetVID()));)

				else
				{
					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("์ด ํ–‰๋™์€ ์ƒํ˜ธ๋™์˜ ํ•˜์— ๊ฐ€๋Šฅ ํ•ฉ๋‹ˆ๋‹ค."));
					return;
				}
			}

			s_emotion_set.emplace(ch->GetVID(), victim->GetVID());

Replace for:

				else
				{
#if defined(ENABLE_ASLAN_BUFF_NPC_SYSTEM) && defined(ENABLE_ASLAN_BUFF_EMOTION)
					if (!(victim->IsBuffNPC() && ch->GetBuffNPCSystem() && victim ==  ch->GetBuffNPCSystem()->GetCharacter()))
					{
						ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("์ด ํ–‰๋™์€ ์ƒํ˜ธ๋™์˜ ํ•˜์— ๊ฐ€๋Šฅ ํ•ฉ๋‹ˆ๋‹ค."));
						return;
					}
					if (victim->IsBuffNPC() && ch->GetBuffNPCSystem() && victim ==  ch->GetBuffNPCSystem()->GetCharacter())
					{
						if (ch->GetBuffNPCSystem()->GetSex() == GET_SEX(ch))
						{
							ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("์ด์„ฑ๊ฐ„์—๋งŒ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค."));
							return;
						}
					}
#else
					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("์ด ํ–‰๋™์€ ์ƒํ˜ธ๋™์˜ ํ•˜์— ๊ฐ€๋Šฅ ํ•ฉ๋‹ˆ๋‹ค."));
					return;
#endif
				}
			}

			s_emotion_set.emplace(ch->GetVID(), victim->GetVID());

ย 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • kekw 7
  • Lmao 10
  • Love 2
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.