]> git.tdb.fi Git - poefilter.git/blobdiff - source/appearance.cpp
Correctly merge icon and light beam appearances
[poefilter.git] / source / appearance.cpp
index 0500aa57fc826687a0ab9d3b8e47680a7348ee9a..51ff10d36e1e99596198911dc7f039f66916243c 100644 (file)
@@ -33,6 +33,18 @@ void Appearance::merge_from(const Appearance &other)
                sound_type = other.sound_type;
                sound_volume = other.sound_volume;
        }
+       if(other.show_icon)
+       {
+               show_icon = true;
+               icon_shape = other.icon_shape;
+               icon_color = other.icon_color;
+               icon_size = other.icon_size;
+       }
+       if(other.show_beam)
+       {
+               show_beam = true;
+               beam_color = other.beam_color;
+       }
 }
 
 void Appearance::add_lines(FilterStatement &st) const
@@ -53,7 +65,10 @@ void Appearance::add_lines(FilterStatement &st) const
                st.add_line(format("MinimapIcon %d %s %s", icon_size, icon_color, icon_shape));
 
        if(sound_type)
+       {
                st.add_line(format("PlayAlertSound %d %d", sound_type, sound_volume));
+               st.add_line("DisableDropSound");
+       }
 
        if(show_beam)
                st.add_line(format("PlayEffect %s", beam_color));