2
0

CharCreateFail.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.network.serverpackets;
  16. public class CharCreateFail extends L2GameServerPacket
  17. {
  18. private static final String _S__26_CHARCREATEFAIL = "[S] 10 CharCreateFail";
  19. public static final int REASON_CREATION_FAILED = 0x00; // "Your character creation has failed."
  20. public static final int REASON_TOO_MANY_CHARACTERS = 0x01; // "You cannot create another character. Please delete the existing character and try again." Removes all settings that were selected (race, class, etc).
  21. public static final int REASON_NAME_ALREADY_EXISTS = 0x02; // "This name already exists."
  22. public static final int REASON_16_ENG_CHARS = 0x03; // "Your title cannot exceed 16 characters in length. Please try again."
  23. public static final int REASON_INCORRECT_NAME = 0x04; // "Incorrect name. Please try again."
  24. public static final int REASON_CREATE_NOT_ALLOWED = 0x05; // "Characters cannot be created from this server."
  25. public static final int REASON_CHOOSE_ANOTHER_SVR = 0x06; // "Unable to create character. You are unable to create a new character on the selected server. A restriction is in place which restricts users from creating characters on different servers where no previous character exists. Please choose another server."
  26. private int _error;
  27. public CharCreateFail(int errorCode)
  28. {
  29. _error = errorCode;
  30. }
  31. @Override
  32. protected final void writeImpl()
  33. {
  34. writeC(0x10);
  35. writeD(_error);
  36. }
  37. /* (non-Javadoc)
  38. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  39. */
  40. @Override
  41. public String getType()
  42. {
  43. return _S__26_CHARCREATEFAIL;
  44. }
  45. }