예제 #1
0
 public FieldNPCSpeaker(
     ConversationContext context,
     FieldNPC fieldNPC
     ) : base(context)
 {
     _fieldNPC = fieldNPC;
 }
예제 #2
0
        public override async Task Handle(RecvPacketOperations operation, IPacket packet, FieldNPC npc)
        {
            using var p = new Packet(SendPacketOperations.NpcMove);
            p.Encode <int>(npc.ID);
            p.Encode <byte>(packet.Decode <byte>()); // TODO: validate acts
            p.Encode <byte>(packet.Decode <byte>());

            if (npc.Template.Move)
            {
                npc.Move(packet).Encode(p);
            }

            await npc.Field.BroadcastPacket(p);
        }
예제 #3
0
 public abstract Task Handle(RecvPacketOperations operation, IPacket packet, FieldNPC npc);