Jump to content

[C++] Membros de Guild


Nukayool
 Share

Recommended Posts

Boas Malta,

Eu queria meter entre 25 a 20 membros no máximo por guild.

Como posso fazer?

O Código que tenho é este:

 

int CGuild::GetMaxMemberCount()
{
	// GUILD_IS_FULL_BUG_FIX
	if ( m_iMemberCountBonus < 0 || m_iMemberCountBonus > 18 )
		m_iMemberCountBonus = 0;
	// END_GUILD_IS_FULL_BUG_FIX

	if ( LC_IsHongKong() == true )
	{
		quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetMasterPID());

		if ( pPC != NULL )
		{
			if ( pPC->GetFlag("guild.is_unlimit_member") == 1 )
			{
				return INT_MAX;
			}
		}
	}

	return 32 + 2 * (m_data.level-1) + m_iMemberCountBonus;
}

Cumpz

Link to comment
Share on other sites

1 hora atrás, Nukayool disse:

Boas Malta,

Eu queria meter entre 25 a 20 membros no máximo por guild.

Como posso fazer?

O Código que tenho é este:

 


int CGuild::GetMaxMemberCount()
{
	// GUILD_IS_FULL_BUG_FIX
	if ( m_iMemberCountBonus < 0 || m_iMemberCountBonus > 18 )
		m_iMemberCountBonus = 0;
	// END_GUILD_IS_FULL_BUG_FIX

	if ( LC_IsHongKong() == true )
	{
		quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetMasterPID());

		if ( pPC != NULL )
		{
			if ( pPC->GetFlag("guild.is_unlimit_member") == 1 )
			{
				return INT_MAX;
			}
		}
	}

	return 32 + 2 * (m_data.level-1) + m_iMemberCountBonus;
}

Cumpz

int CGuild::GetMaxMemberCount()
{
#ifdef ENABLE_GUILDLIMIT_20
	if (m_data.level <=5) { 
		return 5;
	} else if (m_data.level <=10) {
		return 10;
	} else if (m_data.level <=15) {
		return 15;
	} else {
		return 20;
	}
    
    return m_data.level;
#else
	// GUILD_IS_FULL_BUG_FIX
	if ( m_iMemberCountBonus < 0 || m_iMemberCountBonus > 18 )
		m_iMemberCountBonus = 0;
	// END_GUILD_IS_FULL_BUG_FIX

	if ( LC_IsHongKong() == true )
	{
		quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetMasterPID());

		if ( pPC != NULL )
		{
			if ( pPC->GetFlag("guild.is_unlimit_member") == 1 )
			{
				return INT_MAX;
			}
		}
	}

	return 32 + 2 * (m_data.level-1) + m_iMemberCountBonus;
#endif
}

Basta colocar 

#define ENABLE_GUILDLIMIT_20

no próprio arquivo guild.cpp ou no service.h

Se sua guilda for:

- nível 5 ou inferior, terá no máximo 5 membros

- nível 10 ou inferior, terá no máximo 10 membros

- nível 15 ou inferior, terá no máximo 15 membros

- nível 16 ou superior, terá no máximo 20 membros

Att

 

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...