Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
- package net.sf.l2j.gameserver.model.actor.appearance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.Config;
- import custom.events.DMEvent;
- import custom.events.TvTEvent;
- import net.sf.l2j.gameserver.model.base.Sex;
- public final class PcAppearance
- {
- private L2PcInstance _owner;
- private byte _face;
- private byte _hairColor;
- private byte _hairStyle;
- private Sex _sex;
- private boolean _invisible = false;
- private int _nameColor = 0xFFFFFF;
- private int _titleColor = 0xFFFF77;
- public PcAppearance(byte face, byte hColor, byte hStyle, Sex sex)
- {
- _face = face;
- _hairColor = hColor;
- _hairStyle = hStyle;
- _sex = sex;
- }
- public byte getFace()
- {
- return _face;
- }
- public void setFace(int value)
- {
- _face = (byte) value;
- }
- public byte getHairColor()
- {
- return _hairColor;
- }
- public void setHairColor(int value)
- {
- _hairColor = (byte) value;
- }
- public byte getHairStyle()
- {
- return _hairStyle;
- }
- public void setHairStyle(int value)
- {
- _hairStyle = (byte) value;
- }
- public Sex getSex()
- {
- return _sex;
- }
- public void setSex(Sex sex)
- {
- _sex = sex;
- }
- public boolean getInvisible()
- {
- return _invisible;
- }
- public void setInvisible()
- {
- _invisible = true;
- }
- public void setVisible()
- {
- _invisible = false;
- }
- public int getNameColor()
- {
- try
- {
- if (TvTEvent.isStarted())
- {
- if(TvTEvent.getParticipantTeamId(_owner.getObjectId()) == 1)
- {
- return Integer.decode("0x0000FF").intValue();
- }
- else
- {
- return Integer.decode("0xFF0000").intValue();
- }
- }
- else if (DMEvent.isStarted())
- {
- return Integer.decode("0x"+Config.DM_COLOR_NAME).intValue();
- }
- }
- catch (Exception e)
- {
- return _nameColor;
- }
- return _nameColor;
- }
- public void setNameColor(int nameColor)
- {
- _nameColor = nameColor;
- }
- public void setNameColor(int red, int green, int blue)
- {
- _nameColor = (red & 0xFF) + ((green & 0xFF) << 8) + ((blue & 0xFF) << 16);
- }
- public int getTitleColor()
- {
- return _titleColor;
- }
- public void setTitleColor(int titleColor)
- {
- _titleColor = titleColor;
- }
- public void setTitleColor(int red, int green, int blue)
- {
- _titleColor = (red & 0xFF) + ((green & 0xFF) << 8) + ((blue & 0xFF) << 16);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment