Ejemplo n.º 1
0
 /// <summary>Process an incoming packet and raise the appropriate events</summary>
 /// <param name="sender">The sender</param>
 /// <param name="e">The EventArgs object containing the packet data</param>
 protected void AttachedSoundGainChangeHandler(object sender, PacketReceivedEventArgs e)
 {
     if (m_AttachedSoundGainChange != null)
     {
         AttachedSoundGainChangePacket change = (AttachedSoundGainChangePacket)e.Packet;
         OnAttachedSoundGainChange(new AttachedSoundGainChangeEventArgs(e.Simulator, change.DataBlock.ObjectID, change.DataBlock.Gain));
     }
 }
Ejemplo n.º 2
0
        protected void AttachedSoundGainChangeHandler(Packet packet, Simulator simulator)
        {
            AttachedSoundGainChangePacket change = (AttachedSoundGainChangePacket)packet;

            if (OnAttachSoundGainChange != null)
            {
                try { OnAttachSoundGainChange(change.DataBlock.ObjectID, change.DataBlock.Gain); }
                catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
            }
        }
Ejemplo n.º 3
0
        protected void AttachedSoundGainChangeHandler(object sender, PacketReceivedEventArgs e)
        {
            var simulator = e.Simulator;
            var packet = e.Packet;

            if (!MaintainSounds) return;
            if (!IsMaster(simulator)) return;

            AttachedSoundGainChangePacket change = (AttachedSoundGainChangePacket)packet;

            Sound_OnAttachSoundGainChange(this,new AttachedSoundGainChangeEventArgs(simulator,change.DataBlock.ObjectID, change.DataBlock.Gain));
        }