SendPacketOpcode.java
上传用户:gwt600
上传日期:2021-06-03
资源大小:704k
文件大小:5k
源码类别:

游戏

开发平台:

Java

  1. /*
  2. This file is part of the OdinMS Maple Story Server
  3. Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
  4. Matthias Butz <matze@odinms.de>
  5. Jan Christian Meyer <vimes@odinms.de>
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Affero General Public License version 3
  8. as published by the Free Software Foundation. You may not use, modify
  9. or distribute this program under any other version of the
  10. GNU Affero General Public License.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU Affero General Public License for more details.
  15. You should have received a copy of the GNU Affero General Public License
  16. along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17.  */
  18. package net.sf.odinms.net;
  19. import java.io.FileInputStream;
  20. import java.io.FileNotFoundException;
  21. import java.io.IOException;
  22. import java.util.Properties;
  23. public enum SendPacketOpcode implements WritableIntValueHolder {
  24.     // GENERAL
  25.     PING, // 0x11
  26.     // LOGIN
  27.     LOGIN_STATUS, // 1
  28.     SEND_LINK,
  29.     PIN_OPERATION, // 6
  30.     SERVERLIST, // 0xa
  31.     SERVERSTATUS, // 3
  32.     SERVER_IP, // 0xc
  33.     CHARLIST, // 0xb
  34.     CHAR_NAME_RESPONSE, // 0xd
  35.     RELOG_RESPONSE, // 0x16
  36.     ADD_NEW_CHAR_ENTRY, // 0xe
  37.     DELETE_CHAR_RESPONSE, // 0xf
  38.     CHANNEL_SELECTED,
  39.     ALL_CHARLIST,
  40.     // CHANNEL
  41.     CHANGE_CHANNEL, // 0x10
  42.     UPDATE_STATS, // 0x1b
  43.     FAME_RESPONSE,
  44.     UPDATE_SKILLS, // 0x1e
  45.     WARP_TO_MAP, // 0x49
  46.     SERVERMESSAGE, // 0x37
  47.     GENDER,
  48.     GET_MTS_TOKENS,
  49.     START_MTS,
  50.     AVATAR_MEGA, // 0x42
  51.     SPAWN_NPC, // 0xb1
  52.     SPAWN_NPC_REQUEST_CONTROLLER, // 0xb3
  53.     SPAWN_MONSTER, // 0x9E
  54.     SPAWN_MONSTER_CONTROL, // 0xA0
  55.     MOVE_MONSTER_RESPONSE, // 0xA3
  56.     CHATTEXT, // 0x67
  57.     SHOW_STATUS_INFO, // 0x21
  58.     SHOW_MESO_GAIN, // 0x22
  59.     SHOW_QUEST_COMPLETION, // 0x29
  60.     WHISPER,
  61.     SPAWN_PLAYER, // 0x64
  62.     ANNOUNCE_PLAYER_SHOP, // 0x67
  63.     SHOW_SCROLL_EFFECT, // 0x6B
  64.     SHOW_ITEM_GAIN_INCHAT, // 0x92
  65.     KILL_MONSTER, // 0x9f
  66.     DROP_ITEM_FROM_MAPOBJECT, // 0xC1
  67.     FACIAL_EXPRESSION, // 0x85
  68.     MOVE_PLAYER, // 0x7E
  69.     MOVE_MONSTER, // 0xA2
  70.     CLOSE_RANGE_ATTACK, // 0x7F
  71.     RANGED_ATTACK, // 0x80
  72.     MAGIC_ATTACK, // 0x81
  73.     OPEN_NPC_SHOP, // 0xe5
  74.     CONFIRM_SHOP_TRANSACTION, // 0xe6
  75.     OPEN_STORAGE, // 0xe8
  76.     MODIFY_INVENTORY_ITEM, // 0x19
  77.     REMOVE_PLAYER_FROM_MAP, // 0x65
  78.     REMOVE_ITEM_FROM_MAP, // 0xC2
  79.     UPDATE_CHAR_LOOK, // 0x88
  80.     SHOW_FOREIGN_EFFECT, //0x89
  81.     GIVE_FOREIGN_BUFF, //0x8A
  82.     CANCEL_FOREIGN_BUFF, //0x8B
  83.     DAMAGE_PLAYER, // 0x84
  84.     CHAR_INFO, // 0x31
  85.     UPDATE_QUEST_INFO, // 0x97
  86.     GIVE_BUFF, //0x1c
  87.     CANCEL_BUFF, //0x1d
  88.     PLAYER_INTERACTION, // 0xEF
  89.     UPDATE_CHAR_BOX, // 0x69
  90.     NPC_TALK,
  91.     KEYMAP,
  92.     SHOW_MONSTER_HP,
  93.     PARTY_OPERATION,
  94.     UPDATE_PARTYMEMBER_HP,
  95.     MULTICHAT,
  96.     APPLY_MONSTER_STATUS,
  97.     CANCEL_MONSTER_STATUS,
  98.     CLOCK,
  99.     SPAWN_PORTAL,
  100.     SPAWN_DOOR,
  101.     REMOVE_DOOR,
  102.     SPAWN_SPECIAL_MAPOBJECT,
  103.     REMOVE_SPECIAL_MAPOBJECT,
  104.     SUMMON_ATTACK,
  105.     MOVE_SUMMON,
  106.     SPAWN_MIST,
  107.     REMOVE_MIST,
  108.     DAMAGE_SUMMON,
  109.     DAMAGE_MONSTER,
  110.     BUDDYLIST,
  111.     SHOW_ITEM_EFFECT,
  112.     SHOW_CHAIR,
  113.     CANCEL_CHAIR,
  114.     SKILL_EFFECT,
  115.     CANCEL_SKILL_EFFECT,
  116.     BOSS_ENV,
  117.     REACTOR_SPAWN,
  118.     REACTOR_HIT,
  119.     REACTOR_DESTROY,
  120.     MAP_EFFECT,
  121.     GUILD_OPERATION,
  122.     BBS_OPERATION,
  123.     SHOW_MAGNET,
  124.     MESSENGER,
  125.     NPC_ACTION,
  126.     SPAWN_PET,
  127.     MOVE_PET,
  128.     PET_CHAT,
  129.     PET_COMMAND,
  130.     PET_NAMECHANGE,
  131.     COOLDOWN,
  132.     PLAYER_HINT,
  133.     USE_SKILL_BOOK,
  134.     SHOW_EQUIP_EFFECT,
  135.     SKILL_MACRO,
  136.     CS_OPEN,
  137.     CS_UPDATE,
  138.     CS_OPERATION,
  139.     PLAYER_NPC,
  140.     SHOW_NOTES,
  141.     SUMMON_SKILL,
  142.     ARIANT_PQ_START,
  143.     CATCH_MONSTER,
  144.     ARIANT_SCOREBOARD,
  145.     ZAKUM_SHRINE,
  146.     BOAT_EFFECT,
  147.     CHALKBOARD,
  148.     UPDATE_MOUNT,
  149.     SPAWN_HIRED_MERCHANT,
  150.     DESTROY_HIRED_MERCHANT,
  151.     GMEVENT_INSTRUCTIONS,
  152.     DUEY,
  153.     MONSTER_CARNIVAL_START,
  154.     MONSTER_CARNIVAL_OBTAINED_CP,
  155.     MONSTER_CARNIVAL_PARTY_CP,
  156.     MONSTER_CARNIVAL_SUMMON,
  157.     MONSTER_CARNIVAL_DIED,
  158.     MTS_OPERATION,
  159.     MTS_OPERATION2,
  160.     REPORTREPLY,
  161.     MTS_OPEN,
  162.     FINISH_SORT,
  163.     FINISH_SORT2,
  164.     UPDATE_VIPMAPLIST,
  165.     SEND_TV,
  166.     ENABLE_TV,
  167.     REMOVE_TV,
  168.     SPOUSE_CHAT,
  169. ALLIANCE_OPERATION,
  170.     YELLOW_TIP,
  171. UPDATE_HIRED_MERCHANT,
  172.     GM_POLICE;
  173.     private int code = -2;
  174.     public void setValue(int code) {
  175.         this.code = code;
  176.     }
  177.     @Override
  178.     public int getValue() {
  179.         return code;
  180.     }
  181.     public static Properties getDefaultProperties() throws FileNotFoundException, IOException {
  182.         Properties props = new Properties();
  183.         FileInputStream fileInputStream = new FileInputStream(System.getProperty("net.sf.odinms.sendops"));
  184.         props.load(fileInputStream);
  185.         fileInputStream.close();
  186.         return props;
  187.     }
  188.     static {
  189.         try {
  190.             ExternalCodeTableGetter.populateValues(getDefaultProperties(), values());
  191.         } catch (IOException e) {
  192.             throw new RuntimeException("Failed to load sendops", e);
  193.         }
  194.     }
  195. }