public void RequestWearables(NetworkInfo userInfo) { AgentProfile Agent = this.AgentList[userInfo.User.AgentID]; AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); aw.AgentData.AgentID = userInfo.User.AgentID; aw.AgentData.SerialNum = 0; aw.AgentData.SessionID = userInfo.User.SessionID; aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; AgentWearablesUpdatePacket.WearableDataBlock awb = null; awb = new AgentWearablesUpdatePacket.WearableDataBlock(); awb.WearableType = (byte)0; awb.AssetID = Agent.Avatar.Wearables[0].AssetID; awb.ItemID = Agent.Avatar.Wearables[0].ItemID; aw.WearableData[0] = awb; awb = new AgentWearablesUpdatePacket.WearableDataBlock(); awb.WearableType = (byte)1; awb.AssetID = Agent.Avatar.Wearables[1].AssetID; awb.ItemID = Agent.Avatar.Wearables[1].ItemID; aw.WearableData[1] = awb; for (int i = 2; i < 13; i++) { awb = new AgentWearablesUpdatePacket.WearableDataBlock(); awb.WearableType = (byte)i; awb.AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); awb.ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); aw.WearableData[i] = awb; } _server.SendPacket(aw, true, userInfo); }
public AgentProfile GetAgent(LLUUID id) { if (!this.AgentList.ContainsKey(id)) { return(null); } else { AgentProfile avatar = this.AgentList[id]; return(avatar); } }
/// <summary> /// /// </summary> /// <param name="userInfo"></param> /// <param name="first"></param> /// <param name="last"></param> /// <param name="baseFolder"></param> /// <param name="inventoryFolder"></param> /// <returns></returns> public virtual bool NewAgent(NetworkInfo userInfo, string first, string last, LLUUID baseFolder, LLUUID inventoryFolder) { AgentProfile agent = new AgentProfile(); agent.Avatar.FullID = userInfo.User.AgentID; agent.Avatar.NetInfo = userInfo; agent.Avatar.NetInfo.User.FirstName = first; agent.Avatar.NetInfo.User.LastName = last; agent.Avatar.Position = new LLVector3(100, 100, 22); agent.Avatar.BaseFolder = baseFolder; agent.Avatar.InventoryFolder = inventoryFolder; agent.Avatar.LocalID = 8880000 + this._localNumber; this._localNumber++; this.AgentList.Add(agent.Avatar.FullID, agent); //Create new Wearable Assets and place in Inventory //this.assetManager.CreateNewInventorySet(ref agent, userInfo); return(true); }
/// <summary> /// /// </summary> /// <param name="agent"></param> public void AddAgent(AgentProfile agent) { this.AgentList.Add(agent.Avatar.FullID, agent); }
/// <summary> /// /// </summary> /// <param name="userInfo"></param> /// <param name="first"></param> /// <param name="last"></param> /// <param name="baseFolder"></param> /// <param name="inventoryFolder"></param> /// <returns></returns> public virtual bool NewAgent(NetworkInfo userInfo, string first, string last, LLUUID baseFolder, LLUUID inventoryFolder) { AgentProfile agent = new AgentProfile(); agent.Avatar.FullID = userInfo.User.AgentID; agent.Avatar.NetInfo = userInfo; agent.Avatar.NetInfo.User.FirstName =first; agent.Avatar.NetInfo.User.LastName = last; agent.Avatar.Position = new LLVector3(100, 100, 22); agent.Avatar.BaseFolder = baseFolder; agent.Avatar.InventoryFolder = inventoryFolder; agent.Avatar.LocalID = 8880000 + this._localNumber; this._localNumber++; this.AgentList.Add(agent.Avatar.FullID, agent); //Create new Wearable Assets and place in Inventory //this.assetManager.CreateNewInventorySet(ref agent, userInfo); return(true); }