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

Comparing deliantra/maps/perl/NPC_Dialogue.pm (file contents):
Revision 1.9 by root, Fri Jul 21 00:25:29 2006 UTC vs.
Revision 1.10 by elmex, Thu Aug 31 00:57:59 2006 UTC

245 $state->{$name} eq $value 245 $state->{$name} eq $value
246 or next topic; 246 or next topic;
247 247
248 } elsif ($cmd eq "trigger") { 248 } elsif ($cmd eq "trigger") {
249 my $rvalue = \$self->{npc}{dialog_trigger}{$args*1}; 249 my $rvalue = \$self->{npc}{dialog_trigger}{$args*1};
250 250 $self->{npc}->map->trigger ($args, $$rvalue = !$$rvalue);
251 my $trigger = cf::object::new "magic_ear";
252 $trigger->set_value ($$rvalue);
253
254 # needs to be on the map for remove_button_link to work
255 # the same *should* be true for add_button_link....
256 $self->{npc}->map->insert_object ($trigger, 0, 0);
257
258 $trigger->add_button_link ($self->{npc}->map, $args);
259
260 $trigger->use_trigger;
261
262 $trigger->remove_button_link;
263 $trigger->remove;
264 $trigger->free;
265
266 $$rvalue = !$$rvalue;
267 251
268 } elsif ($cmd eq "addtopic") { 252 } elsif ($cmd eq "addtopic") {
269 push @kw, split /\|/, $args; 253 push @kw, split /\|/, $args;
270 $self->{add_topic}->(split /\s*\|\s*/, $args) if $self->{add_topic}; 254 $self->{add_topic}->(split /\s*\|\s*/, $args) if $self->{add_topic};
271 255

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines