-
CnKore for CRO下载
资源介绍
基于OpenKore开发的一款客户端
use strict;
use Time::HiRes qw(time);
use base qw/Actor::Slave/;
use Globals;
use Log qw/message warning error debug/;
use Utils;
use Misc;
use Translation;
use AI::Slave::Homunculus;
use AI::Slave::Mercenary;
# homunculus commands/skills can only be used
# if the homunculus is within this range
use constant MAX_DISTANCE => 17;
sub checkSkillOwnership {}
sub action {
my $slave = shift;
my $i = (defined $_[0] ? $_[0] : 0);
return $slave->{slave_ai_seq}[$i];
}
sub args {
my $slave = shift;
my $i = (defined $_[0] ? $_[0] : 0);
return \%{$slave->{slave_ai_seq_args}[$i]};
}
sub dequeue {
my $slave = shift;
shift @{$slave->{slave_ai_seq}};
shift @{$slave->{slave_ai_seq_args}};
}
sub queue {
my $slave = shift;
unshift @{$slave->{slave_ai_seq}}, shift;
my $args = shift;
unshift @{$slave->{slave_ai_seq_args}}, ((defined $args) ? $args : {});
}
sub clear {
my $slave = shift;
if (@_) {
my $changed;
for (my $i = 0; $i < @{$slave->{slave_ai_seq}}; $i++) {
if (defined binFind(\@_, $slave->{slave_ai_seq}[$i])) {
delete $slave->{slave_ai_seq}[$i];
delete $slave->{slave_ai_seq_args}[$i];
$changed = 1;
}
}
if ($changed) {
my (@new_seq, @new_args);
for (my $i = 0; $i < @{$slave->{slave_ai_seq}}; $i++) {
if (defined $slave->{slave_ai_seq}[$i]) {
push @new_seq, $slave->{slave_ai_seq}[$i];
push @new_args, $slave->{slave_ai_seq_args}[$i];
}
}
@{$slave->{slave_ai_seq}} = @new_seq;
@{$slave->{slave_ai_seq_args}} = @new_args;
}
} else {
undef @{$slave->{slave_ai_seq}};
undef @{$slave->{slave_ai_seq_args}};
}
}
sub suspend {
my $slave = shift;
my $i = (defined $_[0] ? $_[0] : 0);
$slave->{slave_ai_seq_args}[$i]{suspended} = time if $i < @{$slave->{slave_ai_seq_args}};
}
sub mapChanged {
my $slave = shift;
my $i = (defined $_[0] ? $_[0] : 0);
$slave->{slave_ai_seq_args}[$i]{mapChanged} = time if $i < @{$slave->{slave_ai_seq_args}};
}
- 上一篇: RFID 14443 标准
- 下一篇: 安卓内存状态修改文件支持64位和32位,本人使用测试通过