public ProfileVIew(UUID key) : base(Gtk.WindowType.Toplevel) { this.Build(); picks_waiting=new List<UUID>(); resident=key; MainClass.client.Avatars.AvatarPropertiesReply += new EventHandler<AvatarPropertiesReplyEventArgs>(Avatars_AvatarPropertiesReply); MainClass.client.Avatars.PickInfoReply += new EventHandler<PickInfoReplyEventArgs>(Avatars_PickInfoReply); MainClass.client.Avatars.AvatarPicksReply += new EventHandler<AvatarPicksReplyEventArgs>(Avatars_AvatarPicksReply); MainClass.client.Avatars.RequestAvatarProperties(key); MainClass.client.Avatars.RequestAvatarPicks(key); this.DeleteEvent += new DeleteEventHandler(OnDeleteEvent); this.label_born.Text=""; this.label_identified.Text=""; this.label_name.Text=""; this.label_partner.Text=""; this.label_pay.Text=""; this.label_status.Text=""; Gdk.Pixbuf buf=MainClass.GetResource("trying.png"); this.image3.Pixbuf=buf.ScaleSimple(128,128,Gdk.InterpType.Bilinear); this.image7.Pixbuf=buf.ScaleSimple(128,128,Gdk.InterpType.Bilinear); AsyncNameUpdate ud = new AsyncNameUpdate(key, false); ud.onNameCallBack += delegate(string namex, object[] values) { this.label_name.Text=namex; }; ud.go(); }
public PayWindow(UUID target,int amount) : base(Gtk.WindowType.Toplevel) { is_object=false; amountpay=amount; resident_key = target; resident = "Waiting..."; AsyncNameUpdate ud = new AsyncNameUpdate(target, false); ud.onNameCallBack += new AsyncNameUpdate.NameCallBack(ud_onNameCallBack); ud.go(); this.Build(); }
public void setsession(UUID id) { session=id; Gtk.Application.Invoke(delegate{ this.store.Clear(); if(MainClass.client.Self.GroupChatSessions.ContainsKey(session)) MainClass.client.Self.GroupChatSessions[session].ForEach(delegate (ChatSessionMember member) { string extra= member.IsModerator==true?" (moderator)":""; Gtk.TreeIter iter = store.AppendValues("Waiting...",member); AsyncNameUpdate ud=new AsyncNameUpdate(member.AvatarKey,false); ud.addparameters(iter); ud.onNameCallBack += delegate(string namex,object[] values){Gtk.TreeIter iterx=(Gtk.TreeIter)values[0]; lock(store){store.SetValue(iterx,0,namex);}}; ud.go(); }); MainClass.client.Self.ChatSessionMemberAdded += new EventHandler<ChatSessionMemberAddedEventArgs>(Self_ChatSessionMemberAdded); MainClass.client.Self.ChatSessionMemberLeft += new EventHandler<ChatSessionMemberLeftEventArgs>(Self_ChatSessionMemberLeft); }); }
protected virtual void OnTreeviewInvCursorChanged(object sender, System.EventArgs e) { Gtk.TreeModel mod; Gtk.TreeIter iter; TreePath[] paths = treeview_inv.Selection.GetSelectedRows(out mod); foreach (TreePath path in paths) { if (mod.GetIter(out iter, path)) { InventoryBase item = (InventoryBase)mod.GetValue(iter, 3); if(item==null) continue; //Logger.Log("ITEM ID" + item.UUID.ToString() + " Parent " + item.ParentUUID.ToString(),Helpers.LogLevel.Debug); if (item is InventoryItem) { this.label_createdby.Text = ((InventoryItem)item).CreatorID.ToString(); this.label_aquired.Text = ((InventoryItem)item).CreationDate.ToString(); this.checkbutton_copy.Active = OpenMetaverse.PermissionMask.Copy == (((InventoryItem)item).Permissions.OwnerMask & OpenMetaverse.PermissionMask.Copy); this.checkbutton_mod.Active = OpenMetaverse.PermissionMask.Modify == (((InventoryItem)item).Permissions.OwnerMask & OpenMetaverse.PermissionMask.Modify); this.checkbutton_trans.Active = OpenMetaverse.PermissionMask.Transfer == (((InventoryItem)item).Permissions.OwnerMask & OpenMetaverse.PermissionMask.Transfer); this.checkbutton_copynext.Active = OpenMetaverse.PermissionMask.Copy == (((InventoryItem)item).Permissions.NextOwnerMask & OpenMetaverse.PermissionMask.Copy); this.checkbutton_modnext.Active = OpenMetaverse.PermissionMask.Modify == (((InventoryItem)item).Permissions.NextOwnerMask & OpenMetaverse.PermissionMask.Modify); this.checkbutton_transnext.Active = OpenMetaverse.PermissionMask.Transfer == (((InventoryItem)item).Permissions.NextOwnerMask & OpenMetaverse.PermissionMask.Transfer); AsyncNameUpdate ud = new AsyncNameUpdate((UUID)((InventoryItem)item).CreatorID.ToString(), false); ud.onNameCallBack += delegate(string name, object[] values) { this.label_createdby.Text = name; }; ud.go(); AsyncNameUpdate ud2 = new AsyncNameUpdate(((InventoryItem)item).GroupID, true); ud2.onNameCallBack += delegate(string name, object[] values) { this.label_group.Text = name; }; ud2.go(); this.label_saleprice.Text = ((InventoryItem)item).SalePrice.ToString(); } else { this.label_saleprice.Text = ""; this.label_createdby.Text = ""; this.label_aquired.Text = ""; this.checkbutton_mod.Active=false; this.checkbutton_trans.Active=false; this.checkbutton_copynext.Active=false; this.checkbutton_modnext.Active=false; this.checkbutton_transnext.Active = false; this.label_group.Text = ""; this.label_createdby.Text = ""; } } } }
void Self_ChatSessionMemberAdded(object sender, ChatSessionMemberAddedEventArgs e) { if(session!=e.SessionID) return; Gtk.Application.Invoke(delegate { ChatSessionMember member=MainClass.client.Self.GroupChatSessions[session].Find ( delegate (ChatSessionMember member2) { return member2.AvatarKey==e.AgentID; } ); Gtk.TreeIter iter = store.AppendValues("Waiting...", member); AsyncNameUpdate ud=new AsyncNameUpdate(e.AgentID,false); ud.addparameters(iter); ud.onNameCallBack += delegate(string namex,object[] values) { Gtk.TreeIter iterx=(Gtk.TreeIter)values[0]; Gtk.Application.Invoke(delegate { lock(store) { if(store.IterIsValid(iterx)) store.SetValue(iterx,0,namex); }; }); }; ud.go(); }); }
void populate_list() { store.Clear(); MainClass.client.Friends.FriendList.ForEach(delegate(FriendInfo friend) { Gtk.TreeIter iter = store.AppendValues(friend.IsOnline ? online_img : offline_img, friend.Name, friend.CanSeeMeOnline ? this.img_see_my_status :img_blank, friend.CanSeeMeOnMap ? this.img_map_me : img_blank, friend.CanModifyMyObjects ? this.img_edit_mine : img_blank, friend.CanModifyTheirObjects ? this.img_edit_theirs : img_blank, friend.UUID.ToString(), friend.IsOnline); AsyncNameUpdate ud=new AsyncNameUpdate(friend.UUID,false); ud.addparameters(iter); ud.onNameCallBack += delegate(string namex,object[] values){Gtk.TreeIter iterx=(Gtk.TreeIter)values[0]; store.SetValue(iterx,1,namex);}; ud.go(); }); }
void Friends_FriendshipResponse(object sender, FriendshipResponseEventArgs e) { Gtk.Application.Invoke(delegate { lock(store) { if (e.Accepted == true) { Gtk.TreeIter iter = store.AppendValues(online_img, e.AgentName, e.AgentID.ToString(), true); AsyncNameUpdate ud = new AsyncNameUpdate(e.AgentID, false); ud.addparameters(iter); ud.onNameCallBack += delegate(string namex, object[] values) { Gtk.TreeIter iterx = (Gtk.TreeIter)values[0]; store.SetValue(iterx, 1, namex); }; ud.go(); } } }); }
void Groups_GroupProfile(object sender, GroupProfileEventArgs e) { if(e.Group.ID!=this.groupkey) return; Gtk.Application.Invoke(delegate { this.entry_enrollmentfee.Text=e.Group.MembershipFee.ToString(); if(e.Group.MembershipFee>0) this.checkbutton_mature.Active=true; if(this.already_member==true) { foreach(AvatarGroup avgroup in MainClass.win.avatarGroups) { if(avgroup.GroupID==this.groupkey) { //this.checkbutton_group_notices.Active= avgroup.AcceptNotices; //this.checkbutton_showinpofile.Active = avgroup.ListInProfile; break; } } } this.checkbutton_openenrolement.Active=e.Group.OpenEnrollment; this.checkbutton_showinsearch.Active=e.Group.ShowInList; this.checkbutton_mature.Active=e.Group.MaturePublish; this.textview_group_charter.Buffer.Text=e.Group.Charter; if((e.Group.Powers & GroupPowers.SendNotices)==GroupPowers.SendNotices) this.button_send_notice.Sensitive=true; else this.button_send_notice.Sensitive=false; TryGetImage img=new TryGetImage(this.image_group_emblem,e.Group.InsigniaID,128,128,false); this.label_name.Text=e.Group.Name; AsyncNameUpdate ud=new AsyncNameUpdate(e.Group.FounderID,false); ud.onNameCallBack += delegate(string namex,object[] values){this.label_foundedby.Text="Founded by "+namex;}; ud.go(); this.entry_enrollmentfee.Text=e.Group.MembershipFee.ToString(); if(e.Group.MembershipFee>0) this.checkbutton_mature.Active=true; this.checkbutton_openenrolement.Active=e.Group.OpenEnrollment; this.checkbutton_showinsearch.Active=e.Group.ShowInList; this.checkbutton_mature.Active=e.Group.MaturePublish; this.textview_group_charter.Buffer.Text=e.Group.Charter; if(!this.already_member) { if(e.Group.OpenEnrollment==true) this.button_join.Sensitive=true; } this.checkbutton_group_notices.Sensitive=this.already_member; this.checkbutton_showinpofile.Sensitive=this.already_member; }); }
bool updategroupmembers() { Logger.Log("Update group members",Helpers.LogLevel.Debug); List<UUID> names = new List<UUID>(); //??????????? // if (!MainClass.client.Groups.GroupMembersCaches.ContainsKey(request_members)) // return name_poll; // lock(MainClass.client.Groups.GroupMembersCaches) { foreach (KeyValuePair<UUID, GroupMember> member in group_members) { if (!rcvd_names.Contains(member.Key)) { rcvd_names.Add(member.Key); names.Add(member.Key); Gtk.TreeIter iter = store_members.AppendValues("Waiting...", member.Value.Title, member.Value.OnlineStatus, member.Value.ID); AsyncNameUpdate ud = new AsyncNameUpdate(member.Value.ID, false); ud.addparameters(iter); ud.onNameCallBack += delegate(string namex, object[] values) { if (nobody_cares) { return; } Gtk.TreeIter iterx = (Gtk.TreeIter)values[0]; store_members.SetValue(iterx, 0, namex); }; ud.go(); Gtk.TreeIter iter2 = store_membersandroles_members.AppendValues("Waiting...", member.Value.Contribution.ToString(), member.Value.Title, member.Value.ID); AsyncNameUpdate ud2 = new AsyncNameUpdate(member.Value.ID, false); ud2.addparameters(iter2); ud2.onNameCallBack += delegate(string namex, object[] values) { if (nobody_cares) { return; } Gtk.TreeIter iterx = (Gtk.TreeIter)values[0]; store_membersandroles_members.SetValue(iterx, 0, namex); }; ud2.go(); } } } MainClass.name_cache.reqnames(names); this.treeview_members.QueueDraw(); this.treeview_members1.QueueDraw(); return name_poll; }
void Directory_EventInfoReply(object sender, EventInfoReplyEventArgs e) { Gtk.Application.Invoke(delegate { this.entry_name.Text=e.MatchedEvent.Name; this.entry_date.Text=e.MatchedEvent.Date.ToString(); this.entry_location.Text=e.MatchedEvent.SimName; this.entry_cat.Text=e.MatchedEvent.Category.ToString(); AsyncNameUpdate ud=new AsyncNameUpdate(e.MatchedEvent.Creator,false); ud.onNameCallBack += delegate(string namex,object[] values){this.entry_organiser.Text=namex;}; ud.go(); this.entry_duration.Text=e.MatchedEvent.Duration.ToString(); this.textview_eventinfo.Buffer.Text=e.MatchedEvent.Desc; selected_event=e.MatchedEvent; this.button_notify.Sensitive=false; this.button_teleport.Sensitive=true; }); }
void Parcels_ParcelObjectOwnersReply(object sender, ParcelObjectOwnersReplyEventArgs e) { Gtk.Application.Invoke(delegate{ for(int i = 0; i < e.PrimOwners.Count; i++) { Logger.Log(e.PrimOwners[i].ToString(),Helpers.LogLevel.Debug); Gtk.TreeIter iter2=parcel_prim_owners.AppendValues("Waiting...",e.PrimOwners[i].Count.ToString(),e.PrimOwners[i].OwnerID); AsyncNameUpdate ud=new AsyncNameUpdate(e.PrimOwners[i].OwnerID,false); ud.addparameters(iter2); ud.onNameCallBack += delegate(string namex,object[] values){ Gtk.TreeIter iterx=(Gtk.TreeIter)values[0]; parcel_prim_owners.SetValue(iterx,0,namex);}; ud.go(); this.button_return_selected.Sensitive=true; } }); }
protected virtual void OnTreeviewParcelsCursorChanged(object sender, System.EventArgs e) { Gtk.TreeModel mod; Gtk.TreeIter iter; if(this.treeview_parcels.Selection.GetSelected(out mod,out iter)) { int id=(int)mod.GetValue(iter,6); selectedparcel=id; //this.image_parcel.Pixbuf=new Gdk.Pixbuf(parcel.Bitmap); parcels_access.Clear(); parcels_ban.Clear(); Parcel parcel; if(MainClass.client.Network.CurrentSim.Parcels.TryGetValue(id, out parcel)) { Logger.Log(parcel.Flags.ToString(),Helpers.LogLevel.Debug); this.checkbox_nopayment.Active = (OpenMetaverse.ParcelFlags.DenyAnonymous == (parcel.Flags & OpenMetaverse.ParcelFlags.DenyAnonymous)); this.checkbutton_noageverify.Active = (OpenMetaverse.ParcelFlags.DenyAgeUnverified == (parcel.Flags & OpenMetaverse.ParcelFlags.DenyAgeUnverified)); this.entry_time.Text = parcel.PassHours.ToString(); this.entry_price.Text = parcel.PassPrice.ToString(); this.checkbutton_publicaccess.Active = !(OpenMetaverse.ParcelFlags.UseAccessList == (parcel.Flags & OpenMetaverse.ParcelFlags.UseAccessList)); //this.checkbutton_sellpasses; this.checkbutton_groupaccess.Active = (OpenMetaverse.ParcelFlags.UseAccessGroup == (parcel.Flags & OpenMetaverse.ParcelFlags.UseAccessGroup)); this.entry_maxprims.Text = parcel.MaxPrims.ToString(); this.entry_primsgroup.Text = parcel.GroupPrims.ToString(); this.entry_bonus.Text = parcel.ParcelPrimBonus.ToString(); this.entry_primsowner.Text = parcel.OwnerPrims.ToString(); this.entry_primsother.Text = parcel.OtherPrims.ToString(); this.entry_totalprims.Text = parcel.TotalPrims.ToString(); this.parcel_image = parcel.SnapshotID; if (parcel.SnapshotID != UUID.Zero) { if (getter != null) getter.abort(); Logger.Log("** FETCHING A NEW IMAGE **" + parcel.SnapshotID.ToString(),Helpers.LogLevel.Debug); TryGetImage i = new TryGetImage(parcelsnapshot.baseimage, parcel.SnapshotID, 256, 256, true); i.OnDecodeComplete += delegate { parcelsnapshot.setimage(); }; i.OnUpdate += delegate { Gtk.Application.Invoke(delegate { parcelmap.forceupdate(); }); }; i.go(); getter = i; } else { //this.image_parcelsnap.Clear(); this.parcelsnapshot.clear(); } AsyncNameUpdate ud; this.label_parcelowner.Text = "Waiting..."; if (parcel.IsGroupOwned == false) { AsyncNameUpdate an; an = new AsyncNameUpdate(parcel.OwnerID, false); an.onNameCallBack += delegate(string namex, object[] values) { this.label_parcelowner.Text = namex; }; an.go(); } else { this.label_parcelowner.Text = "(group)"; } this.label_parcelgroup.Text = "Waiting..."; ud = new AsyncNameUpdate(parcel.GroupID, true); ud.onGroupNameCallBack += delegate(string namex, object[] values) { this.label_parcelgroup.Text = namex; }; ud.go(); foreach (OpenMetaverse.ParcelManager.ParcelAccessEntry entry in parcel.AccessWhiteList) { if(entry.AgentID==UUID.Zero) continue; Logger.Log(entry.AgentID.ToString()+" Flags = "+entry.Flags.ToString(),Helpers.LogLevel.Debug); Gtk.TreeIter iter2=this.parcels_access.AppendValues("Waiting..."); ud=new AsyncNameUpdate(entry.AgentID,false); ud.addparameters(iter2); ud.onNameCallBack += delegate(string namex,object[] values){ Gtk.TreeIter iterx=(Gtk.TreeIter)values[0]; this.parcels_access.SetValue(iterx,0,namex);}; ud.go(); } foreach(OpenMetaverse.ParcelManager.ParcelAccessEntry entry in parcel.AccessBlackList) { if(entry.AgentID==UUID.Zero) continue; Logger.Log(entry.AgentID.ToString()+" Flags = "+entry.Flags.ToString(),Helpers.LogLevel.Debug); Gtk.TreeIter iter2=this.parcels_ban.AppendValues("Waiting..."); AsyncNameUpdate ud2=new AsyncNameUpdate(entry.AgentID,false); ud2.addparameters(iter2); ud2.onNameCallBack += delegate(string namex,object[] values){ Gtk.TreeIter iterx=(Gtk.TreeIter)values[0]; this.parcels_ban.SetValue(iterx,0,namex);}; ud2.go(); } } bool allowed=false; if(parcel.OwnerID==MainClass.client.Self.AgentID) allowed=true; if (parcel.OwnerID == MainClass.client.Self.ActiveGroup) { // need to be parcel owner, or the land needs to be deeded to group // TODO if deeded to group we should also check we have approprate powers // within that group. allowed=true; } this.button1.Sensitive=allowed; if ((parcel.Flags & ParcelFlags.ForSale) == ParcelFlags.ForSale) { if (parcel.AuthBuyerID != UUID.Zero) { this.label_forsale.Text="Single AV"; AsyncNameUpdate ud=new AsyncNameUpdate(parcel.AuthBuyerID,false); ud.onNameCallBack += delegate(string namex,object[] values){ this.lable_forsaleto.Text=namex;}; ud.go(); this.label_price1.Text=parcel.SalePrice.ToString(); } else { this.label_forsale.Text="Yes"; this.label_price1.Text=parcel.SalePrice.ToString(); this.lable_forsaleto.Text="Anyone"; } } else { this.label_forsale.Text="No"; this.label_price1.Text=""; this.lable_forsaleto.Text=""; } } else { //Logger.Log("No parcel in dictionary for id "+id.ToString()+"\n",Helpers.LogLevel.Debug); } }
void updatestatusinfo(bool callback) { Parcel parcel; Vector3 pos = MainClass.client.Self.RelativePosition; //Clamp values, sim crossings can produce values outside the expected range my +-30m if (pos.Y > 255) pos.Y = 255; if (pos.X > 255) pos.X = 255; if (pos.Y < 0) pos.Y = 0; if (pos.X < 0) pos.X = 0; int parcelid = MainClass.client.Network.CurrentSim.ParcelMap[(int)(64.0 * (pos.Y/256.0)), (int)(64.0 * (pos.X/256))]; if (!callback && (parcelid == lastparcelid)) return; if (!MainClass.client.Network.CurrentSim.Parcels.TryGetValue(parcelid, out parcel)) return; if(lastparcelid != parcelid) { this.parcel_owner_name = "Waiting...."; this.parcel_group = "Waiting...."; this.current_parcelid=parcel.LocalID; this.is_parcel_owner=(parcel.OwnerID==MainClass.client.Self.AgentID); if (parcel.IsGroupOwned == false) { AsyncNameUpdate an; an = new AsyncNameUpdate(parcel.OwnerID, false); an.onNameCallBack += delegate(string namex, object[] values) { this.parcel_owner_name = namex; updatestatusinfo(true); }; an.go(); } else { this.parcel_owner_name = "(group)"; } AsyncNameUpdate an2 = new AsyncNameUpdate(parcel.GroupID, true); an2.onGroupNameCallBack += delegate(string namex, object[] values) { this.parcel_group = namex; updatestatusinfo(true); }; an2.go(); MainClass.client.Parcels.RequestDwell(MainClass.client.Network.CurrentSim,parcel.LocalID); lastparcelid = parcelid; Gtk.Application.Invoke(delegate { doicons(parcel); }); } string size; size = parcel.Area.ToString(); int primscount = parcel.OwnerPrims + parcel.OtherPrims + parcel.GroupPrims; string prims; prims = primscount.ToString() + " of " + parcel.MaxPrims; status_parcel.Text = parcel.Name; string tooltext; tooltext = parcel.Name + "\nOwner : " + this.parcel_owner_name + "\nGroup : " + this.parcel_group + "\nSize : " + size.ToString() + "\nPrims : " + prims.ToString() + "\nTraffic : " + this.current_parcel_dwell.ToString() + "\nArea : " + parcel.Area.ToString(); tooltips1.SetTip(this.statusbar1, tooltext, null); tooltips1.Enable(); }
protected virtual void OnTreeview1CursorChanged(object sender, System.EventArgs e) { Gtk.TreeModel mod; Gtk.TreeIter iter; this.button_lookat.Sensitive=true; this.button_siton.Sensitive=true; if(treeview1.Selection.GetSelected(out mod,out iter)) { UUID id=(UUID)mod.GetValue(iter,3); ulong handle=(ulong)mod.GetValue(iter,4); Primitive prim; if(FetchedPrims.TryGetValue(id,out prim)) { Logger.Log(prim.ToString(),Helpers.LogLevel.Debug); this.label_name.Text=prim.Properties.Name; this.label_desc.Text=prim.Properties.Description; AsyncNameUpdate ud=new AsyncNameUpdate(prim.Properties.OwnerID,false); ud.onNameCallBack += delegate(string namex,object[] values){label_owner.Text=namex;}; ud.go(); string group; if(!MainClass.client.Groups.GroupName2KeyCache.TryGetValue(prim.Properties.GroupID,out group)) { MainClass.client.Groups.RequestGroupName(prim.Properties.GroupID); group="Waiting..."; } this.label_group.Text=group; switch(prim.Properties.SaleType) { case OpenMetaverse.SaleType.Not: this.label_forsale.Text="Not for sale"; break; case OpenMetaverse.SaleType.Contents: this.label_forsale.Text="Contents for $L"+prim.Properties.SalePrice.ToString(); break; case OpenMetaverse.SaleType.Copy: this.label_forsale.Text="Copy for $L"+prim.Properties.SalePrice.ToString(); break; case OpenMetaverse.SaleType.Original: this.label_forsale.Text="Original for $L"+prim.Properties.SalePrice.ToString(); break; } this.button_lookat.Sensitive = true; if(prim.Properties.SaleType == OpenMetaverse.SaleType.Not) { this.button_buy.Sensitive=false; } else { this.button_buy.Sensitive=true; } if ((prim.Flags & PrimFlags.Touch) == PrimFlags.Touch) { this.button_touch.Sensitive=true; } else { this.button_touch.Sensitive=false; } if ((prim.Flags & PrimFlags.Money) == PrimFlags.Money) { this.button_pay.Sensitive=true; } else { this.button_pay.Sensitive=false; } this.label_key.Text=prim.ID.ToString(); this.label_pos.Text=prim.Position.ToString(); this.label_distance.Text=Vector3d.Distance(MainClass.client.Self.GlobalPosition,AutoPilot.localtoglobalpos(prim.Position,handle)).ToString()+" m"; this.button_take_copy.Sensitive=((prim.Flags & PrimFlags.ObjectCopy)==PrimFlags.ObjectCopy); Logger.Log(prim.Flags.ToString(),Helpers.LogLevel.Debug); this.textview1.Buffer.SetText(prim.Flags.ToString()); if((prim.Flags & PrimFlags.ObjectYouOwner)==PrimFlags.ObjectYouOwner) { this.button_take.Sensitive=true; } else { this.button_take.Sensitive=false; } this.label_float_text.Text=prim.Text; this.button_moveto.Sensitive=true; //MainClass.client.Parcels.ReturnObjects(MainClass.client.Network.CurrentSim,,ObjectReturnType.Other, bool allowed=false; uint x,y; x=(uint)(64*(prim.Position.X/256)); y=(uint)(64*(prim.Position.Y/256)); int parcelid=MainClass.client.Network.CurrentSim.ParcelMap[y,x]; //If avatar owns the parcel they are allowed. //If they are in the group that owns the parcel AND have the correct group permissions AND have the group tag they are allowed if(MainClass.client.Network.CurrentSim.Parcels.ContainsKey(parcelid)) { Parcel parcel; parcel=MainClass.client.Network.CurrentSim.Parcels[parcelid]; if(parcel.OwnerID==MainClass.client.Self.AgentID) allowed=true; if (parcel.OwnerID == MainClass.client.Self.ActiveGroup || parcel.GroupID==MainClass.client.Self.ActiveGroup) { if(prim.GroupID==parcel.GroupID) if((MainClass.client.Self.ActiveGroupPowers & GroupPowers.ReturnGroupSet)==GroupPowers.ReturnGroupOwned) allowed=true; if(prim.OwnerID==parcel.GroupID) if((MainClass.client.Self.ActiveGroupPowers & GroupPowers.ReturnGroupOwned)==GroupPowers.ReturnGroupOwned) allowed=true; if(prim.OwnerID!=parcel.GroupID && prim.GroupID!=parcel.GroupID) if((MainClass.client.Self.ActiveGroupPowers & GroupPowers.ReturnNonGroup)==GroupPowers.ReturnNonGroup) allowed=true; } } } } }
bool kickrefresh() { if (running == false) return false; if (MainClass.client == null) return true; if (MainClass.client.Network.CurrentSim == null) return true; if (MainClass.client.Network.CurrentSim.ObjectsAvatars == null) return true; MainClass.client.Network.Simulators.ForEach(delegate(Simulator sim) { sim.AvatarPositions.ForEach(delegate(KeyValuePair<UUID, Vector3> kvp) { if (kvp.Key != MainClass.client.Self.AgentID) { if (!this.av_tree.ContainsKey(kvp.Key)) { Gtk.TreeIter iter; iter = store.AppendValues("", "Waiting...", "", "",kvp.Key); av_tree.Add(kvp.Key, iter); AsyncNameUpdate ud = new AsyncNameUpdate(kvp.Key, false); ud.onNameCallBack += delegate(string name, object[] values) { // We need to check that this iter still exists if (av_tree.ContainsKey(kvp.Key)) { store.SetValue(iter, 1, name); } }; ud.go(); } } }); }); calcdistance(); clientpoke(); return true; }