Revert "feat(B.5): pickup feedback chat line + toast ("You pick up the X.")"
This reverts commit 87ba5c9a98.
This commit is contained in:
parent
7be13938bc
commit
20ecb23396
2 changed files with 2 additions and 32 deletions
|
|
@ -1921,17 +1921,6 @@ public sealed class GameWindow : IDisposable
|
||||||
_liveSession.PlayerKilledReceived += pk =>
|
_liveSession.PlayerKilledReceived += pk =>
|
||||||
Chat.OnPlayerKilled(pk.DeathMessage, pk.VictimGuid, pk.KillerGuid);
|
Chat.OnPlayerKilled(pk.DeathMessage, pk.VictimGuid, pk.KillerGuid);
|
||||||
|
|
||||||
// B.5 polish (2026-05-14): surface successful pickups as a
|
|
||||||
// retail-style "You pick up the X." system chat line plus a
|
|
||||||
// toast. PickupEvent fires BEFORE the EntityDeleted despawn
|
|
||||||
// chain so the entity-name lookup still hits.
|
|
||||||
_liveSession.EntityPickedUp += parsed =>
|
|
||||||
{
|
|
||||||
string name = DescribeLiveEntity(parsed.Guid);
|
|
||||||
Chat.OnSystemMessage($"You pick up the {name}.", chatType: 0);
|
|
||||||
_debugVm?.AddToast($"Picked up: {name}");
|
|
||||||
};
|
|
||||||
|
|
||||||
_liveSession.TurbineChatReceived += parsed =>
|
_liveSession.TurbineChatReceived += parsed =>
|
||||||
{
|
{
|
||||||
if (parsed.Body is AcDream.Core.Net.Messages.TurbineChat.Payload.EventSendToRoom ev)
|
if (parsed.Body is AcDream.Core.Net.Messages.TurbineChat.Payload.EventSendToRoom ev)
|
||||||
|
|
|
||||||
|
|
@ -84,17 +84,6 @@ public sealed class WorldSession : IDisposable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<DeleteObject.Parsed>? EntityDeleted;
|
public event Action<DeleteObject.Parsed>? EntityDeleted;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fires when the session parses a 0xF74A PickupEvent game message —
|
|
||||||
/// distinguishes a despawn caused by a player pickup from a generic
|
|
||||||
/// <c>DeleteObject</c> despawn. Fires BEFORE <see cref="EntityDeleted"/>
|
|
||||||
/// for the same guid so subscribers can read entity state (e.g. name)
|
|
||||||
/// before the despawn handler removes the entity. Useful for "You pick
|
|
||||||
/// up the <i>X</i>" chat/toast feedback that needs the entity's display
|
|
||||||
/// name at the moment of pickup.
|
|
||||||
/// </summary>
|
|
||||||
public event Action<PickupEvent.Parsed>? EntityPickedUp;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Payload for <see cref="MotionUpdated"/>: the server guid of the entity
|
/// Payload for <see cref="MotionUpdated"/>: the server guid of the entity
|
||||||
/// whose motion changed and its new server-side stance + forward command.
|
/// whose motion changed and its new server-side stance + forward command.
|
||||||
|
|
@ -728,22 +717,14 @@ public sealed class WorldSession : IDisposable
|
||||||
// ACE sends PickupEvent (0xF74A) instead of DeleteObject
|
// ACE sends PickupEvent (0xF74A) instead of DeleteObject
|
||||||
// when a player picks up a world item (Player_Tracking
|
// when a player picks up a world item (Player_Tracking
|
||||||
// .RemoveTrackedObject with fromPickup=true). Downstream
|
// .RemoveTrackedObject with fromPickup=true). Downstream
|
||||||
// view-removal semantics are identical to DeleteObject, so
|
// view-removal semantics are identical, so we adapt to
|
||||||
// we adapt to DeleteObject.Parsed and reuse the existing
|
// DeleteObject.Parsed and reuse the existing handler.
|
||||||
// EntityDeleted handler. We also fire a distinct
|
|
||||||
// EntityPickedUp event BEFORE the despawn so a subscriber
|
|
||||||
// can read entity-side state (e.g. its display name) for
|
|
||||||
// pickup-feedback chat / toast lines while the entity is
|
|
||||||
// still resident.
|
|
||||||
var parsed = PickupEvent.TryParse(body);
|
var parsed = PickupEvent.TryParse(body);
|
||||||
if (parsed is not null)
|
if (parsed is not null)
|
||||||
{
|
|
||||||
EntityPickedUp?.Invoke(parsed.Value);
|
|
||||||
EntityDeleted?.Invoke(
|
EntityDeleted?.Invoke(
|
||||||
new DeleteObject.Parsed(
|
new DeleteObject.Parsed(
|
||||||
parsed.Value.Guid, parsed.Value.InstanceSequence));
|
parsed.Value.Guid, parsed.Value.InstanceSequence));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (op == UpdateMotion.Opcode)
|
else if (op == UpdateMotion.Opcode)
|
||||||
{
|
{
|
||||||
// Phase 6.6: the server sends UpdateMotion (0xF74C) whenever an
|
// Phase 6.6: the server sends UpdateMotion (0xF74C) whenever an
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue