--- deliantra/server/lib/cf.pm 2007/07/24 22:49:40 1.320 +++ deliantra/server/lib/cf.pm 2007/07/26 21:44:43 1.321 @@ -2867,10 +2867,7 @@ my $res = $facedata->{resource}; my $enc = JSON::XS->new->utf8->canonical; - if (my $soundconf = delete $res->{"res/sound.conf"}) { - $soundconf = $enc->decode (delete $soundconf->{data}); - # todo - } + my $soundconf = delete $res->{"res/sound.conf"}; while (my ($name, $info) = each %$res) { my $meta = $enc->encode ({ @@ -2895,6 +2892,23 @@ cf::cede_to_tick; } + + if ($soundconf) { + $soundconf = $enc->decode (delete $soundconf->{data}); + + for (0 .. SOUND_CAST_SPELL_0 - 1) { + my $sound = $soundconf->{compat}[$_] + or next; + + my $face = cf::face::find "sound/$sound->[1]"; + warn "$sound->[0]: $face\n";#d# + + cf::sound::set $sound->[0] => $face; + cf::sound::old_sound_index $_, $face; # gcfclient-compat + } + + #TODO + } } 1