… | |
… | |
14 | use DC::Item; |
14 | use DC::Item; |
15 | |
15 | |
16 | use base 'Deliantra::Protocol::Base'; |
16 | use base 'Deliantra::Protocol::Base'; |
17 | |
17 | |
18 | our $TEX_DIALOGUE = new_from_resource DC::Texture |
18 | our $TEX_DIALOGUE = new_from_resource DC::Texture |
19 | "dialogue.png", minify => 1, mipmap => 1; |
19 | "dialogue.png", minify => 1, mipmap => 1; |
20 | |
20 | |
21 | our $TEX_NOFACE = new_from_resource DC::Texture |
21 | our $TEX_NOFACE = new_from_resource DC::Texture |
22 | "noface.png", minify => 1, mipmap => 1, wrap => 1; |
22 | "noface.png", minify => 1, mipmap => 1, wrap => 1; |
23 | |
23 | |
24 | sub MIN_TEXTURE_UNUSED() { 1 }#d# |
24 | sub MIN_TEXTURE_UNUSED() { 1 }#d# |
… | |
… | |
34 | }, |
34 | }, |
35 | ); |
35 | ); |
36 | |
36 | |
37 | $self->update_fx_want; |
37 | $self->update_fx_want; |
38 | |
38 | |
39 | my $guard = $self->addme_guard; |
39 | my $exp_guard = $self->addme_guard; |
|
|
40 | my $skl_guard = $self->addme_guard; |
|
|
41 | my $spl_guard = $self->addme_guard; |
40 | $self->send_exti_req (resource => "exp_table", sub { |
42 | $self->send_exti_req (resource => qw(exp_table skill_info spell_paths), sub { |
41 | my ($idx) = @_; |
43 | my ($exp, $skl, $spl) = @_; |
42 | |
44 | |
43 | $self->register_face_handler ($idx, sub { |
45 | $self->register_face_handler ($exp, sub { |
44 | my ($face) = @_; |
46 | my ($face) = @_; |
45 | |
47 | |
46 | undef $guard; |
48 | undef $exp_guard; |
47 | $self->{exp_table} = $self->{json_coder}->decode (delete $face->{data}); |
49 | $self->{exp_table} = $self->{json_coder}->decode (delete $face->{data}); |
48 | $_->() for values %{ $self->{on_exp_update} }; |
50 | $_->() for values %{ $self->{on_exp_update} }; |
49 | }); |
51 | }); |
50 | |
52 | |
51 | () |
|
|
52 | }); |
|
|
53 | |
|
|
54 | my $guard = $self->addme_guard; |
|
|
55 | $self->send_exti_req (resource => "skill_info", sub { |
|
|
56 | my ($idx) = @_; |
|
|
57 | |
|
|
58 | $self->register_face_handler ($idx, sub { |
53 | $self->register_face_handler ($skl, sub { |
59 | my ($face) = @_; |
54 | my ($face) = @_; |
60 | |
55 | |
61 | undef $guard; |
56 | undef $skl_guard; |
62 | my $info = $self->{json_coder}->decode (delete $face->{data}); |
57 | my $info = $self->{json_coder}->decode (delete $face->{data}); |
63 | $self->{skill_info} = { map { CS_STAT_SKILLINFO + $_ => $info->[$_][0] } 0 .. $#$info }; |
58 | $self->{skill_info} = { map { CS_STAT_SKILLINFO + $_ => $info->[$_][0] } 0 .. $#$info }; |
64 | }); |
59 | }); |
65 | |
60 | |
66 | () |
|
|
67 | }); |
|
|
68 | |
|
|
69 | my $guard = $self->addme_guard; |
|
|
70 | $self->send_exti_req (resource => "spell_paths", sub { |
|
|
71 | my ($idx) = @_; |
|
|
72 | |
|
|
73 | $self->register_face_handler ($idx, sub { |
61 | $self->register_face_handler ($spl, sub { |
74 | my ($face) = @_; |
62 | my ($face) = @_; |
75 | |
63 | |
76 | undef $guard; |
64 | undef $spl_guard; |
77 | my $info = $self->{json_coder}->decode (delete $face->{data}); |
65 | my $info = $self->{json_coder}->decode (delete $face->{data}); |
78 | $self->{spell_paths} = { map { (1 << $_) => $info->[$_][0] } 0 .. $#$info }; |
66 | $self->{spell_paths} = { map { (1 << $_) => $info->[$_][0] } 0 .. $#$info }; |
79 | }); |
67 | }); |
80 | |
68 | |
81 | () |
69 | () |
… | |
… | |
1115 | tan => 12, |
1103 | tan => 12, |
1116 | ); |
1104 | ); |
1117 | |
1105 | |
1118 | our @CF_COLOR = ( |
1106 | our @CF_COLOR = ( |
1119 | [1.00, 1.00, 1.00], #[0.00, 0.00, 0.00], |
1107 | [1.00, 1.00, 1.00], #[0.00, 0.00, 0.00], |
1120 | [1.00, 1.00, 1.00], |
1108 | [1.00, 1.00, 1.00], #[0.00, 0.00, 0.00], |
1121 | [0.50, 0.50, 1.00], #[0.00, 0.00, 0.55] |
1109 | [0.50, 0.50, 1.00], #[0.00, 0.00, 0.55], |
1122 | [1.00, 0.00, 0.00], |
1110 | [1.00, 0.00, 0.00], |
1123 | [1.00, 0.54, 0.00], |
1111 | [1.00, 0.54, 0.00], |
1124 | [0.11, 0.56, 1.00], |
1112 | [0.11, 0.56, 1.00], |
1125 | [0.93, 0.46, 0.00], |
1113 | [0.93, 0.46, 0.00], |
1126 | [0.18, 0.54, 0.34], |
1114 | [0.18, 0.54, 0.34], |