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.176 by root, Sun Oct 14 15:33:30 2007 UTC vs.
Revision 1.181 by root, Wed Dec 26 19:11:13 2007 UTC

1package CFPlus::Protocol; 1package CFPlus::Protocol;
2 2
3use utf8; 3use utf8;
4use strict; 4use strict;
5 5
6use Crossfire::Protocol::Constants; 6use Deliantra::Protocol::Constants;
7 7
8use CFPlus; 8use CFPlus;
9use CFPlus::DB; 9use CFPlus::DB;
10use CFPlus::UI; 10use CFPlus::UI;
11use CFPlus::Pod; 11use CFPlus::Pod;
12use CFPlus::Macro; 12use CFPlus::Macro;
13use CFPlus::Item; 13use CFPlus::Item;
14 14
15use base 'Crossfire::Protocol::Base'; 15use base 'Deliantra::Protocol::Base';
16 16
17sub new { 17sub new {
18 my ($class, %arg) = @_; 18 my ($class, %arg) = @_;
19 19
20 my $self = $class->SUPER::new (%arg, 20 my $self = $class->SUPER::new (%arg,
21 setup_req => { 21 setup_req => {
22 extmap => 1, 22 extmap => 1,
23 excmd => 1, 23 excmd => 1,
24 xwidget2 => 1,#d# 24 widget => 1,
25 %{$arg{setup_req} || {}}, 25 %{$arg{setup_req} || {}},
26 }, 26 },
27 ); 27 );
28 28
29 $self->{map_widget}->clr_commands; 29 $self->{map_widget}->clr_commands;
294############################################################################# 294#############################################################################
295 295
296sub logprint { 296sub logprint {
297 my ($self, @a) = @_; 297 my ($self, @a) = @_;
298 298
299 CFPlus::DB::logprint "$Crossfire::VARDIR/log.$self->{host}" => (join "", @a), sub { }; 299 CFPlus::DB::logprint "$Deliantra::VARDIR/log.$self->{host}" => (join "", @a), sub { };
300} 300}
301 301
302sub _stat_numdiff { 302sub _stat_numdiff {
303 my ($self, $name, $old, $new) = @_; 303 my ($self, $name, $old, $new) = @_;
304 304
613 } 613 }
614 } 614 }
615 615
616 if ($delay) { 616 if ($delay) {
617 # delay the map drawing a tiny bit in the hope of getting the missing fetched 617 # delay the map drawing a tiny bit in the hope of getting the missing fetched
618 Event->timer (after => 0.03, cb => sub { 618 EV::once undef, 0, 0.03, sub {
619 $_[0]->w->cancel;
620 $self->{map_widget}->update 619 $self->{map_widget}->update
621 if $self->{map_widget}; 620 if $self->{map_widget};
622 }); 621 };
623 } else { 622 } else {
624 $self->{map_widget}->update; 623 $self->{map_widget}->update;
625 } 624 }
626} 625}
627 626
1152 } 1151 }
1153 1152
1154 $::FLOORBOX->add_at (@add); 1153 $::FLOORBOX->add_at (@add);
1155 }); 1154 });
1156 1155
1157 $::WANT_REFRESH->start; 1156 $::WANT_REFRESH = 1;
1158} 1157}
1159 1158
1160sub set_opencont { 1159sub set_opencont {
1161 my ($conn, $tag, $name) = @_; 1160 my ($conn, $tag, $name) = @_;
1162 $conn->{open_container} = $tag; 1161 $conn->{open_container} = $tag;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines