/// <summary>
        /// Send an AgentThrottle packet to the specified server using the
        /// current values
        /// </summary>
        public void Set(Simulator simulator)
        {
            AgentThrottlePacket throttle = new AgentThrottlePacket();

            throttle.AgentData.AgentID     = Client.Self.AgentID;
            throttle.AgentData.SessionID   = Client.Self.SessionID;
            throttle.AgentData.CircuitCode = Client.Network.CircuitCode;
            throttle.Throttle.GenCounter   = 0;
            throttle.Throttle.Throttles    = this.ToBytes();

            Client.Network.SendPacket(throttle, simulator);
        }
Beispiel #2
0
        /// <summary>
        /// Send an AgentThrottle packet to the specified server using the 
        /// current values
        /// </summary>
        public void Set(Simulator simulator)
        {
            AgentThrottlePacket throttle = new AgentThrottlePacket();
            throttle.AgentData.AgentID = Client.Network.AgentID;
            throttle.AgentData.SessionID = Client.Network.SessionID;
            throttle.AgentData.CircuitCode = Client.Network.CircuitCode;
            throttle.Throttle.GenCounter = 0;
            throttle.Throttle.Throttles = this.ToBytes();

            Client.Network.SendPacket(throttle, simulator);
        }
        private void SendInitialPackets()
        {
            // Request the economy data
            SendPacket(new EconomyDataRequestPacket());

            // TODO: The client sends this early in the login sequence, should we?
            //ViewerEffectPacket effect = new ViewerEffectPacket();
            //effect.Effect = new ViewerEffectPacket.EffectBlock[1];
            //effect.Effect[0] = new ViewerEffectPacket.EffectBlock();
            //effect.Effect[0].Color = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF };
            //effect.Effect[0].Duration = 0.5f;
            //effect.Effect[0].ID = new LLUUID("c696075e53c6153f3d8e0c3e24541936");
            //effect.Effect[0].Type = 9;
            //effect.Effect[0].TypeData = new byte[56];
            //Array.Copy(new byte[] { 0x28, 0xF0, 0x10, 0x41 }, 0, effect.Effect[0].TypeData, 36, 4);
            //Array.Copy(new byte[] { 0x50, 0xD0, 0x0E, 0x41 }, 0, effect.Effect[0].TypeData, 44, 4);
            //Array.Copy(new byte[] { 0x24, 0x40 }, 0, effect.Effect[0].TypeData, 54, 2);
            //effect.Header.Reliable = false;
            //SendPacket(effect);

            // TODO: Is this throttle necessary/good, and what does it do?
            AgentThrottlePacket throttle = new AgentThrottlePacket();
            throttle.AgentData.AgentID = this.AgentID;
            throttle.AgentData.SessionID = this.SessionID;
            throttle.AgentData.CircuitCode = this.CurrentSim.CircuitCode;
            throttle.Throttle.GenCounter = 0;
            throttle.Throttle.Throttles = new byte[]
                { 0x00, 0x00, 0x96, 0x47, 0x00, 0x00, 0xAA, 0x47, 0x00, 0x00, 0x88, 0x46, 0x00, 0x00, 0x88, 0x46,
                  0x00, 0x00, 0x5F, 0x48, 0x00, 0x00, 0x5F, 0x48, 0x00, 0x00, 0xDC, 0x47 };
            SendPacket(throttle);

            // TODO: We should be setting the initial avatar height/width around here
            //Client.Avatar.SetHeightWidth(676, 909);

            // Set the initial avatar camera position
            Client.Self.UpdateCamera(true);

            // TODO: What animation are we stopping here?
            //AgentAnimationPacket animation = new AgentAnimationPacket();
            //animation.AgentData.AgentID = AgentID;
            //animation.AgentData.SessionID = SessionID;
            //animation.AnimationList = new AgentAnimationPacket.AnimationListBlock[1];
            //animation.AnimationList[0] = new AgentAnimationPacket.AnimationListBlock();
            //animation.AnimationList[0].AnimID = new LLUUID("efcf670c2d188128973a034ebc806b67");
            //animation.AnimationList[0].StartAnim = false;
            //SendPacket(animation);

            // TODO: Do we ever want to set this to true?
            SetAlwaysRunPacket run = new SetAlwaysRunPacket();
            run.AgentData.AgentID = AgentID;
            run.AgentData.SessionID = SessionID;
            run.AgentData.AlwaysRun = false;
            SendPacket(run);

            // TODO: This information is currently unused
            MuteListRequestPacket mute = new MuteListRequestPacket();
            mute.AgentData.AgentID = AgentID;
            mute.AgentData.SessionID = SessionID;
            mute.MuteData.MuteCRC = 0;
            SendPacket(mute);

            // Get the current avatar balance
            MoneyBalanceRequestPacket money = new MoneyBalanceRequestPacket();
            money.AgentData.AgentID = AgentID;
            money.AgentData.SessionID = SessionID;
            money.MoneyData.TransactionID = new LLUUID();
            SendPacket(money);

            // FIXME: MainAvatar can request the info if it wants to use it
            //AgentDataUpdateRequestPacket update = new AgentDataUpdateRequestPacket();
            //update.AgentData.AgentID = AgentID;
            //update.AgentData.SessionID = SessionID;
            //SendPacket(update);

            // TODO: What is the purpose of this? Information is currently unused
            RequestGrantedProxiesPacket proxies = new RequestGrantedProxiesPacket();
            proxies.AgentData.AgentID = AgentID;
            proxies.AgentData.SessionID = SessionID;
            SendPacket(proxies);
        }
Beispiel #4
0
        private void AgentThrottleHandler(Packet packet, LLAgent agent)
        {
            AgentThrottlePacket throttle = (AgentThrottlePacket)packet;

            agent.SetThrottles(throttle.Throttle.Throttles);
        }