Page 1 of 1
Magic Critical Hits
Posted: Mon Nov 02, 2009 12:40 am
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...
Re: Magic Critical Hits
Posted: Mon Nov 02, 2009 10:16 am
by Probe
did you limit m.crit on server through configs?
Re: Magic Critical Hits
Posted: Mon Nov 02, 2009 4:04 pm
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.
Re: Magic Critical Hits
Posted: Mon Nov 02, 2009 4:37 pm
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...
Re: Magic Critical Hits
Posted: Mon Nov 02, 2009 4:41 pm
by XavierElf
Formula seems correct, but calculation still broken...

Re: Magic Critical Hits
Posted: Tue Nov 03, 2009 2:46 pm
by XavierElf
The problem still relevant...
Re: Magic Critical Hits
Posted: Thu Nov 05, 2009 2:09 am
by Charus
pls test without any buff. with and without valakas neck.
Re: Magic Critical Hits
Posted: Thu Nov 05, 2009 4:33 am
by XavierElf
Tested. In all states the value of the m. crit rate one and the same.

Re: Magic Critical Hits
Posted: Thu Nov 05, 2009 4:50 am
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]
Re: Magic Critical Hits
Posted: Wed Nov 11, 2009 8:57 pm
by XavierElf
So, anybody else tested it?
