--- deliantra/Deliantra-Client/DC.pm 2006/07/22 13:20:33 1.102
+++ deliantra/Deliantra-Client/DC.pm 2006/07/23 08:58:43 1.103
@@ -47,6 +47,20 @@
WSp => "Weapon Speed, how many attacks you may make per unit of time (0.120s). Higher values indicate faster attack speed. Current weapon and Dex effect the value of weapon speed.",
);
+=item guard { BLOCK }
+
+Returns an object that executes the given block as soon as it is destroyed.
+
+=cut
+
+sub guard(&) {
+ bless \(my $cb = $_[0]), "CFClient::Guard"
+}
+
+sub CFClient::Guard::DESTROY {
+ ${$_[0]}->()
+}
+
package CFClient::PodToPango;
use base Pod::POM::View::Text;
@@ -378,7 +392,7 @@
: (
["lock", sub { $::CONN->send ("lock " . pack "CN", 1, $self->{tag}) }],
["$move_prefix all", sub { $::CONN->send ("move $targ $self->{tag} 0") }],
- ["$move_prefix n",
+ ["$move_prefix ",
sub {
do_n_dialog (sub { $::CONN->send ("move $targ $self->{tag} $_[0]") })
}