client.Groups.GroupLeaveReply += new EventHandler<GroupOperationEventArgs>(Groups_GroupsChanged);\r
client.Groups.GroupDropped += new EventHandler<GroupDroppedEventArgs>(Groups_GroupsChanged);\r
client.Groups.GroupJoinedReply += new EventHandler<GroupOperationEventArgs>(Groups_GroupsChanged);\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
client.Network.OnConnected += new NetworkManager.ConnectedCallback(Network_OnConnected);\r
mainForm.Load += new EventHandler(mainForm_Load);\r
ScanAndLoadPlugins();\r
client.Groups.GroupLeaveReply -= new EventHandler<GroupOperationEventArgs>(Groups_GroupsChanged);\r
client.Groups.GroupDropped -= new EventHandler<GroupDroppedEventArgs>(Groups_GroupsChanged);\r
client.Groups.GroupJoinedReply -= new EventHandler<GroupOperationEventArgs>(Groups_GroupsChanged);\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
client.Network.OnConnected -= new NetworkManager.ConnectedCallback(Network_OnConnected);\r
}\r
\r
clientSettings = new Settings(Path.Combine(ClientDir, "client_settings.xml"));\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
lock (nameCache)\r
{\r
- foreach (KeyValuePair<UUID, string> av in names)\r
+ foreach (KeyValuePair<UUID, string> av in e.Names)\r
{\r
if (!nameCache.ContainsKey(av.Key))\r
{\r
{\r
if (client != null)\r
{\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
}\r
}\r
\r
{\r
if (client != null)\r
{\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
}\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
- if (names.ContainsKey(agentID))\r
+ if (e.Names.ContainsKey(agentID))\r
{\r
CleanupHandlers(null, null);\r
- SetName(names[agentID]);\r
+ SetName(e.Names[agentID]);\r
}\r
}\r
\r
this.client = instance.Client;\r
\r
// Callbacks\r
- client.Avatars.OnAvatarAnimation += new AvatarManager.AvatarAnimationCallback(Avatars_OnAvatarAnimationUpdate);\r
+ client.Avatars.AvatarAnimation += new EventHandler<AvatarAnimationEventArgs>(Avatars_AvatarAnimation);\r
}\r
\r
void AnimTab_Disposed(object sender, EventArgs e)\r
{\r
- client.Avatars.OnAvatarAnimation -= new AvatarManager.AvatarAnimationCallback(Avatars_OnAvatarAnimationUpdate);\r
+ client.Avatars.AvatarAnimation -= new EventHandler<AvatarAnimationEventArgs>(Avatars_AvatarAnimation);\r
}\r
\r
- void Avatars_OnAvatarAnimationUpdate(UUID avatarID, InternalDictionary<UUID, int> anims)\r
+ void Avatars_AvatarAnimation(object sender, AvatarAnimationEventArgs e)\r
{\r
if (InvokeRequired) {\r
- Invoke(new MethodInvoker(delegate()\r
- {\r
- Avatars_OnAvatarAnimationUpdate(avatarID, anims);\r
- }));\r
+ Invoke(new MethodInvoker(() => Avatars_AvatarAnimation(sender, e)));\r
return;\r
}\r
- if (avatarID == av.ID)\r
+ if (e.AvatarID== av.ID)\r
{\r
- anims.ForEach(delegate(UUID AnimID)\r
+ foreach (Animation a in e.Animations)\r
{\r
- if (!seenAnim.Contains(AnimID))\r
+ if (!seenAnim.Contains(a.AnimationID))\r
{\r
- Logger.Log("New anim for " + av.Name + ": " + AnimID, Helpers.LogLevel.Debug);\r
- seenAnim.Add(AnimID);\r
- AnimDetail ad = new AnimDetail(instance, av, AnimID, n);\r
+ Logger.Log("New anim for " + av.Name + ": " + a.AnimationID, Helpers.LogLevel.Debug);\r
+ seenAnim.Add(a.AnimationID);\r
+ AnimDetail ad = new AnimDetail(instance, av, a.AnimationID, n);\r
ad.Location = new Point(0, n++ * ad.Height);\r
ad.Dock = DockStyle.Top;\r
Controls.Add(ad);\r
}\r
- });\r
+ }\r
}\r
}\r
\r
}\r
}\r
}\r
-\r
}\r
}\r
ManualResetEvent done = new ManualResetEvent(false);\r
{\r
\r
- AvatarManager.AvatarNamesCallback callback = delegate(Dictionary<UUID, string> names)\r
+ EventHandler<UUIDNameReplyEventArgs> callback = delegate(object senderx, UUIDNameReplyEventArgs ex)\r
{\r
- if (names.ContainsKey(e.Friend.UUID))\r
+ if (ex.Names.ContainsKey(e.Friend.UUID))\r
{\r
- name = names[e.Friend.UUID];\r
+ name = ex.Names[e.Friend.UUID];\r
done.Set();\r
}\r
};\r
\r
- client.Avatars.OnAvatarNames += callback;\r
+ client.Avatars.UUIDNameReply += callback;\r
name = instance.getAvatarName(e.Friend.UUID);\r
if (name == RadegastInstance.INCOMPLETE_NAME)\r
{\r
done.WaitOne(3000, false);\r
}\r
- client.Avatars.OnAvatarNames -= callback;\r
+ client.Avatars.UUIDNameReply -= callback;\r
}\r
}\r
\r
using (ManualResetEvent done = new ManualResetEvent(false))\r
{\r
\r
- AvatarManager.AvatarNamesCallback callback = delegate(Dictionary<UUID, string> names)\r
+ EventHandler<UUIDNameReplyEventArgs> callback = delegate(object senderx, UUIDNameReplyEventArgs ex)\r
{\r
- if (names.ContainsKey(e.AgentID))\r
+ if (ex.Names.ContainsKey(e.AgentID))\r
{\r
- agentName = names[e.AgentID];\r
+ agentName = ex.Names[e.AgentID];\r
done.Set();\r
}\r
};\r
\r
- client.Avatars.OnAvatarNames += callback;\r
+ client.Avatars.UUIDNameReply += callback;\r
agentName = instance.getAvatarName(e.AgentID);\r
if (agentName == RadegastInstance.INCOMPLETE_NAME)\r
{\r
done.WaitOne(3000, false);\r
}\r
- client.Avatars.OnAvatarNames -= callback;\r
+ client.Avatars.UUIDNameReply -= callback;\r
}\r
}\r
\r
client.Groups.CurrentGroups += new EventHandler<CurrentGroupsEventArgs>(Groups_CurrentGroups);\r
client.Groups.GroupNoticesListReply += new EventHandler<GroupNoticesListReplyEventArgs>(Groups_GroupNoticesListReply);\r
client.Self.IM += new EventHandler<InstantMessageEventArgs>(Self_IM);\r
-\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
\r
RefreshControlsAvailability();\r
RefreshGroupInfo();\r
client.Groups.CurrentGroups -= new EventHandler<CurrentGroupsEventArgs>(Groups_CurrentGroups);\r
client.Groups.GroupNoticesListReply -= new EventHandler<GroupNoticesListReplyEventArgs>(Groups_GroupNoticesListReply);\r
client.Self.IM -= new EventHandler<InstantMessageEventArgs>(Self_IM);\r
-\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
}\r
\r
#region Network callbacks\r
}\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
if (InvokeRequired)\r
{\r
- BeginInvoke(new MethodInvoker(delegate()\r
- {\r
- Avatars_OnAvatarNames(names);\r
- }\r
- ));\r
+ BeginInvoke(new MethodInvoker(() => Avatars_UUIDNameReply(sender, e)));\r
return;\r
}\r
\r
- if (names.ContainsKey(group.FounderID))\r
+ if (e.Names.ContainsKey(group.FounderID))\r
{\r
- lblFounded.Text = "Founded by: " + names[group.FounderID];\r
+ lblFounded.Text = "Founded by: " + e.Names[group.FounderID];\r
}\r
\r
lvwGeneralMembers.BeginUpdate();\r
bool modified = false;\r
- foreach (KeyValuePair<UUID, string> name in names)\r
+ foreach (KeyValuePair<UUID, string> name in e.Names)\r
{\r
if (lvwGeneralMembers.Items.ContainsKey(name.Key.ToString()))\r
{\r
client.Self.GroupChatJoined += new EventHandler<GroupChatJoinedEventArgs>(Self_GroupChatJoined);\r
client.Self.ChatSessionMemberAdded += new EventHandler<ChatSessionMemberAddedEventArgs>(Self_ChatSessionMemberAdded);\r
client.Self.ChatSessionMemberLeft += new EventHandler<ChatSessionMemberLeftEventArgs>(Self_ChatSessionMemberLeft);\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
client.Self.RequestJoinGroupChat(session);\r
}\r
\r
client.Self.GroupChatJoined -= new EventHandler<GroupChatJoinedEventArgs>(Self_GroupChatJoined);\r
client.Self.ChatSessionMemberAdded -= new EventHandler<ChatSessionMemberAddedEventArgs>(Self_ChatSessionMemberAdded);\r
client.Self.ChatSessionMemberLeft -= new EventHandler<ChatSessionMemberLeftEventArgs>(Self_ChatSessionMemberLeft);\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
CleanUp();\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
if (InvokeRequired)\r
{\r
- BeginInvoke(new MethodInvoker(() => Avatars_OnAvatarNames(names)));\r
+ BeginInvoke(new MethodInvoker(() => Avatars_UUIDNameReply(sender, e)));\r
return;\r
}\r
\r
\r
Participants.BeginUpdate();\r
\r
- foreach (KeyValuePair<UUID, string> kvp in names)\r
+ foreach (KeyValuePair<UUID, string> kvp in e.Names)\r
{\r
if (Participants.Items.ContainsKey(kvp.Key.ToString()))\r
Participants.Items[kvp.Key.ToString()].Text = kvp.Value;\r
this.avatar = avatar;\r
\r
// Callbacks\r
- client.Avatars.OnPointAt += new AvatarManager.PointAtCallback(Avatars_OnPointAt);\r
+ client.Avatars.ViewerEffectPointAt += new EventHandler<ViewerEffectPointAtEventArgs>(Avatars_ViewerEffectPointAt);\r
client.Objects.OnObjectProperties += new ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties);\r
\r
}\r
\r
void MasterTab_Disposed(object sender, EventArgs e)\r
{\r
- client.Avatars.OnPointAt -= new AvatarManager.PointAtCallback(Avatars_OnPointAt);\r
+ client.Avatars.ViewerEffectPointAt -= new EventHandler<ViewerEffectPointAtEventArgs>(Avatars_ViewerEffectPointAt);\r
client.Objects.OnObjectProperties -= new ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties);\r
}\r
\r
btnPoint.Enabled = true;\r
}\r
\r
-\r
- void Avatars_OnPointAt(UUID sourceID, UUID targetID, Vector3d targetPos,\r
- PointAtType pointType, float duration, UUID id)\r
+ void Avatars_ViewerEffectPointAt(object sender, ViewerEffectPointAtEventArgs e)\r
{\r
- if (sourceID == avatar.ID && targetID != UUID.Zero) {\r
- selectedID = targetID;\r
+ if (e.SourceID == avatar.ID && e.TargetID != UUID.Zero) {\r
+ selectedID = e.TargetID;\r
selectedPrim = client.Network.CurrentSim.ObjectsPrimitives.Find(\r
delegate(Primitive prim) { return prim.ID == selectedID; }\r
);\r
client.Objects.OnObjectKilled += new ObjectManager.KillObjectCallback(Objects_OnObjectKilled);\r
client.Objects.OnObjectProperties += new ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties);\r
client.Network.OnCurrentSimChanged += new NetworkManager.CurrentSimChangedCallback(Network_OnCurrentSimChanged);\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
instance.State.OnWalkStateCanged += new StateManager.WalkStateCanged(State_OnWalkStateCanged);\r
}\r
\r
client.Objects.OnObjectKilled -= new ObjectManager.KillObjectCallback(Objects_OnObjectKilled);\r
client.Objects.OnObjectProperties -= new ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties);\r
client.Network.OnCurrentSimChanged -= new NetworkManager.CurrentSimChangedCallback(Network_OnCurrentSimChanged);\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
instance.State.OnWalkStateCanged -= new StateManager.WalkStateCanged(State_OnWalkStateCanged);\r
}\r
\r
btnRefresh_Click(null, null);\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
if (InvokeRequired)\r
{\r
- BeginInvoke(new MethodInvoker(delegate() { Avatars_OnAvatarNames(names); }));\r
+ BeginInvoke(new MethodInvoker(delegate() { Avatars_UUIDNameReply(sender, e); }));\r
return;\r
}\r
\r
foreach (ListViewItem item in lstPrims.Items)\r
{\r
Primitive prim = item.Tag as Primitive;\r
- if (prim.Properties != null && names.ContainsKey(prim.Properties.OwnerID))\r
+ if (prim.Properties != null && e.Names.ContainsKey(prim.Properties.OwnerID))\r
{\r
item.Text = GetObjectName(prim);\r
}\r
// Callbacks\r
client.Objects.OnPayPriceReply += new ObjectManager.PayPriceReply(Objects_OnPayPriceReply);\r
client.Objects.OnObjectPropertiesFamily += new ObjectManager.ObjectPropertiesFamilyCallback(Objects_OnObjectPropertiesFamily);\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
\r
if (isObject)\r
{\r
{\r
client.Objects.OnPayPriceReply -= new ObjectManager.PayPriceReply(Objects_OnPayPriceReply);\r
client.Objects.OnObjectPropertiesFamily -= new ObjectManager.ObjectPropertiesFamilyCallback(Objects_OnObjectPropertiesFamily);\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
}\r
\r
void frmPay_Click(object sender, EventArgs e)\r
lblResident.Text = string.Format("Pay resident: {0}", instance.getAvatarName(owner));\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
- if (names.ContainsKey(owner))\r
+ if (e.Names.ContainsKey(owner))\r
{\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
UpdateResident();\r
}\r
}\r
}\r
\r
// Callbacks\r
- client.Avatars.OnAvatarProperties += new AvatarManager.AvatarPropertiesCallback(Avatars_OnAvatarProperties);\r
- client.Avatars.OnAvatarPicks += new AvatarManager.AvatarPicksCallback(Avatars_OnAvatarPicks);\r
- client.Avatars.OnPickInfo += new AvatarManager.PickInfoCallback(Avatars_OnPickInfo);\r
+ client.Avatars.AvatarPropertiesReply += new EventHandler<AvatarPropertiesReplyEventArgs>(Avatars_AvatarPropertiesReply);\r
+ client.Avatars.AvatarPicksReply += new EventHandler<AvatarPicksReplyEventArgs>(Avatars_AvatarPicksReply);\r
+ client.Avatars.PickInfoReply += new EventHandler<PickInfoReplyEventArgs>(Avatars_PickInfoReply);\r
client.Parcels.ParcelInfoReply += new EventHandler<ParcelInfoReplyEventArgs>(Parcels_ParcelInfoReply);\r
netcom.ClientLoggedOut += new EventHandler(netcom_ClientLoggedOut);\r
\r
\r
void frmProfile_Disposed(object sender, EventArgs e)\r
{\r
- client.Avatars.OnAvatarProperties -= new AvatarManager.AvatarPropertiesCallback(Avatars_OnAvatarProperties);\r
- client.Avatars.OnAvatarPicks -= new AvatarManager.AvatarPicksCallback(Avatars_OnAvatarPicks);\r
- client.Avatars.OnPickInfo -= new AvatarManager.PickInfoCallback(Avatars_OnPickInfo);\r
+ client.Avatars.AvatarPropertiesReply -= new EventHandler<AvatarPropertiesReplyEventArgs>(Avatars_AvatarPropertiesReply);\r
+ client.Avatars.AvatarPicksReply -= new EventHandler<AvatarPicksReplyEventArgs>(Avatars_AvatarPicksReply);\r
+ client.Avatars.PickInfoReply -= new EventHandler<PickInfoReplyEventArgs>(Avatars_PickInfoReply);\r
client.Parcels.ParcelInfoReply -= new EventHandler<ParcelInfoReplyEventArgs>(Parcels_ParcelInfoReply);\r
netcom.ClientLoggedOut -= new EventHandler(netcom_ClientLoggedOut);\r
}\r
\r
- void Avatars_OnAvatarPicks(UUID id, Dictionary<UUID, string> picks)\r
+ void Avatars_AvatarPicksReply(object sender, AvatarPicksReplyEventArgs e)\r
{\r
- if (id != agentID) return;\r
+ if (e.AvatarID != agentID) return;\r
\r
if (InvokeRequired)\r
{\r
- BeginInvoke(new MethodInvoker(() => Avatars_OnAvatarPicks(id, picks)));\r
+ BeginInvoke(new MethodInvoker(() => Avatars_AvatarPicksReply(sender, e)));\r
return;\r
}\r
gotPicks = true;\r
- DisplayListOfPicks(picks);\r
+ DisplayListOfPicks(e.Picks);\r
\r
}\r
\r
\r
if (pickCache.ContainsKey(requestedPick))\r
{\r
- Avatars_OnPickInfo(requestedPick, pickCache[requestedPick]);\r
+ Avatars_PickInfoReply(this, new PickInfoReplyEventArgs(requestedPick, pickCache[requestedPick]));\r
}\r
else\r
{\r
}\r
}\r
\r
- void Avatars_OnPickInfo(UUID pickid, ProfilePick pick)\r
+ void Avatars_PickInfoReply(object sender, PickInfoReplyEventArgs e)\r
{\r
- if (pickid != requestedPick) return;\r
+ if (e.PickID != requestedPick) return;\r
\r
if (InvokeRequired)\r
{\r
- BeginInvoke(new MethodInvoker(() => Avatars_OnPickInfo(pickid, pick)));\r
+ BeginInvoke(new MethodInvoker(() => Avatars_PickInfoReply(sender, e)));\r
return;\r
}\r
\r
lock (pickCache)\r
{\r
- if (!pickCache.ContainsKey(pickid))\r
- pickCache.Add(pickid, pick);\r
+ if (!pickCache.ContainsKey(e.PickID))\r
+ pickCache.Add(e.PickID, e.Pick);\r
}\r
\r
- currentPick = pick;\r
+ currentPick = e.Pick;\r
\r
if (pickPicturePanel.Controls.Count > 0)\r
pickPicturePanel.Controls[0].Dispose();\r
pickPicturePanel.Controls.Clear();\r
\r
- if (pick.SnapshotID != UUID.Zero)\r
+ if (e.Pick.SnapshotID != UUID.Zero)\r
{\r
- SLImageHandler img = new SLImageHandler(instance, pick.SnapshotID, string.Empty);\r
+ SLImageHandler img = new SLImageHandler(instance, e.Pick.SnapshotID, string.Empty);\r
img.Dock = DockStyle.Fill;\r
img.SizeMode = PictureBoxSizeMode.StretchImage;\r
pickPicturePanel.Controls.Add(img);\r
}\r
\r
- pickTitle.Text = pick.Name;\r
+ pickTitle.Text = e.Pick.Name;\r
\r
- pickDetail.Text = pick.Desc;\r
+ pickDetail.Text = e.Pick.Desc;\r
\r
- if (!parcelCache.ContainsKey(pick.ParcelID))\r
+ if (!parcelCache.ContainsKey(e.Pick.ParcelID))\r
{\r
pickLocation.Text = string.Format("Unkown parcel, {0} ({1}, {2}, {3})",\r
- pick.SimName,\r
- ((int)pick.PosGlobal.X) % 256,\r
- ((int)pick.PosGlobal.Y) % 256,\r
- ((int)pick.PosGlobal.Z) % 256\r
+ e.Pick.SimName,\r
+ ((int)e.Pick.PosGlobal.X) % 256,\r
+ ((int)e.Pick.PosGlobal.Y) % 256,\r
+ ((int)e.Pick.PosGlobal.Z) % 256\r
);\r
- client.Parcels.RequestParcelInfo(pick.ParcelID);\r
+ client.Parcels.RequestParcelInfo(e.Pick.ParcelID);\r
}\r
else\r
{\r
- Parcels_ParcelInfoReply(this, new ParcelInfoReplyEventArgs(parcelCache[pick.ParcelID]));\r
+ Parcels_ParcelInfoReply(this, new ParcelInfoReplyEventArgs(parcelCache[e.Pick.ParcelID]));\r
}\r
}\r
\r
Close();\r
}\r
\r
- //comes in on separate thread\r
- private void Avatars_OnAvatarProperties(UUID avatarID, Avatar.AvatarProperties properties)\r
+ void Avatars_AvatarPropertiesReply(object sender, AvatarPropertiesReplyEventArgs e)\r
{\r
- if (avatarID != agentID) return;\r
+ if (e.AvatarID != agentID) return;\r
\r
if (InvokeRequired)\r
{\r
- Invoke(new MethodInvoker(delegate()\r
- {\r
- Avatars_OnAvatarProperties(avatarID, properties);\r
- }));\r
+ Invoke(new MethodInvoker(() => Avatars_AvatarPropertiesReply(sender, e)));\r
return;\r
}\r
\r
- FLImageID = properties.FirstLifeImage;\r
- SLImageID = properties.ProfileImage;\r
+ FLImageID = e.Properties.FirstLifeImage;\r
+ SLImageID = e.Properties.ProfileImage;\r
\r
if (SLImageID != UUID.Zero)\r
{\r
\r
this.BeginInvoke(\r
new OnSetProfileProperties(SetProfileProperties),\r
- new object[] { properties });\r
+ new object[] { e.Properties});\r
}\r
\r
//called on GUI thread\r
this.instance = instance;\r
this.msg = msg;\r
\r
- client.Avatars.OnAvatarNames += new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
\r
if (msg.BinaryBucket.Length > 0)\r
{\r
\r
void ntfInventoryOffer_Disposed(object sender, EventArgs e)\r
{\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
}\r
\r
- void Avatars_OnAvatarNames(Dictionary<UUID, string> names)\r
+ void Avatars_UUIDNameReply(object sender, UUIDNameReplyEventArgs e)\r
{\r
- if (names.Keys.Contains(msg.FromAgentID))\r
+ if (e.Names.Keys.Contains(msg.FromAgentID))\r
{\r
- client.Avatars.OnAvatarNames -= new AvatarManager.AvatarNamesCallback(Avatars_OnAvatarNames);\r
+ client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);\r
BeginInvoke(new MethodInvoker(() => txtInfo.Text = objectOfferText()));\r
}\r
}\r
// Events\r
Client.Self.ChatFromSimulator += new EventHandler<ChatEventArgs>(Self_ChatFromSimulator);\r
Client.Self.IM += new EventHandler<InstantMessageEventArgs>(Self_IM);\r
- Client.Avatars.OnAvatarProperties += new AvatarManager.AvatarPropertiesCallback(Avatars_OnAvatarProperties);\r
+ Client.Avatars.AvatarPropertiesReply += new EventHandler<AvatarPropertiesReplyEventArgs>(Avatars_AvatarPropertiesReply);\r
Client.Network.OnConnected += new NetworkManager.ConnectedCallback(Network_OnConnected);\r
\r
}\r
\r
+\r
public void StopPlugin(RadegastInstance Instance)\r
{\r
// Remove the menu button\r
// Unregister events\r
Client.Self.ChatFromSimulator -= new EventHandler<ChatEventArgs>(Self_ChatFromSimulator);\r
Client.Self.IM -= new EventHandler<InstantMessageEventArgs>(Self_IM);\r
- Client.Avatars.OnAvatarProperties -= new AvatarManager.AvatarPropertiesCallback(Avatars_OnAvatarProperties);\r
+ Client.Avatars.AvatarPropertiesReply -= new EventHandler<AvatarPropertiesReplyEventArgs>(Avatars_AvatarPropertiesReply);\r
Client.Network.OnConnected -= new NetworkManager.ConnectedCallback(Network_OnConnected);\r
}\r
\r
Alice.GlobalSettings.updateSetting("name", FirstName(Client.Self.Name));\r
}\r
\r
- void Avatars_OnAvatarProperties(UUID avatarID, Avatar.AvatarProperties properties)\r
+ void Avatars_AvatarPropertiesReply(object sender, AvatarPropertiesReplyEventArgs e)\r
{\r
- if (avatarID == Client.Self.AgentID)\r
+ if (e.AvatarID == Client.Self.AgentID)\r
{\r
- MyProfile = properties;\r
+ MyProfile = e.Properties;\r
Alice.GlobalSettings.updateSetting("birthday", MyProfile.BornOn);\r
DateTime bd;\r
if (DateTime.TryParse(MyProfile.BornOn, Utils.EnUsCulture, System.Globalization.DateTimeStyles.None, out bd))\r