예제 #1
0
 public CharacterInfo(Character character)
 {
     slot       = (byte)character.Slot;
     size       = 16;
     charName   = ByteUtils.ToByteArray(character.CharName, 16);
     heightCode = (byte)character.HeightCode;
     faceCode   = (byte)character.FaceCode;
     hairCode   = (byte)character.HairCode;
     classCode  = (byte)character.ClassCode;
     level      = ByteUtils.ToByteArray(character.Level, 2);
     region     = ByteUtils.ToByteArray(character.CharacterPosition.Region, 4);
     //position = new SunVector(character.CharacterPosition.LocationX,character.CharacterPosition.LocationY,character.CharacterPosition.LocationZ);
     posX        = ByteUtils.ToByteArray((short)character.CharacterPosition.LocationX, 2);
     posY        = ByteUtils.ToByteArray((short)character.CharacterPosition.LocationY, 2);
     posZ        = ByteUtils.ToByteArray((short)character.CharacterPosition.LocationZ, 2);
     equipNumber = 0;
     equipInfo   = new EquipInfo(character.Inventory.EquipItem).ToBytes();
     unk1        = 1;
     unk2        = ByteUtils.ToByteArray("", 32);
     unk3        = ByteUtils.ToByteArray("", 3);
     unk4        = ByteUtils.ToByteArray("", 4);
 }
예제 #2
0
 public CharacterInfo(int slot, int size, string charName, byte heightCode, byte faceCode, byte hairCode,
                      byte classCode, byte[] level, byte[] region, byte[] posX, byte[] posY,
                      byte[] posZ, byte iEquipNumber, byte[] equipInfo)
 {
     this.slot       = (byte)slot;
     this.size       = 0x10;
     this.charName   = ByteUtils.ToByteArray(charName, 16);
     this.heightCode = heightCode;
     this.faceCode   = faceCode;
     this.hairCode   = hairCode;
     this.classCode  = classCode;
     this.level      = level;
     this.region     = region;
     this.posX       = posX;
     this.posY       = posY;
     this.posZ       = posZ;
     //this.position = new SunVector(BitConverter.ToInt16(posX,0), BitConverter.ToInt16(posY, 0), BitConverter.ToInt16(posZ, 0));
     this.equipNumber = 0;
     this.equipInfo   = equipInfo;
     unk1             = 0;
     unk2             = ByteUtils.ToByteArray("", 32);
     unk3             = ByteUtils.ToByteArray("", 3);
     unk4             = ByteUtils.ToByteArray("", 4);
 }
예제 #3
0
 public ItemSlotInfo(byte[] value)
 {
     position       = value[0];
     itemInfo       = new ItemInfo(ByteUtils.SlicedBytes(value, 1, 8));
     itemOptionInfo = new ItemOptionInfo(ByteUtils.SlicedBytes(value, 8, value.Length));
 }
예제 #4
0
 public S2CAnsWorldPrepare(string worldServerIp, int worldServerPort) : base(21)
 {
     ip   = ByteUtils.ToByteArray(worldServerIp, 32);
     port = ByteUtils.ToByteArray(worldServerPort, 5);
 }
예제 #5
0
 public S2CAnsServerSelect2(int userID, string agentIPAddress, int agentPort) : base(26)
 {
     //this.userID = ByteUtils.ToByteArray(userID, 4);
     this.agentIPAddress = ByteUtils.ToByteArray(agentIPAddress, 32);
     this.agentPort      = ByteUtils.ToByteArray(agentPort, 5);
 }