diff options
| author | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
| commit | c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch) | |
| tree | df9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/network/propReqCmd.java | |
| download | worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip | |
Initial commit
Diffstat (limited to 'NET/worlds/network/propReqCmd.java')
| -rw-r--r-- | NET/worlds/network/propReqCmd.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/NET/worlds/network/propReqCmd.java b/NET/worlds/network/propReqCmd.java new file mode 100644 index 0000000..0c6c043 --- /dev/null +++ b/NET/worlds/network/propReqCmd.java @@ -0,0 +1,50 @@ +package NET.worlds.network; + +import java.io.IOException; +import java.util.Vector; + +public class propReqCmd extends netPacket { + public static final byte PROPREQCMD = 10; + protected Vector<Integer> _varids = new Vector<Integer>(); + + public propReqCmd(ObjID id, int varid) { + super(id, 10); + this.addProp(varid); + } + + public propReqCmd(ObjID id) { + super(id, 10); + } + + public void addProp(int varid) { + this._varids.addElement(new Integer(varid)); + } + + @Override + int packetSize() { + return this._varids.size() + super.packetSize(); + } + + @Override + void send(ServerOutputStream o) throws IOException { + super.send(o); + int maxidx = this._varids.size(); + + for (int i = 0; i < maxidx; i++) { + Integer tmpInt = this._varids.elementAt(i); + o.writeByte(tmpInt); + } + } + + @Override + public String toString(WorldServer serv) { + String out = "PROPREQ " + this._objID.toString(serv) + " "; + int maxidx = this._varids.size(); + + for (int i = 0; i < maxidx; i++) { + out = out + " #" + this._varids.elementAt(i); + } + + return out; + } +} |