Bug: skillsAddAuto_list, If I use chinese skill name.

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

Message
Author
woozc
Noob
Noob
Posts: 4
Joined: 07 Apr 2008, 05:48

Bug: skillsAddAuto_list, If I use chinese skill name.

#1 Post by woozc »

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);

littlewens
Perl Monk
Perl Monk
Posts: 11
Joined: 22 Apr 2008, 03:46
Noob?: No

Re: Bug: skillsAddAuto_list, If I use chinese skill name.

#2 Post by littlewens »

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?

h4rry84
Moderators
Moderators
Posts: 234
Joined: 04 Apr 2008, 09:30
Noob?: Yes
Location: My House
Contact:

Re: Bug: skillsAddAuto_list, If I use chinese skill name.

#3 Post by h4rry84 »

none is better. it must be fixed.

isieo
Kami-Sama Desu~
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.

#4 Post by isieo »

please make a diff patch.

woozc
Noob
Noob
Posts: 4
Joined: 07 Apr 2008, 05:48

Re: Bug: skillsAddAuto_list, If I use chinese skill name.

#5 Post by woozc »

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)
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.

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Bug: skillsAddAuto_list, If I use chinese skill name.

#6 Post by sli »

isieo wrote:please make a diff patch.
cs : ee : realist

littlewens
Perl Monk
Perl Monk
Posts: 11
Joined: 22 Apr 2008, 03:46
Noob?: No

Re: Bug: skillsAddAuto_list, If I use chinese skill name.

#7 Post by littlewens »

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();

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: Bug: skillsAddAuto_list, If I use chinese skill name.

#8 Post by Technology »

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!

Post Reply