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

Comparing deliantra/server/ext/NPC_Dialogue.pm (file contents):
Revision 1.10 by root, Mon Jul 14 23:57:45 2008 UTC vs.
Revision 1.12 by root, Thu Dec 18 02:49:22 2008 UTC

331 } 331 }
332 } 332 }
333 333
334 delete $self->{npc}{$self->{ob}->name}{dialog_state} unless %$state; 334 delete $self->{npc}{$self->{ob}->name}{dialog_state} unless %$state;
335 delete $self->{ob}{dialog_flag} unless %$flag; 335 delete $self->{ob}{dialog_flag} unless %$flag;
336
337 # combine lines into paragraphs
338 $reply =~ s/(?<=\S)\n(?=\w)/ /g;
339 $reply =~ s/\n\n/\n/g;
340 336
341 # ignores flags and npc from replies 337 # ignores flags and npc from replies
342 $reply = join "\n", (map $_->[1], @replies), $reply; 338 $reply = join "\n", (map $_->[1], @replies), $reply;
343 339
344 # now mark up all matching keywords 340 # now mark up all matching keywords
349 last; 345 last;
350 } 346 }
351 } 347 }
352 } 348 }
353 349
350 $self->{npc}->use_trigger if $self->{npc}->type == cf::MAGIC_EAR;
351
354 return wantarray ? ($reply, @kw) : $reply; 352 return wantarray ? ($reply, @kw) : $reply;
355 } 353 }
356 } 354 }
357 } 355 }
358 356

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines