Color Appearance problem

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
Darule
Posts: 16
Joined: Mon Oct 24, 2011 8:31 pm

Color Appearance problem

Post by Darule »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5123:
L2JDP Revision 8615:

Hi i have a little problem.

When im setting a player name ex: FF0000 (red) he gets blue and vice versa.
So i think that the red and blue are wrong.

I tried to modify the pcappearance.java at this point

Code: Select all

public void setNameColor(int red, int green, int blue)    {        _nameColor = (red & 0xFF) + ((green & 0xFF) << 8)        + ((blue & 0xFF) << 16);    }
and made it

Code: Select all

public void setNameColor(int red, int green, int blue)    {        _nameColor = (blue & 0xFF) + ((green & 0xFF) << 8)        + ((red & 0xFF) << 16);    }
i changed the red and blue only but im still getting the same.

Any help?
*I did a small research but i didnt found anything.
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Color Appearance problem

Post by BiggBoss »

by default, you use a color in RGB format (int red, int green, int blue). The default code switch it to BGR, and with your modification you are going back to RGB. imo you are introducing a wrong color than the one you wanna get
Image
Darule
Posts: 16
Joined: Mon Oct 24, 2011 8:31 pm

Re: Color Appearance problem

Post by Darule »

Well to tell you the truth i didnt actually got this, but let me rephrase my problem.

Im having a pvp color system so at 10pvps i give for example FF0000 which is red but by default l2j turn this into blue.

Even if i set the name color red through the admin panel i got blue, is this right or im missing something?

Also about the change i dont know if its wrong or not i just thought to give it a try but it didnt work out it was still the same. (colors should be reversed with this change?) even though im quite sure that i tested the new compiled core a few times.
Post Reply