Magic Critical Hits

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Magic Critical Hits

Post by XavierElf »

L2J Revision Number: 3679
L2JDP Revision Number: 6768
It seems, buffs that increase crit chance of the magic does not work.
E.g.,
1) I check my current m. crit rate, it equals 8%.
2) I buff Wild Magic on myself and check m. crit rate. It equals 8% again.
3) I buff Siren's Song ob myself and check m. crit rate. It equals 8% again.

Seems that character m. crit rate based only on WIT...
Sry for my bad english...
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Magic Critical Hits

Post by Probe »

did you limit m.crit on server through configs?
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Magic Critical Hits

Post by XavierElf »

Of course not. Try to calc m. crit rate youself.
This method:
[java]activeChar.getMCriticalHit(null, null)[/java]
This method always return value influenced by WIT and not influenced by buffs.
Sry for my bad english...
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Magic Critical Hits

Post by Probe »

Code: Select all

public final int getMCriticalHit(L2Character target, L2Skill skill)	{		if (_activeChar == null)			return 1; 		double mrate = calcStat(Stats.MCRITICAL_RATE, _activeChar.getTemplate().baseMCritRate, target, skill);		if(mrate > Config.MAX_MCRIT_RATE)			mrate = Config.MAX_MCRIT_RATE;		return (int) mrate;	} 
seems to me like its using mcrit value and not just WIT...
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Magic Critical Hits

Post by XavierElf »

Formula seems correct, but calculation still broken... :(
Sry for my bad english...
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Magic Critical Hits

Post by XavierElf »

The problem still relevant...
Sry for my bad english...
User avatar
Charus
L2j Veteran
L2j Veteran
Posts: 410
Joined: Thu Feb 16, 2006 1:24 pm

Re: Magic Critical Hits

Post by Charus »

pls test without any buff. with and without valakas neck.
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Magic Critical Hits

Post by XavierElf »

Tested. In all states the value of the m. crit rate one and the same. :(
Sry for my bad english...
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Magic Critical Hits

Post by XavierElf »

Maybe someone else check this?
I use this code for testing:
[java] NumberFormat df = NumberFormat.getNumberInstance(Locale.ENGLISH);df.setMaximumFractionDigits(2);df.setMinimumFractionDigits(0);StringBuilder dialog = new StringBuilder("<html><body>");dialog.append("MСrit rate: ").append(df.format(activeChar.getMCriticalHit(null, null) / 10)).append("%");dialog.append("</body></html>");NpcHtmlMessage html = new NpcHtmlMessage(5);html.setHtml(dialog.toString());activeChar.sendPacket(html); [/java]
Sry for my bad english...
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: Magic Critical Hits

Post by XavierElf »

So, anybody else tested it? :?:
Sry for my bad english...
Post Reply