--- deliantra/server/ext/NPC_Dialogue.pm 2009/01/08 04:35:04 1.13 +++ deliantra/server/ext/NPC_Dialogue.pm 2009/01/08 19:23:44 1.14 @@ -203,9 +203,10 @@ state won't be changed when the connection is triggered by other triggers. So be careful when triggering the connection from other objects. -When a state argument is given it should be either 0 or 1. 1 will 'push' the connection -and 0 will 'release' the connection. This is useful for example when you want to -let a npc control a door. +When a state argument is given it should be a positive integer. Any value +C will 'push' the connection (in general, you should specify C<1> +for this) and C<0> will 'release' the connection. This is useful for +example when you want to let an NPC control a door. Trigger all objects with the given connected-id by 'releasing' the connection. @@ -309,12 +310,11 @@ } elsif ($cmd eq "trigger") { my ($con, $state) = split /\s+/, $args, 2; - $con = $con * 1; if (defined $state) { - $self->{npc}->map->trigger ($args, $state, $self->{npc}, $self->{ob}); + $self->{npc}->map->trigger ($con, $state, $self->{npc}, $self->{ob}); } else { - my $rvalue = \$self->{npc}{dialog_trigger}{$con}; + my $rvalue = \$self->{npc}{dialog_trigger}{$con+0}; $self->{npc}->map->trigger ($con, $$rvalue = !$$rvalue, $self->{npc}, $self->{ob}); }