… | |
… | |
27 | }); |
27 | }); |
28 | |
28 | |
29 | sub dialog_tell { |
29 | sub dialog_tell { |
30 | my ($token, $dialog, $msg) = @_; |
30 | my ($token, $dialog, $msg) = @_; |
31 | |
31 | |
|
|
32 | utf8::decode $msg; |
32 | my $pl = $dialog->{ob}->contr; |
33 | my $pl = $dialog->{ob}->contr; |
33 | my ($reply, @kw) = $dialog->tell ($msg); |
34 | my ($reply, @kw) = $dialog->tell ($msg); |
34 | $reply = "..." unless $reply; |
35 | $reply = "..." unless $reply; |
|
|
36 | utf8::encode $_ for ($reply, @kw); |
35 | $pl->send ("ext $token msg " . join "\x00", $reply, @kw); |
37 | $pl->send ("ext $token msg " . join "\x00", $reply, @kw); |
36 | } |
38 | } |
37 | |
39 | |
38 | # return "interesting" information about the given tile |
40 | # return "interesting" information about the given tile |
39 | # currently only returns the npc_dialog title when a dialog is possible |
41 | # currently only returns the npc_dialog title when a dialog is possible |