void SetAlwaysRunHandler(Packet packet, Agent agent) { SetAlwaysRunPacket run = (SetAlwaysRunPacket)packet; agent.Running = run.AgentData.AlwaysRun; }
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); }
/// <summary> /// Set the always running toggle on the server /// </summary> /// <param name="alwaysRun">Whether the avatar should always run or not</param> public void SetAlwaysRun(bool alwaysRun) { SetAlwaysRunPacket run = new SetAlwaysRunPacket(); run.AgentData.AgentID = Client.Network.AgentID; run.AgentData.SessionID = Client.Network.SessionID; run.AgentData.AlwaysRun = alwaysRun; Client.Network.SendPacket(run); }