private void WriteFloorItem(Item item, int userId) { WriteInteger(item.Id); WriteInteger(item.GetBaseItem().SpriteId); WriteInteger(item.GetX); WriteInteger(item.GetY); WriteInteger(item.Rotation); WriteString($"{TextHandling.GetString(item.GetZ):0.00}"); WriteString(string.Empty); if (item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(item.ExtraData); WriteInteger(item.LimitedNo); WriteInteger(item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(item, this); } WriteInteger(-1); // to-do: check WriteInteger(item.GetBaseItem().Modes > 1 ? 1 : 0); WriteInteger(userId); }
public ObjectAddComposer(Item item) : base(ServerPacketHeader.ObjectAddMessageComposer) { WriteInteger(item.Id); WriteInteger(item.GetBaseItem().SpriteId); WriteInteger(item.GetX); WriteInteger(item.GetY); WriteInteger(item.Rotation); WriteString($"{TextHandling.GetString(item.GetZ):0.00}"); WriteString(string.Empty); if (item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(item.ExtraData); WriteInteger(item.LimitedNo); WriteInteger(item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(item, this); } WriteInteger(-1); // to-do: check WriteInteger(item.GetBaseItem().Modes > 1 ? 1 : 0); WriteInteger(item.UserId); WriteString(item.Username); }
public ObjectUpdateComposer(Item Item, int UserId, bool HideWired = false) : base(ServerPacketHeader.ObjectUpdateMessageComposer) { WriteInteger(Item.Id); WriteInteger((HideWired && WiredUtillity.TypeIsWired(Item.GetBaseItem().InteractionType) && (Item.GetBaseItem().InteractionType != InteractionType.highscore && Item.GetBaseItem().InteractionType != InteractionType.highscorepoints)) ? 31294061 : Item.GetBaseItem().SpriteId); WriteInteger(Item.GetX); WriteInteger(Item.GetY); WriteInteger(Item.Rotation); WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); WriteString(String.Empty); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteInteger(-1); // to-do: check WriteInteger(1); //(Item.GetBaseItem().Modes > 1) ? 1 : 0 WriteInteger(UserId); }
public FurniListAddComposer(Item Item) : base(ServerPacketHeader.FurniListAddMessageComposer) { WriteInteger(Item.Id); WriteString(Item.GetBaseItem().Type.ToString().ToUpper()); WriteInteger(Item.Id); WriteInteger(Item.GetBaseItem().SpriteId); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteBoolean(Item.GetBaseItem().AllowEcotronRecycle); WriteBoolean(Item.GetBaseItem().AllowTrade); WriteBoolean(Item.LimitedNo == 0 ? Item.GetBaseItem().AllowInventoryStack : false); WriteBoolean(ItemUtility.IsRare(Item)); WriteInteger(-1); //Seconds to expiration. WriteBoolean(true); WriteInteger(-1); //Item RoomId if (!Item.IsWallItem) { WriteString(string.Empty); WriteInteger(0); } }
private void WriteFloorItem(Item Item, int UserID) { WriteInteger(Item.Id); WriteInteger(Item.GetBaseItem().SpriteId); WriteInteger(Item.GetX); WriteInteger(Item.GetY); WriteInteger(Item.Rotation); WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); WriteString(String.Empty); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteInteger(-1); // to-do: check WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); WriteInteger(UserID); }
public ObjectUpdateComposer(Item Item, int UserId) : base(ServerPacketHeader.ObjectUpdateMessageComposer) { WriteInteger(Item.Id); WriteInteger(Item.GetBaseItem().SpriteId); WriteInteger(Item.GetX); WriteInteger(Item.GetY); WriteInteger(Item.Rotation); WriteString(string.Format("{0:0.00}", StringUtilities.GetString(Item.GetZ))); WriteString(string.Empty); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteInteger(-1); // to-do: check WriteInteger(Item.GetBaseItem().Modes > 1 ? 1 : 0); WriteInteger(UserId); }
public override void Compose(ServerPacket packet) { packet.WriteInteger(Item.Id); packet.WriteString(Item.GetBaseItem().Type.ToString().ToUpper()); packet.WriteInteger(Item.Id); packet.WriteInteger(Item.GetBaseItem().SpriteId); if (Item.LimitedNo > 0) { packet.WriteInteger(1); packet.WriteInteger(256); packet.WriteString(Item.ExtraData); packet.WriteInteger(Item.LimitedNo); packet.WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, packet); } packet.WriteBoolean(Item.GetBaseItem().AllowEcotronRecycle); packet.WriteBoolean(Item.GetBaseItem().AllowTrade); packet.WriteBoolean(Item.LimitedNo == 0 ? Item.GetBaseItem().AllowInventoryStack : false); packet.WriteBoolean(ItemUtility.IsRare(Item)); packet.WriteInteger(-1); //Seconds to expiration. packet.WriteBoolean(true); packet.WriteInteger(-1); //Item RoomId if (!Item.IsWallItem) { packet.WriteString(string.Empty); packet.WriteInteger(0); } }
public ObjectAddComposer(Item Item, Room Room) : base(ServerPacketHeader.ObjectAddMessageComposer) { base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); base.WriteInteger(Item.GetX); base.WriteInteger(Item.GetY); base.WriteInteger(Item.Rotation); base.WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); base.WriteString(String.Empty); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } base.WriteInteger(-1); // to-do: check base.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); base.WriteInteger(Item.UserID); base.WriteString(Item.Username); }
private void WriteItem(Item Item) { base.WriteInteger(Item.Id); base.WriteString(Item.GetBaseItem().Type.ToString().ToUpper()); base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } base.WriteBoolean(Item.GetBaseItem().AllowEcotronRecycle); base.WriteBoolean(Item.GetBaseItem().AllowTrade); base.WriteBoolean(Item.LimitedNo == 0 ? Item.GetBaseItem().AllowInventoryStack : false); base.WriteBoolean(ItemUtility.IsRare(Item)); base.WriteInteger(-1); //Seconds to expiration. base.WriteBoolean(true); base.WriteInteger(-1); //Item RoomId if (!Item.IsWallItem) { base.WriteString(string.Empty); base.WriteInteger(0); } }
private void WriteFloorItem(Item Item, int UserID, bool HideWired) { WriteInteger(Item.Id); WriteInteger((HideWired && WiredUtillity.TypeIsWired(Item.GetBaseItem().InteractionType) && (Item.GetBaseItem().InteractionType != InteractionType.highscore && Item.GetBaseItem().InteractionType != InteractionType.highscorepoints)) ? 31294061 : Item.GetBaseItem().SpriteId); WriteInteger(Item.GetX); WriteInteger(Item.GetY); WriteInteger(Item.Rotation); WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); WriteString(String.Empty); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteInteger(-1); // to-do: check WriteInteger(1); //(Item.GetBaseItem().Modes > 1) ? 1 : 0 WriteInteger(UserID); }
public override void Compose(ServerPacket packet) { packet.WriteInteger(Item.Id); packet.WriteInteger(Item.GetBaseItem().SpriteId); packet.WriteInteger(Item.GetX); packet.WriteInteger(Item.GetY); packet.WriteInteger(Item.Rotation); packet.WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); packet.WriteString(String.Empty); if (Item.LimitedNo > 0) { packet.WriteInteger(1); packet.WriteInteger(256); packet.WriteString(Item.ExtraData); packet.WriteInteger(Item.LimitedNo); packet.WriteInteger(Item.LimitedTot); } else { ItemBehaviourUtility.GenerateExtradata(Item, packet); } packet.WriteInteger(-1); // to-do: check packet.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); packet.WriteInteger(Item.UserID); packet.WriteString(Item.Username); }
public override void Compose(ServerPacket packet) { packet.WriteString(Item.Id.ToString()); packet.WriteInteger(Item.GetBaseItem().SpriteId); packet.WriteString(Item.wallCoord != null ? Item.wallCoord : string.Empty); ItemBehaviourUtility.GenerateWallExtradata(Item, packet); packet.WriteInteger(-1); packet.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); // Type New R63 ('use bottom') packet.WriteInteger(Item.UserID); packet.WriteString(Item.Username); }
public ItemAddComposer(Item item) : base(ServerPacketHeader.ItemAddMessageComposer) { WriteString(item.Id.ToString()); WriteInteger(item.GetBaseItem().SpriteId); WriteString(item.WallCoord ?? string.Empty); ItemBehaviourUtility.GenerateWallExtradata(item, this); WriteInteger(-1); WriteInteger(item.GetBaseItem().Modes > 1 ? 1 : 0); // Type New R63 ('use bottom') WriteInteger(item.UserId); WriteString(item.Username); }
public ItemAddComposer(Item Item) : base(ServerPacketHeader.ItemAddMessageComposer) { base.WriteString(Item.Id.ToString()); base.WriteInteger(Item.GetBaseItem().SpriteId); base.WriteString(Item.wallCoord != null ? Item.wallCoord : string.Empty); ItemBehaviourUtility.GenerateWallExtradata(Item, this); base.WriteInteger(-1); base.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); // Type New R63 ('use bottom') base.WriteInteger(Item.UserID); base.WriteString(Item.Username); }
private void WriteWallItem(Item Item, int UserId) { WriteString(Item.Id.ToString()); WriteInteger(Item.Data.SpriteId); try { WriteString(Item.wallCoord); } catch { WriteString(""); } ItemBehaviourUtility.GenerateWallExtradata(Item, this); WriteInteger(-1); WriteInteger((Item.Data.Modes > 1) ? 1 : 0); WriteInteger(UserId); }
private void WriteWallItem(Item Item, int UserId, ServerPacket packet) { packet.WriteString(Item.Id.ToString()); packet.WriteInteger(Item.Data.SpriteId); try { packet.WriteString(Item.wallCoord); } catch { packet.WriteString(""); } ItemBehaviourUtility.GenerateWallExtradata(Item, packet); packet.WriteInteger(-1); packet.WriteInteger((Item.Data.Modes > 1) ? 1 : 0); packet.WriteInteger(UserId); }
public ObjectUpdateComposer(Item Item, int UserId) : base(ServerPacketHeader.ObjectUpdateMessageComposer) { base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); base.WriteInteger(Item.GetX); base.WriteInteger(Item.GetY); base.WriteInteger(Item.Rotation); base.WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); base.WriteString(String.Empty); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else if (Item.Data.InteractionType == InteractionType.INFO_TERMINAL || Item.Data.InteractionType == InteractionType.ROOM_PROVIDER) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("internalLink"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.FX_PROVIDER) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("effectId"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.PINATA) { base.WriteInteger(0); base.WriteInteger(7); if (Item.ExtraData.Length <= 0) { base.WriteString("6"); base.WriteInteger(0); } else { base.WriteString((int.Parse(Item.ExtraData) == 1) ? "8" : "6"); base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.PLANT_SEED) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(12); } else if (Item.Data.InteractionType == InteractionType.PINATATRIGGERED) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString((Item.ExtraData.Length <= 0) ? "0" : "2"); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.EASTEREGG) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(20); } else if (Item.Data.InteractionType == InteractionType.MAGICEGG) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(23); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } base.WriteInteger(-1); // to-do: check base.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); base.WriteInteger(UserId); }
public ObjectAddComposer(Item Item, Room Room) : base(ServerPacketHeader.ObjectAddMessageComposer) { base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); base.WriteInteger(Item.GetX); base.WriteInteger(Item.GetY); base.WriteInteger(Item.Rotation); base.WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); base.WriteString(String.Empty); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else if (Item.Data.InteractionType == InteractionType.INFO_TERMINAL) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("internalLink"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.FX_PROVIDER) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("effectId"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.PINATA /*||Item.Data.InteractionType == InteractionType.PINATATRIGGERED*/) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString("6"); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(100); } else if (Item.Data.InteractionType == InteractionType.MAGICEGG) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(50); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } base.WriteInteger(-1); // to-do: check base.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); base.WriteInteger(Item.UserID); base.WriteString(Item.Username); }
public ObjectUpdateComposer(Item Item, int UserId) : base(ServerPacketHeader.ObjectUpdateMessageComposer) { WriteInteger(Item.Id); WriteInteger(Item.GetBaseItem().SpriteId); WriteInteger(Item.GetX); WriteInteger(Item.GetY); WriteInteger(Item.Rotation); WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); WriteString(String.Empty); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else if (Item.Data.InteractionType == InteractionType.INFO_TERMINAL) { WriteInteger(0); WriteInteger(1); WriteInteger(1); WriteString("internalLink"); WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.FX_PROVIDER) { WriteInteger(0); WriteInteger(1); WriteInteger(1); WriteString("effectId"); WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.PINATA) { WriteInteger(0); WriteInteger(7); if (Item.ExtraData.Length <= 0) { WriteString("6"); WriteInteger(0); } else { WriteString((int.Parse(Item.ExtraData) == 1) ? "8" : "6"); WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.PINATATRIGGERED) { WriteInteger(0); WriteInteger(7); // miran2 grafic xq no c acuerda xdddddd kva men xDDDDDDDD esk me mandaron un guasap menju eeeer xqude popddddduddddddddddddddddxdd WriteString((Item.ExtraData.Length <= 0) ? "0" : "2"); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.MAGICEGG) { WriteInteger(0); WriteInteger(7); WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(23); } else if (Item.Data.InteractionType == InteractionType.MAGICCHEST) { WriteInteger(0); WriteInteger(7); WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(1); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteInteger(-1); // to-do: check WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); WriteInteger(UserId); }
private void WriteFloorItem(Item Item, int UserID) { base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); base.WriteInteger(Item.GetX); base.WriteInteger(Item.GetY); base.WriteInteger(Item.Rotation); base.WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); base.WriteString(String.Empty); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else if (Item.Data.InteractionType == InteractionType.INFO_TERMINAL) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("internalLink"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.FX_PROVIDER) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("effectId"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.PINATA) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString("6"); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(100); } else if (Item.Data.InteractionType == InteractionType.PINATATRIGGERED) { base.WriteInteger(0); base.WriteInteger(7); // miran2 grafic xq no c acuerda xdddddd kva men xDDDDDDDD esk me mandaron un guasap menju eeeer xqude popddddduddddddddddddddddxdd base.WriteString("0"); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.MAGICEGG) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(50); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } base.WriteInteger(-1); // to-do: check base.WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); base.WriteInteger(UserID); }
private void WriteFloorItem(Item Item, int UserID) { WriteInteger(Item.Id); WriteInteger(Item.GetBaseItem().SpriteId); WriteInteger(Item.GetX); WriteInteger(Item.GetY); WriteInteger(Item.Rotation); WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); WriteString(String.Empty); if (Item.LimitedNo > 0) { WriteInteger(1); WriteInteger(256); WriteString(Item.ExtraData); WriteInteger(Item.LimitedNo); WriteInteger(Item.LimitedTot); } else if (Item.Data.InteractionType == InteractionType.INFO_TERMINAL) { WriteInteger(0); WriteInteger(1); WriteInteger(1); WriteString("internalLink"); WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.FX_PROVIDER) { WriteInteger(0); WriteInteger(1); WriteInteger(1); WriteString("effectId"); WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.PINATA) { WriteInteger(0); WriteInteger(7); WriteString("6"); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(100); } else if (Item.Data.InteractionType == InteractionType.PINATATRIGGERED) { WriteInteger(0); WriteInteger(7); WriteString("0"); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.MAGICEGG) { WriteInteger(0); WriteInteger(7); WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(23); } else if (Item.Data.InteractionType == InteractionType.RPGTHIAGO) { WriteInteger(0); WriteInteger(7); WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(23); } else if (Item.Data.InteractionType == InteractionType.MAGICCHEST) { WriteInteger(0); WriteInteger(7); WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { WriteInteger(0); } else { WriteInteger(int.Parse(Item.ExtraData)); } WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.CAIXATHIAGO) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(1); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } WriteInteger(-1); // to-do: check WriteInteger((Item.GetBaseItem().Modes > 1) ? 1 : 0); WriteInteger(UserID); }
private void WriteFloorItem(Item Item, int UserID) { base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); base.WriteInteger(Item.GetX); base.WriteInteger(Item.GetY); base.WriteInteger(Item.Rotation); base.WriteString(String.Format("{0:0.00}", TextHandling.GetString(Item.GetZ))); base.WriteString(String.Empty); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else if (Item.Data.InteractionType == InteractionType.INFO_TERMINAL || Item.Data.InteractionType == InteractionType.ROOM_PROVIDER) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("internalLink"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.FX_PROVIDER) { base.WriteInteger(0); base.WriteInteger(1); base.WriteInteger(1); base.WriteString("effectId"); base.WriteString(Item.ExtraData); } else if (Item.Data.InteractionType == InteractionType.PINATA) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString("6"); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(100); } else if (Item.Data.InteractionType == InteractionType.PLANT_SEED) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(12); } else if (Item.Data.InteractionType == InteractionType.PINATATRIGGERED) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString("0"); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(1); } else if (Item.Data.InteractionType == InteractionType.EASTEREGG) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(20); } else if (Item.Data.InteractionType == InteractionType.MAGICEGG) { base.WriteInteger(0); base.WriteInteger(7); base.WriteString(Item.ExtraData); if (Item.ExtraData.Length <= 0) { base.WriteInteger(0); } else { base.WriteInteger(int.Parse(Item.ExtraData)); } base.WriteInteger(23); } else { ItemBehaviourUtility.GenerateExtradata(Item, this); } base.WriteInteger(-1); // to-do: check if (Item.Data.InteractionType == InteractionType.TELEPORT || Item.Data.InteractionType == InteractionType.VENDING_MACHINE) { base.WriteInteger(2); } else if (Item.GetBaseItem().Modes > 1) { base.WriteInteger(1); } else { base.WriteInteger(0); } base.WriteInteger(UserID); }