An entity is any being or object that can be sent in Entity(Dis)Appears.
Exemple #1
0
		/// <summary>
		/// Broadcasts EntityDisappears|ItemDisappears in entity's region.
		/// </summary>
		/// <param name="entity"></param>
		public static void EntityDisappears(Entity entity)
		{
			var op = Op.EntityDisappears;
			if (entity is Item)
				op = Op.ItemDisappears;

			var packet = new Packet(op, MabiId.Broadcast);
			packet.PutLong(entity.EntityId);
			packet.PutByte(0);

			entity.Region.Broadcast(packet, entity, false);
		}
Exemple #2
0
		/// <summary>
		/// Broadcasts EntityAppears|ItemAppears|PropAppears in entity's region.
		/// </summary>
		/// <param name="entity"></param>
		public static void EntityAppears(Entity entity)
		{
			var op = Op.EntityAppears;
			if (entity is Item)
				op = Op.ItemAppears;
			else if (entity is Prop)
				op = Op.PropAppears;

			var packet = new Packet(op, MabiId.Broadcast);
			packet.AddPublicEntityInfo(entity);

			entity.Region.Broadcast(packet, entity, false);
		}