mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-10 03:35:42 +00:00
fix: suppress events on obj query fail
This commit is contained in:
parent
67387f567d
commit
f385ba867e
@ -263,10 +263,17 @@ public sealed partial class VirtualParadiseClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
VirtualParadiseAvatar avatar = GetAvatar(session)!;
|
VirtualParadiseAvatar avatar = GetAvatar(session)!;
|
||||||
|
try
|
||||||
|
{
|
||||||
VirtualParadiseObject 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);
|
||||||
_objectClicked.OnNext(args);
|
_objectClicked.OnNext(args);
|
||||||
}
|
}
|
||||||
|
catch (ObjectNotFoundException)
|
||||||
|
{
|
||||||
|
// ignored
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async void OnWorldListNativeEvent(nint sender)
|
private async void OnWorldListNativeEvent(nint sender)
|
||||||
{
|
{
|
||||||
@ -468,11 +475,17 @@ public sealed partial class VirtualParadiseClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
VirtualParadiseAvatar avatar = GetAvatar(session)!;
|
VirtualParadiseAvatar avatar = GetAvatar(session)!;
|
||||||
|
try
|
||||||
|
{
|
||||||
var vpObject = await GetObjectAsync(objectId).ConfigureAwait(false);
|
var vpObject = await GetObjectAsync(objectId).ConfigureAwait(false);
|
||||||
|
|
||||||
var args = new ObjectBumpEventArgs(avatar, vpObject, BumpPhase.End);
|
var args = new ObjectBumpEventArgs(avatar, vpObject, BumpPhase.End);
|
||||||
_objectBump.OnNext(args);
|
_objectBump.OnNext(args);
|
||||||
}
|
}
|
||||||
|
catch (ObjectNotFoundException)
|
||||||
|
{
|
||||||
|
// ignored
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnUrlNativeEvent(nint sender)
|
private void OnUrlNativeEvent(nint sender)
|
||||||
{
|
{
|
||||||
@ -510,11 +523,17 @@ public sealed partial class VirtualParadiseClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
VirtualParadiseAvatar avatar = GetAvatar(session)!;
|
VirtualParadiseAvatar avatar = GetAvatar(session)!;
|
||||||
|
try
|
||||||
|
{
|
||||||
var vpObject = await GetObjectAsync(objectId).ConfigureAwait(false);
|
var vpObject = await GetObjectAsync(objectId).ConfigureAwait(false);
|
||||||
|
|
||||||
var args = new ObjectBumpEventArgs(avatar, vpObject, BumpPhase.Begin);
|
var args = new ObjectBumpEventArgs(avatar, vpObject, BumpPhase.Begin);
|
||||||
_objectBump.OnNext(args);
|
_objectBump.OnNext(args);
|
||||||
}
|
}
|
||||||
|
catch (ObjectNotFoundException)
|
||||||
|
{
|
||||||
|
// ignored
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async void OnJoinNativeEvent(nint sender)
|
private async void OnJoinNativeEvent(nint sender)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user