Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void readValues(Stream buffer) {
- do {
- int configId = buffer.getUnsignedByte();
- if (configId == 0) {
- return;
- }
- if (configId == 1) {
- int total = buffer.getUnsignedByte();
- models = new int[total];
- for (int i = 0; i < total; i++) {
- models[i] = buffer.getUnsignedShort();
- }
- } else if (configId == 2) {
- name = buffer.getString();
- } else if (configId == 3) {
- description = buffer.getStringBytes();
- } else if (configId == 12) {
- size = buffer.getByte();
- } else if (configId == 13) {
- idleAnim = buffer.getUnsignedShort();
- } else if (configId == 14) {
- walkAnim = buffer.getUnsignedShort();
- } else if (configId == 17) {
- walkAnim = buffer.getUnsignedShort();
- retreatAnim = buffer.getUnsignedShort();
- turnRightAnim = buffer.getUnsignedShort();
- turnLeftAnim = buffer.getUnsignedShort();
- } else if (configId >= 30 && configId < 40) {
- if (actions == null) {
- actions = new String[5];
- }
- actions[configId - 30] = buffer.getString();
- if (actions[configId - 30].equalsIgnoreCase("hidden")) {
- actions[configId - 30] = null;
- }
- } else if (configId == 40) {
- int total = buffer.getUnsignedByte();
- srcColors = new int[total];
- destColors = new int[total];
- for (int i = 0; i < total; i++) {
- srcColors[i] = buffer.getUnsignedShort();
- destColors[i] = buffer.getUnsignedShort();
- }
- } else if (configId == 60) {
- int total = buffer.getUnsignedByte();
- dialogueModels = new int[total];
- for (int i = 0; i < total; i++) {
- dialogueModels[i] = buffer.getUnsignedShort();
- }
- } else if (configId == 90) {
- buffer.getUnsignedShort();
- } else if (configId == 91) {
- buffer.getUnsignedShort();
- } else if (configId == 92) {
- buffer.getUnsignedShort();
- } else if (configId == 93) {
- visibleOnMinimap = false;
- } else if (configId == 95) {
- combatLevel = buffer.getUnsignedShort();
- } else if (configId == 97) {
- scaleXY = buffer.getUnsignedShort();
- } else if (configId == 98) {
- scaleZ = buffer.getUnsignedShort();
- } else if (configId == 99) {
- members = true;
- } else if (configId == 100) {
- lightness = buffer.getByte();
- } else if (configId == 101) {
- shading = buffer.getByte() * 5;
- } else if (configId == 102) {
- headIcon = buffer.getUnsignedShort();
- } else if (configId == 103) {
- turnAmount = buffer.getUnsignedShort();
- } else if (configId == 106) {
- varbitId = buffer.getUnsignedShort();
- if (varbitId == 65535) {
- varbitId = -1;
- }
- actionId = buffer.getUnsignedShort();
- if (actionId == 65535) {
- actionId = -1;
- }
- int id = buffer.getUnsignedByte();
- childIds = new int[id + 1];
- for (int i = 0; i <= id; i++) {
- childIds[i] = buffer.getUnsignedShort();
- if (childIds[i] == 65535) {
- childIds[i] = -1;
- }
- }
- } else if (configId == 107) {
- clickable = false;
- }
- } while (true);
- }
Add Comment
Please, Sign In to add comment