ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.110 by root, Tue Jun 26 05:06:01 2007 UTC vs.
Revision 1.111 by root, Mon Jul 2 02:58:51 2007 UTC

64 64
65 $self->setup_req (mapsize => "${w}x${h}"); 65 $self->setup_req (mapsize => "${w}x${h}");
66 } 66 }
67 } 67 }
68 }); 68 });
69
70 $self->{json_coder}
71 ->convert_blessed
72 ->filter_json_single_key_object (__widget_ref__ => sub {
73 $self->{widget}{$_[0]}
74 });
69 75
70 $self->connect_ext (ws_n => sub { 76 $self->connect_ext (ws_n => sub {
71 my ($arg) = @_; 77 my ($arg) = @_;
72 78
73 $self->{widgetset}{$arg{id}} = { 79 $self->{widgetset}{$arg{id}} = {
129 135
130 my $w = $self->{widget}{$arg->{id}} 136 my $w = $self->{widget}{$arg->{id}}
131 or return; 137 or return;
132 my $m = $arg->{name}; 138 my $m = $arg->{name};
133 139
134 my @a = map {
135 "HASH" eq ref && 1 == (scalar keys %$_) && exists $_->{__widget_ref__}
136 ? $self->{widget}{$_->{__widget_ref__}}
137 : $_
138 } @{ $arg->{args} || [] }; 140 my $a = $arg->{args} || [];
139 141
140 if (exists $arg->{rid}) { 142 if (exists $arg->{rid}) {
141 $self->send_exti_msg (w_r => rid => $arg->{rid}, res => [$w->$m (@a)]); 143 $self->send_exti_msg (w_r => rid => $arg->{rid}, res => [$w->$m (@$a)]);
142 } else { 144 } else {
143 $w->$m (@a); 145 $w->$m (@$a);
144 } 146 }
145 }); 147 });
146 148
147 $self->connect_ext (w_s => sub { 149 $self->connect_ext (w_s => sub {
148 my ($arg) = @_; 150 my ($arg) = @_;
1130 1132
1131 (delete $self->{npc_dialog})->destroy 1133 (delete $self->{npc_dialog})->destroy
1132 if $self->{npc_dialog}; 1134 if $self->{npc_dialog};
1133 1135
1134 $self->SUPER::destroy; 1136 $self->SUPER::destroy;
1137
1138 %$self = ();
1135} 1139}
1136 1140
1137package CFPlus::NPCDialog; 1141package CFPlus::NPCDialog;
1138 1142
1139our @ISA = 'CFPlus::UI::Toplevel'; 1143our @ISA = 'CFPlus::UI::Toplevel';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines