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

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.108 by root, Sun Jul 30 13:16:44 2006 UTC vs.
Revision 1.110 by root, Sun Jul 30 17:43:26 2006 UTC

26use Carp (); 26use Carp ();
27use AnyEvent (); 27use AnyEvent ();
28use BerkeleyDB; 28use BerkeleyDB;
29use Pod::POM (); 29use Pod::POM ();
30use Scalar::Util (); 30use Scalar::Util ();
31use JSON::Syck ();
32use Storable (); # finally 31use Storable (); # finally
33 32
34our %STAT_TOOLTIP = ( 33our %STAT_TOOLTIP = (
35 Str => "<b>Physical Strength</b>, determines damage dealt with weapons, how much you can carry, and how often you can attack", 34 Str => "<b>Physical Strength</b>, determines damage dealt with weapons, how much you can carry, and how often you can attack",
36 Dex => "<b>Dexterity</b>, your physical agility. Determines chance of being hit and affects armor class and speed", 35 Dex => "<b>Dexterity</b>, your physical agility. Determines chance of being hit and affects armor class and speed",
105 } 104 }
106 105
107 die "FATAL: can't find required file $_[0]\n"; 106 die "FATAL: can't find required file $_[0]\n";
108} 107}
109 108
110$JSON::Syck::ImplicitUnicode = 1; 109BEGIN {
111 110 use Crossfire::Protocol::Base ();
112sub from_json { 111 *to_json = \&Crossfire::Protocol::Base::to_json;
113 JSON::Syck::Load $_[0] 112 *from_json = \&Crossfire::Protocol::Base::from_json;
114}
115
116sub to_json {
117 JSON::Syck::Dump $_[0]
118} 113}
119 114
120sub read_cfg { 115sub read_cfg {
121 my ($file) = @_; 116 my ($file) = @_;
122 117
294 ["mark", sub { $::CONN->send ("mark ". pack "N", $self->{tag}) }], 289 ["mark", sub { $::CONN->send ("mark ". pack "N", $self->{tag}) }],
295 ["ignite/thaw", # first try of an easier use of flint&steel 290 ["ignite/thaw", # first try of an easier use of flint&steel
296 sub { 291 sub {
297 $::CONN->send ("mark ". pack "N", $self->{tag}); 292 $::CONN->send ("mark ". pack "N", $self->{tag});
298 $::CONN->send ("command apply flint and steel"); 293 $::CONN->send ("command apply flint and steel");
294 }
295 ],
296 ["inscribe", # first try of an easier use of flint&steel
297 sub {
298 &::open_string_query ("Text to inscribe", sub {
299 my ($entry, $txt) = @_;
300 $::CONN->send ("mark ". pack "N", $self->{tag});
301 $::CONN->send ("command use_skill inscription $txt");
302 });
299 } 303 }
300 ], 304 ],
301 ["apply", sub { $::CONN->send ("apply $self->{tag}") }], 305 ["apply", sub { $::CONN->send ("apply $self->{tag}") }],
302 ( 306 (
303 $self->{flags} & F_LOCKED 307 $self->{flags} & F_LOCKED

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines