Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Sulakore.Network.Protocol;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace YourrrrrrrrrrrrrMom
- {
- class WallItem
- {
- public int typeId { get; set; }
- public int furniId { get; set; }
- public int ownerId { get; set; }
- public int isClickable { get; set; }
- public int rentTime { get; set; }
- public string state { get; set; }
- public string position { get; set; }
- public WallItem(int furniId, int typeId, string position, string state, int rentTime, int isClickable, int ownerId)
- {
- this.typeId = typeId;
- this.furniId = furniId;
- this.ownerId = ownerId;
- this.isClickable = isClickable;
- this.rentTime = rentTime;
- this.state = state;
- this.position = position;
- }
- public static List<WallItem> ParseWallItems(HPacket packet)
- {
- List<WallItem> resultList = new List<WallItem>();
- int amountowners = packet.ReadInt32();
- for (int i = 0; i < amountowners; i++)
- {
- packet.ReadInt32();
- packet.ReadUTF8();
- }
- int amountitems = packet.ReadInt32();
- for (int i = 0; i < amountitems; i++)
- {
- resultList.Add(
- new WallItem(
- int.Parse(packet.ReadUTF8()),
- packet.ReadInt32(),
- packet.ReadUTF8(),
- packet.ReadUTF8(),
- packet.ReadInt32(),
- packet.ReadInt32(),
- packet.ReadInt32()
- )
- );
- }
- return resultList;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement