/// <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); }
/// <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); }