i was messing up around and saw something kinda weird code in formulas.java calcCpRegen(L2Character cha) and it was
if (cha.isPlayer())
{
// code
}
else
{
// ?? what that part does?
}
whats the logic of that? cuz i dont see
the method itself is just for L2PcInstance and cannot be used by antoher instance so it can be improved as code
[DONE] CP Regen Code
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Zoey76
- L2j Inner Circle
- Posts: 7005
- Joined: Tue Aug 11, 2009 3:36 am
Re: CP Regen Code
Interesting, I'll have to check it.
Powered by Eclipse 4.30 | Eclipse Temurin 21 | MariaDB 11.3.2 | L2J Server 2.6.3.0 - High Five
Join our Discord!
Join our Discord!
- Bencratus
- Posts: 51
- Joined: Wed Jan 07, 2015 11:38 pm
- Contact:
Re: CP Regen Code
Checked, the else part is useless:D
- brutus
- Posts: 325
- Joined: Sat Nov 10, 2007 4:18 pm
- Location: Bulgaria
Re: CP Regen Code
as i though ;d afaik cp is used only by player instances and even the parameter l2character must be l2pcinstance and the entire cpreg method could be optimized
- Zoey76
- L2j Inner Circle
- Posts: 7005
- Joined: Tue Aug 11, 2009 3:36 am
Re: CP Regen Code
Refactored in [commit]aafc5913d5a485a003480f381d5e043a11833750[/commit], thanks
Powered by Eclipse 4.30 | Eclipse Temurin 21 | MariaDB 11.3.2 | L2J Server 2.6.3.0 - High Five
Join our Discord!
Join our Discord!