public void BuildItem(RiftClient From, Character Char) { GUID = 45875261658941; // Cache Ref this.AddField(4, EPacketFieldType.Raw4Bytes, (int)456805300); this.AddField(6, EPacketFieldType.Raw8Bytes, (long)Char.Id); // Unk, Equiped ? this.AddField(7, EPacketFieldType.Unsigned7BitEncoded, (long)3); Packets = new List <ISerializablePacket>(); ISerializablePacket DataList = new ISerializablePacket(); ISerializablePacket NullPck = new ISerializablePacket(); NullPck.Opcode = 0x026D; ISerializablePacket NullPck2 = new ISerializablePacket(); NullPck2.Opcode = 0x033A; Packets.Add(NullPck); Packets.Add(NullPck2); ISerializablePacket ItemDatas = new ISerializablePacket(); ItemDatas.Opcode = 0x026C; // Unk Slot ? ItemDatas.AddField(1, EPacketFieldType.Unsigned7BitEncoded, (long)2); CharacterInfoCache Cache = new CharacterInfoCache(); Cache.CacheIdentifier = 456805300; ItemDatas.AddField(10, EPacketFieldType.Packet, Cache); From.SendCache(7310, 506516265); From.SendCache(623, 456805300); Packets.Add(ItemDatas); }
public void BuildInventory(RiftClient From, Character Char) { GUID = 45875261658940; // Cache Ref this.AddField(4, EPacketFieldType.Raw4Bytes, (int)935832306); this.AddField(6, EPacketFieldType.Raw8Bytes, (long)Char.Id); // Unk, Equiped ? this.AddField(7, EPacketFieldType.Unsigned7BitEncoded, (long)3); Packets = new List <ISerializablePacket>(); ISerializablePacket ItemDatas = new ISerializablePacket(); ItemDatas.Opcode = 0x026C; // Unk Slot ? ItemDatas.AddField(1, EPacketFieldType.Unsigned7BitEncoded, (long)2); CharacterInfoCache Cache = new CharacterInfoCache(); Cache.CacheIdentifier = 935832306; ISerializablePacket IInventory = new ISerializablePacket(); IInventory.Opcode = 0x0291; Dictionary <long, ISerializablePacket> Inventory = new Dictionary <long, ISerializablePacket>(); SetItemInBagSlot(ref Inventory, 0, 45875261658941); IInventory.AddField(1, EPacketFieldType.Dictionary, Inventory); Packets.Add(IInventory); ItemDatas.AddField(10, EPacketFieldType.Packet, Cache); From.SendCache(7310, 2007607340); From.SendCache(623, 935832306); Packets.Add(ItemDatas); }
public override void OnRead(RiftClient From) { if (Message.StartsWith(".teleport")) { string CmdArgs = Message.Substring(10); string[] pos = CmdArgs.Split(new char[] { ' ' }); WorldServerPositionUpdate WPos = new WorldServerPositionUpdate(); WPos.GUID = From.Char.Id; WPos.Position = new List <float>(); WPos.Position.Add(float.Parse(pos[0])); WPos.Position.Add(float.Parse(pos[1])); WPos.Position.Add(float.Parse(pos[2])); WPos.Orientation = new List <float>(); WPos.Orientation.Add(0.0f); WPos.Orientation.Add(0.0f); WPos.Orientation.Add(0.0f); if (long.Parse(pos[3]) != CurrentMapId) { WorldTeleport WorldPort = WorldTeleport.FromPorticulum(long.Parse(pos[3]), 1, 0, "tm_Sanctum_SanctumOfTheVigil"); From.SendSerialized(WorldPort); WorldZoneInfo ZoneInfo = CacheMgr.Instance.GetZoneInfoCache("Capital1"); From.SendSerialized(ZoneInfo); WorldStartingPosition StartPos = new WorldStartingPosition(); StartPos.MapName = "world"; StartPos.Position = new List <float>(WPos.Position.ToArray()); From.SendSerialized(StartPos); ISerializablePacket PacketContainer = new ISerializablePacket(); WorldPositionExtra StartPos2 = new WorldPositionExtra(); StartPos2.MapName = "world"; StartPos2.MapId = 2; StartPos2.Position = new List <float>(WPos.Position.ToArray()); StartPos2.Position2 = new List <float>(WPos.Position.ToArray()); PacketContainer.Opcode = (long)Opcodes.WorldStartingPositionExtra; PacketContainer.AddField(0, EPacketFieldType.Packet, StartPos2); From.SendSerialized(PacketContainer); CurrentMapId = long.Parse(pos[3]); List <Cache_Info> CacheData = CacheMgr.Instance.GetBinCache(11319, false); foreach (Cache_Info ci in CacheData) { From.SendCache(ci.Type, (uint)ci.CacheId); } //From.SendSerialized(WPos); } else { From.SendSerialized(WPos); } } else { PlayerName = "Magetest"; Unk1 = 2551; Unk2 = 2551; From.SendSerialized(this); } }