Code: Select all
# 01D0 (spirits), 01E1 (coins), 08CF (amulets)
sub revolving_entity {
my ($self, $args) = @_;
# Monk Spirits or Gunslingers' coins or senior ninja
my $sourceID = $args->{sourceID};
my $entityNum = $args->{entity};
my $entityElement = $elements_lut{$args->{type}} if ($args->{type} && $entityNum);
my $entityType;
my $actor = Actor::get($sourceID);
if ($args->{switch} eq '01D0') {
# Translation Comment: Spirit sphere of the monks
$entityType = T('spirit');
} elsif ($args->{switch} eq '01E1') {
# Translation Comment: Coin of the gunslinger
$entityType = T('coin');
} elsif ($args->{switch} eq '08CF') {
# Translation Comment: Amulet of the warlock
$entityType = T('amulet');
} else {
$entityType = T('entity unknown');
}
if ($sourceID eq $accountID && $entityNum != $char->{spirits}) {
$char->{spirits} = $entityNum;
$char->{amuletType} = $entityElement;
$entityElement ?
# Translation Comment: Message displays following: quantity, the name of the entity and its element
message TF("You have %s %s(s) of %s now\n", $entityNum, $entityType, $entityElement), "parseMsg_statuslook", 1 :
# Translation Comment: Message displays following: quantity and the name of the entity
message TF("You have %s %s(s) now\n", $entityNum, $entityType), "parseMsg_statuslook", 1;
} elsif ($entityNum != $actor->{spirits}) {
$actor->{spirits} = $entityNum;
$actor->{amuletType} = $entityElement;
$entityElement ?
# Translation Comment: Message displays following: actor, quantity, the name of the entity and its element
message TF("%s has %s %s(s) of %s now\n", $actor, $entityNum, $entityType, $entityElement), "parseMsg_statuslook", 1 :
# Translation Comment: Message displays following: actor, quantity and the name of the entity
message TF("%s has %s %s(s) now\n", $actor, $entityNum, $entityType), "parseMsg_statuslook", 1;
}
}