Bug: if I use chinese skill name in skillsAddAuto_list, the OP could not get correct name to auto add point. So I change one place to fix that.
--------------CoreLogic.pm-------------------
##### AUTO SKILLS RAISE #####
sub processAutoSkillsRaise {
if (!$skillChanged && $config{skillsAddAuto}) {
# Split list of skills and levels
my @list = split / *,+ */, ($config{skillsAddAuto_list});
foreach my $item (@list) {
# Split each skill/level pair
my ($sk, undef, $num) = $item =~ /^(.*?)( (\d+))?$/;
$num = 1 if (!defined $num);
my $skill = new Skill(name => $sk);
.......
.....
....
-----------------------------------------------
Origin: my $skill = new Skill(auto => $sk);
Bug: skillsAddAuto_list, If I use chinese skill name.
Moderators: Moderators, Developers
-
- Perl Monk
- Posts: 11
- Joined: 22 Apr 2008, 03:46
- Noob?: No
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
Before modified, I can add a skill by typing skill code, but can't add a skill by typing skill name.
After modified, I can add a skill by typing skill name, but can't add a skill by typing skill code.
I think the latter way is much better. Thank you very much! =)
To the Developers:
Can this commit to SVN?
After modified, I can add a skill by typing skill name, but can't add a skill by typing skill code.
I think the latter way is much better. Thank you very much! =)
To the Developers:
Can this commit to SVN?
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
none is better. it must be fixed.
-
- Kami-Sama Desu~
- Posts: 195
- Joined: 04 Apr 2008, 09:24
- Noob?: Yes
- Location: 31th Dimension
- Contact:
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
please make a diff patch.
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
I add some codes!
=================CoreLogic.pm==================
##### AUTO SKILLS RAISE #####
sub processAutoSkillsRaise {
if (!$skillChanged && $config{skillsAddAuto}) {
# Split list of skills and levels
my @list = split / *,+ */, ($config{skillsAddAuto_list});
foreach my $item (@list) {
# Split each skill/level pair
my ($sk, undef, $num) = $item =~ /^(.*?)( (\d+))?$/;
$num = 1 if (!defined $num);
my $skill = new Skill(auto => $sk);
if (!$skill->getIDN()) {
$skill = new Skill(handle => $sk);
if (!$skill->getIDN()) {
$skill = new Skill(name => $sk);
if (!$skill->getIDN()) {
error TF("Unknown skill '%s'; disabling skillsAddAuto\n", $sk);
$config{skillsAddAuto} = 0;
last;
}
}
}
================================================
use those in skillsAddAuto_list
Merchant' skill
37 ==== yes
MC_DISCOUNT ==== yes
低價買進 ===== yes.......(Big5 skill name)
=================CoreLogic.pm==================
##### AUTO SKILLS RAISE #####
sub processAutoSkillsRaise {
if (!$skillChanged && $config{skillsAddAuto}) {
# Split list of skills and levels
my @list = split / *,+ */, ($config{skillsAddAuto_list});
foreach my $item (@list) {
# Split each skill/level pair
my ($sk, undef, $num) = $item =~ /^(.*?)( (\d+))?$/;
$num = 1 if (!defined $num);
my $skill = new Skill(auto => $sk);
if (!$skill->getIDN()) {
$skill = new Skill(handle => $sk);
if (!$skill->getIDN()) {
$skill = new Skill(name => $sk);
if (!$skill->getIDN()) {
error TF("Unknown skill '%s'; disabling skillsAddAuto\n", $sk);
$config{skillsAddAuto} = 0;
last;
}
}
}
================================================
use those in skillsAddAuto_list
Merchant' skill
37 ==== yes
MC_DISCOUNT ==== yes
低價買進 ===== yes.......(Big5 skill name)
- Attachments
-
[The extension pm has been deactivated and can no longer be displayed.]
Last edited by woozc on 08 Sep 2008, 04:42, edited 1 time in total.
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
isieo wrote:please make a diff patch.
cs : ee : realist
-
- Perl Monk
- Posts: 11
- Joined: 22 Apr 2008, 03:46
- Noob?: No
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
Here:
Code: Select all
Index: CoreLogic.pm
===================================================================
--- CoreLogic.pm (revision 6532)
+++ CoreLogic.pm (working copy)
@@ -1905,18 +1905,25 @@
sub processAutoSkillsRaise {
if (!$skillChanged && $config{skillsAddAuto}) {
# Split list of skills and levels
- my @list = split / *,+ */, lc($config{skillsAddAuto_list});
+ my @list = split / *,+ */, ($config{skillsAddAuto_list});
foreach my $item (@list) {
# Split each skill/level pair
my ($sk, undef, $num) = $item =~ /^(.*?)( (\d+))?$/;
$num = 1 if (!defined $num);
+
my $skill = new Skill(auto => $sk);
if (!$skill->getIDN()) {
- error TF("Unknown skill '%s'; disabling skillsAddAuto\n", $sk);
- $config{skillsAddAuto} = 0;
- last;
+ $skill = new Skill(handle => $sk);
+ if (!$skill->getIDN()) {
+ $skill = new Skill(name => $sk);
+ if (!$skill->getIDN()) {
+ error TF("Unknown skill '%s'; disabling skillsAddAuto\n", $sk);
+ $config{skillsAddAuto} = 0;
+ last;
+ }
+ }
}
my $handle = $skill->getHandle();
-
- Super Moderators
- Posts: 801
- Joined: 06 May 2008, 12:47
- Noob?: No
Re: Bug: skillsAddAuto_list, If I use chinese skill name.
I have tested on latest svn with korean names and it worked so i assume this is also fixed.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!