From 63483a81c7ba9a13051dfdafbebb06553e0f6559 Mon Sep 17 00:00:00 2001 From: cinder Date: Wed, 13 Aug 2025 14:52:31 -0500 Subject: [PATCH] Minor changes --- LibreMetaverse.Types/UtilsConversions.cs | 2 +- LibreMetaverse/AvatarManager.cs | 8 +++----- LibreMetaverse/GridManager.cs | 18 ++++++++---------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/LibreMetaverse.Types/UtilsConversions.cs b/LibreMetaverse.Types/UtilsConversions.cs index 576092ec..5f1a3e1c 100644 --- a/LibreMetaverse.Types/UtilsConversions.cs +++ b/LibreMetaverse.Types/UtilsConversions.cs @@ -1127,7 +1127,7 @@ namespace OpenMetaverse } /// - /// Packs to 32-bit unsigned integers in to a 64-bit unsigned integer + /// Packs two 32-bit unsigned integers in to a 64-bit unsigned integer /// /// The left-hand (or X) value /// The right-hand (or Y) value diff --git a/LibreMetaverse/AvatarManager.cs b/LibreMetaverse/AvatarManager.cs index 99efca9f..778dc120 100644 --- a/LibreMetaverse/AvatarManager.cs +++ b/LibreMetaverse/AvatarManager.cs @@ -28,10 +28,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; -using OpenMetaverse.Http; using OpenMetaverse.Packets; using OpenMetaverse.Interfaces; using OpenMetaverse.Messages.Linden; @@ -169,7 +167,7 @@ namespace OpenMetaverse public struct ClassifiedAd { public UUID ClassifiedID; - public uint Catagory; + public uint Category; public UUID ParcelID; public uint ParentEstate; public UUID SnapShotID; @@ -681,7 +679,7 @@ namespace OpenMetaverse Client.Network.SendPacket(request); } - // Get any remaining names after left after the full requests + // Get any remaining names left after the full requests if (ids.Count > n * m) { request = new UUIDNameRequestPacket @@ -1533,7 +1531,7 @@ namespace OpenMetaverse Price = p.Data.PriceForListing, ParentEstate = p.Data.ParentEstate, ClassifiedFlags = p.Data.ClassifiedFlags, - Catagory = p.Data.Category + Category = p.Data.Category }; OnClassifiedInfoReply(new ClassifiedInfoReplyEventArgs(ret.ClassifiedID, ret)); diff --git a/LibreMetaverse/GridManager.cs b/LibreMetaverse/GridManager.cs index 50aaceba..c49815cf 100644 --- a/LibreMetaverse/GridManager.cs +++ b/LibreMetaverse/GridManager.cs @@ -1,6 +1,6 @@ /* * Copyright (c) 2006-2016, openmetaverse.co - * Copyright (c) 2022, Sjofn, LLC. + * Copyright (c) 2022-2025, Sjofn, LLC. * All rights reserved. * * - Redistribution and use in source and binary forms, with or without @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Linq; using System.Threading; using OpenMetaverse.StructuredData; @@ -160,16 +159,15 @@ namespace OpenMetaverse public uint GlobalY; /// Get the Local X position of the item - public uint LocalX { get { return GlobalX % Simulator.DefaultRegionSizeX; } } + public uint LocalX => GlobalX % Simulator.DefaultRegionSizeX; + /// Get the Local Y position of the item - public uint LocalY { get { return GlobalY % Simulator.DefaultRegionSizeY; } } + public uint LocalY => GlobalY % Simulator.DefaultRegionSizeY; /// Get the Handle of the region - public ulong RegionHandle - { - get { return Utils.UIntsToLong((uint)(GlobalX - (GlobalX % Simulator.DefaultRegionSizeX)), - (uint)(GlobalY - (GlobalY % Simulator.DefaultRegionSizeY))); } - } + public ulong RegionHandle => + Utils.UIntsToLong((uint)(GlobalX - (GlobalX % Simulator.DefaultRegionSizeX)), + (uint)(GlobalY - (GlobalY % Simulator.DefaultRegionSizeY))); } /// @@ -663,7 +661,7 @@ namespace OpenMetaverse void Callback(object sender, GridRegionEventArgs e) { - if (e.Region.Name.ToLowerInvariant() == name.ToLowerInvariant()) + if (string.Equals(e.Region.Name, name, StringComparison.InvariantCultureIgnoreCase)) { regionEvent.Set(); }