r8399 and r8405: revolving_entity
Moderator: Moderators
r8399 and r8405: revolving_entity
r8399:
It would not be good an make new article in wiki about the new amuletType condition in config.txt?
r8405:
Since the function was faulty, so that this can not log in, I decided to do a quick fix, but not sure if that's right.
By the way, I still have doubts... What exactly is it for? What is amuletType?
Just a detail... It's good to test before sending something to SVN.
It would not be good an make new article in wiki about the new amuletType condition in config.txt?
r8405:
Since the function was faulty, so that this can not log in, I decided to do a quick fix, but not sure if that's right.
By the way, I still have doubts... What exactly is it for? What is amuletType?
Just a detail... It's good to test before sending something to SVN.
Re: r8399 and r8405: revolving_entity
fix for twRO
Code: Select all
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->{entity} && $entityNum);
my $entityType;
my $actor = Actor::get($sourceID);
my $jobID = $actor->{jobID};
if ($jobID == 24) {
$entityType = T('coin');
} elsif ($jobID == 4211 || $jobID == 4212) {
$entityType = T('amulet');
} else {
$entityType = T('spirit');
}
if ($sourceID eq $accountID && $entityNum != $char->{spirits}) {
$char->{spirits} = $entityNum;
$char->{amuletType} = $entityElement;
message TF("You have %s %s(s) now\n", $entityNum, $entityType), "parseMsg_statuslook", 1 ;
} elsif ($entityNum != $actor->{spirits}) {
$actor->{spirits} = $entityNum;
$actor->{amuletType} = $entityElement ;
message TF("%s has %s %s(s) now\n", $actor, $entityNum, $entityType), "parseMsg_statuslook", 2;
}
}
Re: r8399 and r8405: revolving_entity
Send
If anyone is interested in writing the text to include the condition in the Wiki, just post here that I add in the Wiki.
If anyone is interested in writing the text to include the condition in the Wiki, just post here that I add in the Wiki.
Re: r8399 and r8405: revolving_entity
i'm Sorry ~
The original code lines is wrong~
It should be something like:
and
src/Commands.pm need restore to R8399 ~
Thank you~
The original code lines is wrong~
Code: Select all
my $entityElement = $elements_lut{$args->{type}} if ($args->{entity} && $entityNum);
Code: Select all
my $entityElement = $elements_lut{$args->{type}} if ($args->{type} && $entityNum);
src/Commands.pm need restore to R8399 ~
Thank you~
-
- Been there done that!
- Posts: 133
- Joined: 09 Oct 2009, 01:43
- Noob?: No
Re: r8399 and r8405: revolving_entity
amuletType seems like related to the Oboro/Kagerou skill Charm. It is possible that the elemental charms summoned when the skill behaves differently from Monk/Gunslinger spirits.
Re: r8399 and r8405: revolving_entity
Send
Revised and correct all the problems I found it based on my local server, did not get to test in an official server.
Hopefully that the problems related to it have ended.
Revised and correct all the problems I found it based on my local server, did not get to test in an official server.
Hopefully that the problems related to it have ended.
Re: r8399 and r8405: revolving_entity
KeplerBR wrote:Send
Revised and correct all the problems I found it based on my local server, did not get to test in an official server.
Hopefully that the problems related to it have ended.
Code: Select all
sub revolving_entity {
my ($self, $args) = @_;
# Monk Spirits or Gunslingers' coins or senior ninja
my $sourceID = $args->{sourceID};
my $entityNum = $args->{entity};
my $entityType;
my $actor = Actor::get($sourceID);
if ($entityNum != $actor->{spirits}) {
$actor->{spirits} = $entityNum;
if ($lastSwitch eq '01D0') {
$entityType = T('spirit');
} elsif ($lastSwitch eq '01E1') {
$entityType = T('coin');
} else {
$entityType = T('amulet');
delete $actor->{amuletType};
}
if ($args->{type} && $entityNum) {
$actor->{amuletType} = $elements_lut{$args->{type}};
$sourceID eq $accountID ? message TF("You have %s %s(s) of %s now\n", $entityNum, $entityType, $actor->{amuletType}), "parseMsg_statuslook", 1
: message TF("%s has %s %s(s) of %s now\n", $actor, $entityNum, $entityType, $actor->{amuletType}), "parseMsg_statuslook", 2
} else {
$sourceID eq $accountID ? message TF("You have %s %s(s) now\n", $entityNum, $entityType), "parseMsg_statuslook", 1
: message TF("%s has %s %s(s) now\n", $actor, $entityNum, $entityType), "parseMsg_statuslook", 2
}
}
}
Is that all right?
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: r8399 and r8405: revolving_entity
Code: Select all
$entityElement = $elements_lut{$args->{type}};
$char->{amuletType} = $entityElement;
if ($config{$prefix . "_amuletType"}) {return 0 unless $config{$prefix . "_amuletType"} == $char->{amuletType}; }
Code: Select all
# 01D0 (spirits), 01E1 (coins), 08CF (amulets)
sub revolving_entity {
if ($lastSwitch eq '01D0') {
$entityType = T('spirit');
Code: Select all
$entityType = T('amulet');
message TF("You have %s %s(s) of %s now\n", $entityNum, $entityType, $entityElement);
Re: r8399 and r8405: revolving_entity
I'm not sure what to do ... So it got better?EternalHarvest wrote:Not very good for translators, but at least leave comments for translators for non-obvious templates. Better to split phrases about spirits, coins etc.
Code: Select all
if ($args->{switch} eq '01D0') {
$entityType = T('spirit'); # Note translation: Spirit sphere of the monks
} elsif ($args->{switch} eq '01E1') {
$entityType = T('coin'); # Note translation: Coin of the gunslinger
} elsif ($args->{switch} eq '08CF') {
$entityType = T('amulet'); # Note translation: Amulet of the warlock
Code: Select all
$entityElement ? message TF("You have %s %s(s) of %s now\n", $entityNum, $entityType, $entityElement), "parseMsg_statuslook", 1 : # Note translation: Message displays following: quantity, the name of the entity and its element
message TF("You have %s %s(s) now\n", $entityNum, $entityType), "parseMsg_statuslook", 1; # Note translation: Message displays following: quantity and the name of the entity
Code: Select all
$entityElement ? message TF("%s has %s %s(s) of %s now\n", $actor, $entityNum, $entityType, $entityElement), "parseMsg_statuslook", 1 : # Note translation: Message displays following: actor, quantity, the name of the entity and its element
message TF("%s has %s %s(s) now\n", $actor, $entityNum, $entityType), "parseMsg_statuslook", 1; # Note translation: Message displays following: actor, quantity and the name of the entity
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: r8399 and r8405: revolving_entity
We use "--add-comments='Translation Comment:'" for xgettext (as in src/po/update.sh), you can find usage examples both in code and in po files.