summaryrefslogtreecommitdiff
path: root/NET/worlds/network/propReqCmd.java
blob: c59a33380f33d02bf2bf48ef29a274a193159df8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*    */ 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;
/*    */   
/*    */   public propReqCmd(ObjID id, int varid)
/*    */   {
/* 38 */     super(id, 10);
/* 39 */     this._varids = new Vector();
/* 40 */     addProp(varid);
/*    */   }
/*    */   
/*    */   public propReqCmd(ObjID id) {
/* 44 */     super(id, 10);
/* 45 */     this._varids = new Vector();
/*    */   }
/*    */   
/*    */   public void addProp(int varid) {
/* 49 */     this._varids.addElement(new Integer(varid));
/*    */   }
/*    */   
/*    */   int packetSize()
/*    */   {
/* 54 */     return this._varids.size() + super.packetSize();
/*    */   }
/*    */   
/*    */   void send(ServerOutputStream o) throws IOException
/*    */   {
/* 59 */     super.send(o);
/* 60 */     int maxidx = this._varids.size();
/*    */     
/* 62 */     for (int i = 0; i < maxidx; i++) {
/* 63 */       Integer tmpInt = (Integer)this._varids.elementAt(i);
/* 64 */       o.writeByte(tmpInt.intValue());
/*    */     }
/*    */   }
/*    */   
/*    */ 
/*    */   public String toString(WorldServer serv)
/*    */   {
/* 71 */     String out = "PROPREQ  " + this._objID.toString(serv) + " ";
/* 72 */     int maxidx = this._varids.size();
/* 73 */     for (int i = 0; i < maxidx; i++) {
/* 74 */       out = out + " #" + (Integer)this._varids.elementAt(i);
/*    */     }
/* 76 */     return out;
/*    */   }
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\propReqCmd.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */