ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/cfplus.ext
(Generate patch)

Comparing deliantra/server/ext/cfplus.ext (file contents):
Revision 1.5 by root, Sat Jun 16 14:35:41 2007 UTC vs.
Revision 1.8 by root, Sun Jun 24 04:09:29 2007 UTC

33sub dialog_tell { 33sub dialog_tell {
34 my ($id, $dialog, $msg) = @_; 34 my ($id, $dialog, $msg) = @_;
35 35
36 my $pl = $dialog->{pl}; 36 my $pl = $dialog->{pl};
37 my ($reply, @kw) = $dialog->tell ($msg); 37 my ($reply, @kw) = $dialog->tell ($msg);
38
38 $reply = "..." unless $reply; 39 $reply = "..." unless defined $reply;
40 return if $reply eq ""; # NPC doesn't want to say, or wants to say something later
39 41
40 $pl->ext_reply ($id => msgtype => "reply", msg => $reply, add_topics => \@kw); 42 $pl->ext_reply ($id => msgtype => "reply", msg => $pl->expand_cfpod ($reply), add_topics => \@kw);
41} 43}
42 44
43=item ... = extcmd lookat { dx => $dx, dy => $dy } 45=item ... = extcmd lookat { dx => $dx, dy => $dy }
44 46
45"Looks at" the mapspace displaced (dx|dy) relative to the player 47"Looks at" the mapspace displaced (dx|dy) relative to the player
94 return if $pl->{npc_dialog}; # only one dialog at a time 96 return if $pl->{npc_dialog}; # only one dialog at a time
95 97
96 for my $npc ($pl->ob->map->at ($pl->ob->x + $dx, $pl->ob->y + $dy)) { 98 for my $npc ($pl->ob->map->at ($pl->ob->x + $dx, $pl->ob->y + $dy)) {
97 if (NPC_Dialogue::has_dialogue $npc) { 99 if (NPC_Dialogue::has_dialogue $npc) {
98 $pl->attach ("npc_dialog_active"); 100 $pl->attach ("npc_dialog_active");
99 $pl->{npc_dialog} = new NPC_Dialogue pl => $pl, npc => $npc; 101 $pl->{npc_dialog} = new NPC_Dialogue pl => $pl, npc => $npc, id => $id;
100 dialog_tell $id, $pl->{npc_dialog}, "hi"; 102 dialog_tell $id, $pl->{npc_dialog}, "hi";
101 return; 103 return;
102 } 104 }
103 } 105 }
104 106

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines