Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #008408

  • 4 - High

  • Invalid

Issue Confirmations

  • Yes (0)No (0)
Photo

bMatkRate and bAtkRate is not working.

Posted by Mhalicot on 19 October 2014 - 04:11 PM

Hello,

Can anyone confirm this? I tried to use 50% and it is still not working.

I tried to use this code but nothing happend.

	Id: 2709
	AegisName: "5_Anniversary_Coin"
	Name: "5th Anniversary Coin"
	Type: 5
	Buy: 2
	Upper: 63
	Loc: 136
	Refine: false
	Script: <"
		bonus bAtkRate,50;
		bonus bMatkRate,50;
	">
},

You mean no change in damage?

Yes, check it to confirm..

I am using pre-re and i tested the item and it works it also increase my damage ? My hercules is not updated for a week.

Those bonuses are most likely obsolete for Hercules renewal.

bAtkRate never really existed officially. Instead, it is "Increase damage against all classes".
We have the same: "bAddClass,Class_All"
Seems database devs have forgotten that should do it like this and started using bAtkRate for some reason on new items...

bMatkRate existed but seems to be removed in renewal now? Aegis still uses bMatkRate, but seems here it was replaced by the "bMagicAddClass,Class_All" bonus? Why?

Anyway, use the same script as The Sign:
2644,The_Sign_,The Sign,4,2,,0,,0,,0,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus2 bAddClass,Class_All,5; bonus2 bMagicAddClass,Class_All,5; },{},{}

That should fix it.

Should update the whole item_db accordingly.

Those bonuses are most likely obsolete for Hercules renewal.

bAtkRate never really existed officially. Instead, it is "Increase damage against all classes".
We have the same: "bAddClass,Class_All"
Seems database devs have forgotten that should do it like this and started using bAtkRate for some reason on new items...

bMatkRate existed but seems to be removed in renewal now? Aegis still uses bMatkRate, but seems here it was replaced by the "bMagicAddClass,Class_All" bonus? Why?

Anyway, use the same script as The Sign:
2644,The_Sign_,The Sign,4,2,,0,,0,,0,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus2 bAddClass,Class_All,5; bonus2 bMagicAddClass,Class_All,5; },{},{}

That should fix it.

Should update the whole item_db accordingly.

I think hercules don't have Class* item_bonuses

Those bonuses are most likely obsolete for Hercules renewal.

bAtkRate never really existed officially. Instead, it is "Increase damage against all classes".
We have the same: "bAddClass,Class_All"
Seems database devs have forgotten that should do it like this and started using bAtkRate for some reason on new items...

bMatkRate existed but seems to be removed in renewal now? Aegis still uses bMatkRate, but seems here it was replaced by the "bMagicAddClass,Class_All" bonus? Why?

Anyway, use the same script as The Sign:
2644,The_Sign_,The Sign,4,2,,0,,0,,0,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus2 bAddClass,Class_All,5; bonus2 bMagicAddClass,Class_All,5; },{},{}

That should fix it.

Should update the whole item_db accordingly.


Hello Playtester,

I think you are referring to other Emulator script..  bMagicAddClass & bAddClass is not available in Hercules..

Thanks btw..

Ah I see. So Herc is using a different script then. Hmm, guess Michi needs to either fix this one or merge the other bonuses from rAthena.

I guess there might not be a bonus to fix bMatkRate then.

But for bAtkRate you can use original eAthena script I guess:

2644,The_Sign_,The Sign,5,2,,0,,0,,0,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; },{},{}

Increase is for Boss and NonBoss. :-)



Edit:
Code on Herc:

pc.c - pc_bonus sets it properly:
case SP_MATK_RATE:
			if(sd->state.lr_flag != 2)
				sd->matk_rate += val;
			break;
status.c - status_calc_pc_ applies it:
if(sd->matk_rate != 100){
		bstatus->matk_max = bstatus->matk_max * sd->matk_rate/100;
		bstatus->matk_min = bstatus->matk_min * sd->matk_rate/100;
	}
And status_get_matk_sub:
if (sd && sd->matk_rate != 100) {
		*matk_max = (*matk_max) * sd->matk_rate/100;
		*matk_min = (*matk_min) * sd->matk_rate/100;
	}
Hmmm, it could be that something with the flags is wrong in status_get_matk, though!
/**
 * Get bl's matk value depending on flag
 * @param flag [malufett]
 *			1 - Get MATK w/o SC bonuses
 *			2 - Get modified MATK
 *			3 - Get MATK w/o eATK & SC bonuses
 * @retval 1 failure
 * @retval MATK success
 *
 * Shouldn't change _any_ value! [Panikon]
 **/
int status_get_matk( struct block_list *bl, int flag ) {
	struct status_data *st;
	unsigned short matk_max, matk_min;

	if( bl == NULL )
		return 1;

	if( flag < 1 || flag > 3 ) {
		ShowError("status_get_matk: Unknown flag %d!\n", flag);
		return 1;
	}

	if( (st = status->get_status_data(bl)) == NULL )
		return 0;

	// Just get matk
	if( flag == 2 )
		return status_get_rand_matk(st->matk_max, st->matk_min);

	status_get_matk_sub( bl, flag, &matk_max, &matk_min );

	// Get unmodified from sc matk
	return status_get_rand_matk(matk_max, matk_min);
}
The description at the top says flag = 2 means "get modified MATK" but if you look at the source if flag is = 2 it will return unmodified MATK? Also the last return comment doesn't make sense, at the end it does return modified matk as status_get_matk_sub modified it. >_>

Edited by Playtester, 21 October 2014 - 06:33 AM.


Up~ (Marking it Severity High since it affects all items that has bMatkRate and bAtkRate)

changed severity to: 3 - Medium
changed severity to: 4 - High

Posted Image

Posted Image

Posted Image

Posted Image

Posted Image

This "bug" as already set to invalid last time. Duno how you test but it's works fine.

changed status to: Invalid

It doesn't show properly in the status screen, though!

it should not be show in the status screen