--- deliantra/server/ext/schmorplog.ext 2008/01/07 01:55:19 1.12 +++ deliantra/server/ext/schmorplog.ext 2008/04/30 10:31:04 1.14 @@ -27,6 +27,19 @@ }; }; +cf::object->attach ( + on_kill => sub { + my ($ob, $hitter) = @_; + + return unless $hitter; + $hitter = $hitter->outer_owner; + my $pl = $hitter->contr + or return; + + ++$hitter->{stats_kill}{$ob->name}; + }, +); + cf::player->attach ( on_login => sub { my ($pl) = @_; @@ -69,7 +82,9 @@ }, on_death => sub { my ($pl) = @_; - ext::irc::do_notice (sprintf "%s was killed by %s", $pl->ob->name, $pl->killer); + ext::irc::do_notice (sprintf "%s was killed by %s", $pl->ob->name, $pl->killer_name); + + ++$pl->ob->{stats_death}{$pl->killer_name}; $pl->ob->set_ob_key_value (schmorplog_death_count => 1 + $pl->ob->get_ob_key_value ("schmorplog_death_count"));