public ProfileFunPlugin(PubComb plug) { plugin = plug; form = new SimpleProfForm1(this); this.frame = plug.frame; shared = plugin.SharedInfo; this.proxy = plug.proxy; proxy.AddDelegate(PacketType.AvatarPropertiesReply, Direction.Incoming, new PacketDelegate(inAvatar)); RefreshDownloadsTimer.Elapsed += new System.Timers.ElapsedEventHandler(RefreshDownloadsTimer_Elapsed); RefreshDownloadsTimer.Start(); proxy.AddDelegate(PacketType.AgentMovementComplete, Direction.Incoming, delegate(Packet packet, IPEndPoint sim) { shared.RegionHandle = ((AgentMovementCompletePacket)packet).Data.RegionHandle; return(packet); }); proxy.AddDelegate(PacketType.AgentUpdate, Direction.Outgoing, delegate(Packet packet, IPEndPoint sim) { AgentUpdatePacket.AgentDataBlock p = ((AgentUpdatePacket)packet).AgentData; shared.CameraPosition = p.CameraCenter; shared.CameraAtAxis = p.CameraAtAxis; shared.CameraLeftAxis = p.CameraLeftAxis; shared.CameraUpAxis = p.CameraUpAxis; shared.Far = p.Far; shared.ip = sim.Address; shared.port = sim.Port; return(packet); }); }
public ProfileFunPlugin(PubComb plug) { plugin = plug; form = new SimpleProfForm1(this); this.frame = plug.frame; shared = plugin.SharedInfo; this.proxy = plug.proxy; proxy.AddDelegate(PacketType.AvatarPropertiesReply, Direction.Incoming, new PacketDelegate(inAvatar)); RefreshDownloadsTimer.Elapsed += new System.Timers.ElapsedEventHandler(RefreshDownloadsTimer_Elapsed); RefreshDownloadsTimer.Start(); proxy.AddDelegate(PacketType.AgentMovementComplete, Direction.Incoming, delegate(Packet packet, IPEndPoint sim) { shared.RegionHandle = ((AgentMovementCompletePacket)packet).Data.RegionHandle; return packet; }); proxy.AddDelegate(PacketType.AgentUpdate, Direction.Outgoing, delegate(Packet packet, IPEndPoint sim) { AgentUpdatePacket.AgentDataBlock p = ((AgentUpdatePacket)packet).AgentData; shared.CameraPosition = p.CameraCenter; shared.CameraAtAxis = p.CameraAtAxis; shared.CameraLeftAxis = p.CameraLeftAxis; shared.CameraUpAxis = p.CameraUpAxis; shared.Far = p.Far; shared.ip = sim.Address; shared.port = sim.Port; return packet; }); }