public void processObjectStatic(ref byte[] packet) { byte[] objectID = new byte[4]; byte[] sectorID = new byte[2]; ArrayUtils.copyTo(packet, 0, objectID, 0, 4); ArrayUtils.copyTo(objectID, 2, sectorID, 0, 2); UInt32 numericObjectId = NumericalUtils.ByteArrayToUint32(objectID, 1); // Ok sector Bytes are something like 30 39 (reversed but the result must be 39 03) UInt16 numericSectorId = NumericalUtils.ByteArrayToUint16(sectorID, 1); // strip out object id string id = StringUtils.bytesToString_NS(objectID); // get the type byte[] objectType = new byte[1]; ArrayUtils.copy(packet, 4, objectType, 0, 1); int objectTypeID = packet[4]; DataLoader objectLoader = DataLoader.getInstance(); StaticWorldObject objectValues = objectLoader.getObjectValues(NumericalUtils.ByteArrayToUint32(objectID, 1)); // create a new System message but fill it in the switch block ServerPackets pak = new ServerPackets(); switch (objectTypeID) { // Case 03 is not only a staticWorldObject ... case (int)objectTypesStatic.DOOR: Output.writeToLogForConsole("[OI HELPER] INTERACT WITH DOOR | Object ID :" + id + " Sector ID : " + numericSectorId); // just a test if (objectValues != null && objectValues.type != null) { GameObjectItem item = objectLoader.getGameObjectItemById(NumericalUtils.ByteArrayToUint16(objectValues.type, 1)); //Store.currentClient.messageQueue.addRpcMessage(PacketsUtils.createSystemMessage("[OI HELPER] Door StrType: !" + item.getName() + " with Type ID " + StringUtils.bytesToString_NS(objectValues.type), Store.currentClient)); this.processObjectInteraction(objectValues, item); } break; case (int)objectTypesStatic.HARDLINE_SYNC: pak.sendSystemChatMessage(Store.currentClient, "Hardline Interaction(not done yet)!", "MODAL"); break; case (int)objectTypesStatic.HARDLINE_UPLOAD: Output.writeToLogForConsole("[OBJECT HELPER] Upload Hardline will be used for combat tests"); Store.currentClient.playerData.lastClickedObjectId = numericObjectId; new TestUnitHandler().processTestCombat(ref packet); break; case (int)objectTypesStatic.HARDLINE_LAEXIT: // Exit LA pak.sendSystemChatMessage(Store.currentClient, "Exit to LA Dialog should popup", "MODAL"); new TeleportHandler().processHardlineExitRequest(); break; case (int)objectTypesStatic.HUMAN_NPC: pak.sendSystemChatMessage(Store.currentClient, "Open Vendor Dialog for Object ID" + StringUtils.bytesToString_NS(objectID), "MODAL"); this.processVendorOpen(ref objectID); break; case (int)objectTypesStatic.COLLECTOR: pak.sendSystemChatMessage(Store.currentClient, "Collector Interaction (not done yet)!", "MODAL"); break; case (int)objectTypesStatic.ENVIROMENT: GameObjectItem enviromentItem = objectLoader.getGameObjectItemById(NumericalUtils.ByteArrayToUint16(objectValues.type, 1)); UInt16 enviromentTypeID = NumericalUtils.ByteArrayToUint16(objectValues.type, 1); switch (enviromentTypeID) { case 6952: // ToDo: implement Elevator Panel pak.sendElevatorPanel(Store.currentClient, objectValues); break; default: pak.sendSystemChatMessage(Store.currentClient, "Enviroment Type ID " + objectValues.type + " name " + enviromentItem.getName(), "MODAL"); break; } pak.sendSystemChatMessage(Store.currentClient, "Enviroment Type ID " + objectValues.type + " name " + enviromentItem.getName(), "MODAL"); break; default: pak.sendSystemChatMessage(Store.currentClient, "[OI HELPER] Unknown Object Type : " + objectTypeID.ToString() + "| Object ID :" + id, "MODAL"); break; } }