Jump to content
  • 0

Group Leader can give himself the group buff


Xaleas

Question

Hello,

 

I want the group leaders to be able to give themselves a group buff.

 

What i try:

 

(ENABLE_PARTY_BUFF_LEADER)

 

party.cpp

bool CParty::SetRole(DWORD dwPID, BYTE bRole, bool bSet)

Spoiler
bool CParty::SetRole(DWORD dwPID, BYTE bRole, bool bSet)
{
	TMemberMap::iterator it = m_memberMap.find(dwPID);

	if (it == m_memberMap.end())
	{
		return false;
	}

	LPCHARACTER ch = it->second.pCharacter;

	if (bSet)
	{
		if (m_anRoleCount[bRole] >= m_anMaxRole[bRole])
			return false;
#if not defined(ENABLE_PARTY_BUFF_LEADER)
		if (it->second.bRole != PARTY_ROLE_NORMAL)
			return false;
#endif
		it->second.bRole = bRole;

		if (ch && GetLeader())
			ComputeRolePoint(ch, bRole, true);

		if (bRole < PARTY_ROLE_MAX_NUM)
		{
			++m_anRoleCount[bRole];
		}
		else
		{
			sys_err("ROLE_COUNT_INC_ERROR: INDEX(%d) > MAX(%d)", bRole, PARTY_ROLE_MAX_NUM);
		}
	}
	else
	{
		if (it->second.bRole == PARTY_ROLE_LEADER)
			return false;

		if (it->second.bRole == PARTY_ROLE_NORMAL)
			return false;

		it->second.bRole = PARTY_ROLE_NORMAL;

		if (ch && GetLeader())
			ComputeRolePoint(ch, PARTY_ROLE_NORMAL, false);

		if (bRole < PARTY_ROLE_MAX_NUM)
		{
			--m_anRoleCount[bRole];
		}
		else
		{
			sys_err("ROLE_COUNT_DEC_ERROR: INDEX(%d) > MAX(%d)", bRole, PARTY_ROLE_MAX_NUM);
		}
	}

	SendPartyInfoOneToAll(dwPID);
	return true;
}

 

 

 

And remove at uiparty.py in (def OnMouseLeftButtonDown(self):) :

Spoiler
		if player.IsPartyLeader(player.GetMainCharacterIndex()):
			if player.PARTY_STATE_LEADER != self.state:

              if self.isShowStateButton:
                  self.__HideStateButton()

              else:
                  self.__ShowStateButton()

to:
  
  		if player.IsPartyLeader(player.GetMainCharacterIndex()):
			# if player.PARTY_STATE_LEADER != self.state:

			if self.isShowStateButton:
				self.__HideStateButton()

			else:
				self.__ShowStateButton()

 

 

I can now give myself a buff but lose the leader rank in the group and thats a big problem.

 

Someone have maybe a idea?

 

Thanks for any help!

 

 

 

 

Link to post

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.