mirror of
https://github.com/ProjectSWGCore/pswgcommon.git
synced 2026-07-13 22:00:57 -04:00
Added RetrieveAuctionItemMessage and RetrieveAuctionItemResponseMessage
This commit is contained in:
@@ -318,8 +318,8 @@ public enum PacketType {
|
||||
CANCEL_LIVE_AUCTION_MESSAGE (CancelLiveAuctionMessage.CRC, CancelLiveAuctionMessage.class),
|
||||
CANCEL_LIVE_AUCTION_RESPONSE_MESSAGE (CancelLiveAuctionResponseMessage.CRC, CancelLiveAuctionResponseMessage.class),
|
||||
AUCTION_QUERY_HEADERS_RESPONSE_MESSAGE (AuctionQueryHeadersResponseMessage.CRC, AuctionQueryHeadersResponseMessage.class),
|
||||
RETRIEVE_AUCTION_ITEM_MESSAGE (RetrieveAuctionItemMessage.CRC, RetrieveAuctionItemMessage.class),
|
||||
RETRIEVE_AUCTION_ITEM_RESPONSE_MESSAGE (RetrieveAuctionItemResponseMessage.CRC, RetrieveAuctionItemResponseMessage.class),
|
||||
RETRIEVE_AUCTION_ITEM_MESSAGE (RetrieveAuctionItemMessage.Companion.getCrc(), RetrieveAuctionItemMessage.class),
|
||||
RETRIEVE_AUCTION_ITEM_RESPONSE_MESSAGE (RetrieveAuctionItemResponseMessage.Companion.getCrc(), RetrieveAuctionItemResponseMessage.class),
|
||||
IS_VENDOR_OWNER_MESSAGE (IsVendorOwnerMessage.CRC, IsVendorOwnerMessage.class),
|
||||
COMMODITIES_ITEM_TYPE_LIST_REPSONSE (CommoditiesItemTypeListResponse.CRC, CommoditiesItemTypeListResponse.class),
|
||||
COMMODITIES_ITEM_TYPE_LIST_REQUEST (CommoditiesItemTypeListRequest.CRC, CommoditiesItemTypeListRequest.class),
|
||||
|
||||
+28
-31
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************
|
||||
* Copyright (c) 2018 /// Project SWG /// www.projectswg.com *
|
||||
* Copyright (c) 2023 /// Project SWG /// www.projectswg.com *
|
||||
* *
|
||||
* ProjectSWG is the first NGE emulator for Star Wars Galaxies founded on *
|
||||
* July 7th, 2011 after SOE announced the official shutdown of Star Wars Galaxies. *
|
||||
@@ -24,37 +24,34 @@
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with PSWGCommon. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************************/
|
||||
package com.projectswg.common.network.packets.swg.zone.auction;
|
||||
package com.projectswg.common.network.packets.swg.zone.auction
|
||||
|
||||
import com.projectswg.common.network.NetBuffer;
|
||||
import com.projectswg.common.network.packets.SWGPacket;
|
||||
import com.projectswg.common.network.NetBuffer
|
||||
import com.projectswg.common.network.packets.SWGPacket
|
||||
|
||||
public class RetrieveAuctionItemMessage extends SWGPacket {
|
||||
|
||||
public static final int CRC = com.projectswg.common.data.CRC.getCrc("RetrieveAuctionItemMessage");
|
||||
|
||||
public RetrieveAuctionItemMessage() {
|
||||
|
||||
}
|
||||
|
||||
public RetrieveAuctionItemMessage(String command) {
|
||||
|
||||
}
|
||||
|
||||
public RetrieveAuctionItemMessage(NetBuffer data) {
|
||||
decode(data);
|
||||
}
|
||||
|
||||
public void decode(NetBuffer data) {
|
||||
if (!super.checkDecode(data, CRC))
|
||||
return;
|
||||
}
|
||||
|
||||
public NetBuffer encode() {
|
||||
NetBuffer data = NetBuffer.allocate(6);
|
||||
data.addShort(2);
|
||||
data.addInt(CRC);
|
||||
return data;
|
||||
data class RetrieveAuctionItemMessage(
|
||||
var objectId: Long = 0L,
|
||||
var vendorId: Long = 0L,
|
||||
) : SWGPacket() {
|
||||
|
||||
companion object {
|
||||
val crc = getCrc("RetrieveAuctionItemMessage")
|
||||
}
|
||||
|
||||
}
|
||||
override fun decode(data: NetBuffer) {
|
||||
if (!super.checkDecode(data, crc)) return
|
||||
objectId = data.long
|
||||
vendorId = data.long
|
||||
}
|
||||
|
||||
override fun encode(): NetBuffer {
|
||||
val data = NetBuffer.allocate(22)
|
||||
|
||||
data.addShort(3)
|
||||
data.addInt(crc)
|
||||
data.addLong(objectId)
|
||||
data.addLong(vendorId)
|
||||
|
||||
return data
|
||||
}
|
||||
}
|
||||
+28
-31
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************
|
||||
* Copyright (c) 2018 /// Project SWG /// www.projectswg.com *
|
||||
* Copyright (c) 2023 /// Project SWG /// www.projectswg.com *
|
||||
* *
|
||||
* ProjectSWG is the first NGE emulator for Star Wars Galaxies founded on *
|
||||
* July 7th, 2011 after SOE announced the official shutdown of Star Wars Galaxies. *
|
||||
@@ -24,37 +24,34 @@
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with PSWGCommon. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************************/
|
||||
package com.projectswg.common.network.packets.swg.zone.auction;
|
||||
package com.projectswg.common.network.packets.swg.zone.auction
|
||||
|
||||
import com.projectswg.common.network.NetBuffer;
|
||||
import com.projectswg.common.network.packets.SWGPacket;
|
||||
import com.projectswg.common.network.NetBuffer
|
||||
import com.projectswg.common.network.packets.SWGPacket
|
||||
|
||||
public class RetrieveAuctionItemResponseMessage extends SWGPacket {
|
||||
|
||||
public static final int CRC = com.projectswg.common.data.CRC.getCrc("RetrieveAuctionItemResponseMessage");
|
||||
|
||||
public RetrieveAuctionItemResponseMessage() {
|
||||
|
||||
}
|
||||
|
||||
public RetrieveAuctionItemResponseMessage(String command) {
|
||||
|
||||
}
|
||||
|
||||
public RetrieveAuctionItemResponseMessage(NetBuffer data) {
|
||||
decode(data);
|
||||
}
|
||||
|
||||
public void decode(NetBuffer data) {
|
||||
if (!super.checkDecode(data, CRC))
|
||||
return;
|
||||
}
|
||||
|
||||
public NetBuffer encode() {
|
||||
NetBuffer data = NetBuffer.allocate(6);
|
||||
data.addShort(2);
|
||||
data.addInt(CRC);
|
||||
return data;
|
||||
data class RetrieveAuctionItemResponseMessage(
|
||||
var objectId: Long = 0L,
|
||||
var error: Int = 0,
|
||||
) : SWGPacket() {
|
||||
|
||||
companion object {
|
||||
val crc = getCrc("RetrieveAuctionItemResponseMessage")
|
||||
}
|
||||
|
||||
}
|
||||
override fun decode(data: NetBuffer) {
|
||||
if (!super.checkDecode(data, crc)) return
|
||||
objectId = data.long
|
||||
error = data.int
|
||||
}
|
||||
|
||||
override fun encode(): NetBuffer {
|
||||
val data = NetBuffer.allocate(18)
|
||||
|
||||
data.addShort(3)
|
||||
data.addInt(crc)
|
||||
data.addLong(objectId)
|
||||
data.addInt(error)
|
||||
|
||||
return data
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user