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

Comparing deliantra/server/ext/map_lib.ext (file contents):
Revision 1.3 by root, Thu Dec 21 22:41:34 2006 UTC vs.
Revision 1.4 by elmex, Mon Feb 5 11:48:43 2007 UTC

67 $pl->message ($cfg->{message_on_nomatch}, cf::NDI_RED | cf::NDI_UNIQUE) if defined $cfg->{message_on_nomatch}; 67 $pl->message ($cfg->{message_on_nomatch}, cf::NDI_RED | cf::NDI_UNIQUE) if defined $cfg->{message_on_nomatch};
68 cf::override; 68 cf::override;
69 } 69 }
70 }; 70 };
71 71
72
73=item object attachment: 'trigger_on_dialog_flag'
74
75This attachment checks whether the player has a specific
76dialog flag set (the ones you can set with @setflag, see also
77L<NPC_Dialogue>, and triggers a connection depending on that.
78
79The attachment has following configuration:
80
81=over 4
82
83=item flag
84
85This field should contain the name of the flag that you want to check
86for.
87
88=item connection
89
90The connection ID of the connection you want to trigger.
91
92=item state
93
94The state of the connection: 0 for release, 1 for push.
95
72=back 96=back
73 97
74=cut 98=cut
99
100cf::object::attachment trigger_on_dialog_flag =>
101 on_move_trigger => sub {
102 my ($self, $who, $orig) = @_;
103 my $cfg = $self->{trigger_on_dialog_flag};
104 if (exists $who->{ob}{dialog_flag}{$cfg->{flag}}) {
105 if ($who->{ob}{dialog_flag}{$cfg->{flag}}) {
106 $self->map->trigger ($cfg->{connection}, $cfg->{state});
107 }
108 cf::override;
109 }
110 };
111
112=back
113
114=cut

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines