Jump to content
Serex

[C++] Auras para todos los miembros del grupo

Recommended Posts

 

char_skill.cpp buscar:

	if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
		ComputeSkill(dwVnum, this);

Añadir antes:

	//Party buff system
	if (GetParty() && (dwVnum == 94 || dwVnum == 95 || dwVnum == 96 || dwVnum == 110 || dwVnum == 111))
	{
		if (pkVictim->GetParty()){
			if (pkVictim->GetParty() == GetParty()){
				ComputeSkillParty(dwVnum, this);
			}
		}
	}

 

Share this post


Link to post
Share on other sites

Si ya no bien.

Pero si en dado momento quiero poner más skills es posible que el vnum de las skills del shaman cambien, lo mejor es por medio de un flag

Share this post


Link to post
Share on other sites

Para instalar esto procuren tener esta funcion activa

Generalmente viene con el wolfman pero si no lo tienes activado te dará error.

struct FComputeSkillParty
{
	FComputeSkillParty(DWORD dwVnum, LPCHARACTER pkAttacker, BYTE bSkillLevel = 0)
		: m_dwVnum(dwVnum), m_pkAttacker(pkAttacker), m_bSkillLevel(bSkillLevel)
		{
		}

	void operator () (LPCHARACTER ch)
	{
		m_pkAttacker->ComputeSkill(m_dwVnum, ch, m_bSkillLevel);
	}

	DWORD m_dwVnum;
	LPCHARACTER m_pkAttacker;
	BYTE m_bSkillLevel;
};

int CHARACTER::ComputeSkillParty(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel)
{
	FComputeSkillParty f(dwVnum, pkVictim, bSkillLevel);
	if (GetParty() && GetParty()->GetNearMemberCount())
		GetParty()->ForEachNearMember(f);
	else
		f(this);

	return BATTLE_NONE;
}

PD: Gracias por el post Serex!

Share this post


Link to post
Share on other sites
On 7/10/2019 at 1:06 AM, xLordneji said:

Para instalar esto procuren tener esta funcion activa

Generalmente viene con el wolfman pero si no lo tienes activado te dará error.

struct FComputeSkillParty
{
	FComputeSkillParty(DWORD dwVnum, LPCHARACTER pkAttacker, BYTE bSkillLevel = 0)
		: m_dwVnum(dwVnum), m_pkAttacker(pkAttacker), m_bSkillLevel(bSkillLevel)
		{
		}

	void operator () (LPCHARACTER ch)
	{
		m_pkAttacker->ComputeSkill(m_dwVnum, ch, m_bSkillLevel);
	}

	DWORD m_dwVnum;
	LPCHARACTER m_pkAttacker;
	BYTE m_bSkillLevel;
};

int CHARACTER::ComputeSkillParty(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel)
{
	FComputeSkillParty f(dwVnum, pkVictim, bSkillLevel);
	if (GetParty() && GetParty()->GetNearMemberCount())
		GetParty()->ForEachNearMember(f);
	else
		f(this);

	return BATTLE_NONE;
}

PD: Gracias por el post Serex!

 

y de donde viene esto?

Share this post


Link to post
Share on other sites
hace 19 minutos, BeauDeCiuda dijo:

 

y de donde viene esto?

Creo que te refieres donde va ese texto, va en char_skill.cpp. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...