mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* removing duplicate defaults for Attackable and Tolerance * ObjectDescriptionFlags refactoring * fixing container bug * adding comments * adding comments, fixing typo * CombatPet Attackable * GetCleaveTarget() * ensuring contained containers are openable * do not persist adminVision * suggested openable fix * simplify openable * IsOpen
29 lines
968 B
C#
29 lines
968 B
C#
|
|
using ACE.Entity.Enum;
|
|
using ACE.Server.WorldObjects;
|
|
using System.Linq;
|
|
|
|
namespace ACE.Server.Network.GameEvent.Events
|
|
{
|
|
public class GameEventViewContents : GameEventMessage
|
|
{
|
|
public GameEventViewContents(Session session, Container container)
|
|
: base(GameEventType.ViewContents, GameMessageGroup.UIQueue, session)
|
|
{
|
|
Writer.Write(container.Guid.Full);
|
|
|
|
Writer.Write((uint)container.Inventory.Count);
|
|
foreach (var inv in container.Inventory.Values.OrderBy(x => x.PlacementPosition))
|
|
{
|
|
Writer.Write(inv.Guid.Full);
|
|
|
|
if (inv.WeenieType == WeenieType.Container)
|
|
Writer.Write((uint)ContainerType.Container);
|
|
else if (inv.RequiresPackSlot)
|
|
Writer.Write((uint)ContainerType.Foci);
|
|
else
|
|
Writer.Write((uint)ContainerType.NonContainer);
|
|
}
|
|
}
|
|
}
|
|
}
|