mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-23 00:18:46 +00:00
Use explicit type when not apparent
This commit is contained in:
parent
b871b8e74c
commit
7e69bdce39
@ -1,6 +1,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using VpSharp.ClientExtensions;
|
using VpSharp.ClientExtensions;
|
||||||
using VpSharp.Commands.Attributes;
|
using VpSharp.Commands.Attributes;
|
||||||
|
using VpSharp.Entities;
|
||||||
using VpSharp.EventData;
|
using VpSharp.EventData;
|
||||||
|
|
||||||
namespace VpSharp.Commands;
|
namespace VpSharp.Commands;
|
||||||
@ -133,7 +134,7 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
|
|||||||
protected override Task OnMessageReceived(MessageReceivedEventArgs args)
|
protected override Task OnMessageReceived(MessageReceivedEventArgs args)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(args);
|
ArgumentNullException.ThrowIfNull(args);
|
||||||
var message = args.Message;
|
VirtualParadiseMessage message = args.Message;
|
||||||
|
|
||||||
if (message.Type != MessageType.ChatMessage)
|
if (message.Type != MessageType.ChatMessage)
|
||||||
{
|
{
|
||||||
|
@ -165,8 +165,8 @@ public sealed partial class VirtualParadiseClient
|
|||||||
session = vp_int(sender, IntegerAttribute.AvatarSession);
|
session = vp_int(sender, IntegerAttribute.AvatarSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualParadiseObject? virtualParadiseObject = await ExtractObjectAsync(sender).ConfigureAwait(false);
|
VirtualParadiseObject virtualParadiseObject = await ExtractObjectAsync(sender).ConfigureAwait(false);
|
||||||
var cell = virtualParadiseObject.Location.Cell;
|
Cell cell = virtualParadiseObject.Location.Cell;
|
||||||
|
|
||||||
virtualParadiseObject = AddOrUpdateObject(virtualParadiseObject);
|
virtualParadiseObject = AddOrUpdateObject(virtualParadiseObject);
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ public sealed partial class VirtualParadiseClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
VirtualParadiseAvatar? avatar = GetAvatar(session);
|
VirtualParadiseAvatar? avatar = GetAvatar(session);
|
||||||
var virtualParadiseObject = await GetObjectAsync(objectId).ConfigureAwait(false);
|
VirtualParadiseObject virtualParadiseObject = await GetObjectAsync(objectId).ConfigureAwait(false);
|
||||||
var args = new ObjectClickedEventArgs(avatar, virtualParadiseObject, clickPoint);
|
var args = new ObjectClickedEventArgs(avatar, virtualParadiseObject, clickPoint);
|
||||||
RaiseEvent(ObjectClicked, args);
|
RaiseEvent(ObjectClicked, args);
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ public sealed partial class VirtualParadiseClient : IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var avatar = CurrentAvatar;
|
VirtualParadiseAvatar? avatar = CurrentAvatar;
|
||||||
return Task.FromResult(new VirtualParadiseMessage(
|
return Task.FromResult(new VirtualParadiseMessage(
|
||||||
MessageType.ChatMessage,
|
MessageType.ChatMessage,
|
||||||
avatar!.Name,
|
avatar!.Name,
|
||||||
|
Loading…
Reference in New Issue
Block a user