Jump to content

Change Bonus of Party ? (Leadership)


Recommended Posts

  • 2 weeks later...
  • 3 weeks later...

I think POINT_PARTY_HASTE_BONUS gives speed attack. Value of that bonus you can find in

void CParty::ComputeRolePoint(LPCHARACTER ch, BYTE bRole, bool bAdd)
here
		case PARTY_ROLE_HASTE:
			{
				int iBonus = (int) (1+5*k);
				if (ch->GetPoint(POINT_PARTY_HASTE_BONUS) != iBonus)
				{
					ch->PointChange(POINT_PARTY_HASTE_BONUS, iBonus - ch->GetPoint(POINT_PARTY_HASTE_BONUS));
					ch->ComputePoints();
				}
			}
			break;

 

If you want to change POINT_PARTY_HASTE_BONUS which gives attack speed to something else there are couple ways to do this.

So for example If you want to change POINT_PARTY_HASTE_BONUS from attack speed to strong against monsters:

First one is about changing where bonus you want is calculated to do this:

 

you need to remove

PointChange(POINT_ATT_SPEED, GetPoint(POINT_PARTY_HASTE_BONUS)); from
void CHARACTER::ComputePoints()
and
then add value of POINT_PARTY_HASTE_BONUS during calculation of attack bonus
so in
int CalcAttBonus(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int iAtk)
you change
iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_MONSTER)) / 100;
to
iAtk += (iAtk * (pkAttacker->GetPoint(POINT_ATTBONUS_MONSTER) + pkAttacker->GetPoint(POINT_PARTY_HASTE_BONUS))) / 100;
 
after this you should see diference in dmg
 
but also there is another way.
little bit different
where you have POINT_ATTBONUS_MONSTER as value of that particular bonus and when ComputePoints is invoken POINT_PARTY_HASTE_BONUS is added to POINT_ATTBONUS_MONSTER bonus value.
In this case you can see real bonus value in client in your bonus value window without adding value of POINT_PARTY_HASTE_BONUS. But probably you will send more data during ComputePoints.
If you want second version tell me then I will try to add some code.
 
Also probably there are another ways to do this kind of stuff.
 
 
 
 
 
 
  • Love 1
Link to comment
Share on other sites

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.