Jump to content

[SEARCH] C++ Coder for Group System like Shiro3


Recommended Posts

  • Honorable Member

You have to add a button which set the new distibution mode(2) for party and extend the switch with a new case.

party.h

enum EPartyExpDistributionModes
{
	PARTY_EXP_DISTRIBUTION_NON_PARITY,
	PARTY_EXP_DISTRIBUTION_PARITY,
	PARTY_EXP_DISTRIBUTION_EQUAL,
	PARTY_EXP_DISTRIBUTION_MAX_NUM
};

char_battle.cpp

	struct FPartyDistributor
	{
		int		total;
		LPCHARACTER	c;
		int		x, y;
		DWORD		_iExp;
		int		m_iMode;
		int		m_iMemberCount;

		FPartyDistributor(LPCHARACTER center, int member_count, int total, DWORD iExp, int iMode)
			: total(total), c(center), x(center->GetX()), y(center->GetY()), _iExp(iExp), m_iMode(iMode), m_iMemberCount(member_count)
			{
				if (m_iMemberCount == 0)
					m_iMemberCount = 1;
			};

		void operator () (LPCHARACTER ch)
		{
			if (DISTANCE_APPROX(ch->GetX() - x, ch->GetY() - y) <= PARTY_DEFAULT_RANGE)
			{
				DWORD iExp2 = 0;

				switch (m_iMode)
				{
					case PARTY_EXP_DISTRIBUTION_NON_PARITY:
						iExp2 = (DWORD) (_iExp * (float) __GetPartyExpNP(ch->GetLevel()) / total);
						break;

					case PARTY_EXP_DISTRIBUTION_PARITY:
						iExp2 = _iExp / m_iMemberCount;
						break;

					case PARTY_EXP_DISTRIBUTION_EQUAL:
						iExp2 = _iExp;
						break;

					default:
						sys_err("Unknown party exp distribution mode %d", m_iMode);
						return;
				}

				GiveExp(c, ch, iExp2);
			}
		}
	};

 

 

  • Love 5
Link to comment
Share on other sites

  • Bronze
9 minutes ago, Raylee said:

http://workplus.altervista.org/others-party-equal-mode/

Here you can buy this system! 

Best regards
Raylee

Why ? it's easy to make and penger already gaved the big hint

Link to comment
Share on other sites

"Part python" fucking easy here (example): you need to duplicate other func haha

		if app.PARTY_EXP_DISTRIBUTION_EQUAL:
			partyEqual = ui.RadioButton()
			partyEqual.SetParent(self)
			partyEqual.SetWindowHorizontalAlignCenter()
			partyEqual.SetEvent(ui.__mem_func__(self.OnClickEXPDistributeEqual))
			partyEqual.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
			partyEqual.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
			partyEqual.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
			partyEqual.SetText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE_EQUAL)
			partyEqual.SetToolTipText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE_EQUAL_TOOLTIP, 70)
			partyEqual.Show()
			self.modeButtonList[player.PARTY_EXP_DISTRIBUTION_EQUAL] = partyEqual
	if app.PARTY_EXP_DISTRIBUTION_EQUAL:
		def OnClickEXPDistributeEqual(self):
			self.__SetModeButton(self.distributionMode)
			if self.isLeader:
				net.SendPartyParameterPacket(player.PARTY_EXP_DISTRIBUTION_EQUAL)
		if app.PARTY_EXP_DISTRIBUTION_EQUAL:
			partyMenu.SetSize(106, 70 + 70 + 30)
		else:
			partyMenu.SetSize(106, 70 + 70)

 

  • Love 5
Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.