OpenKore / OpenKore/openkore

equipAuto block does not work with Russian target names

Open
#3,299 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Perl
Stars
1.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

  • Openkore version git: last
  • Server: rRO
  • Bug Report / Feature Request:
    config.txt:
equipAuto {
	disabled 0
	rightHand [NONE]
	armor Доспехи новичка
	target Поринг
}

i attack a Порин (Poring):

You are now attacking Monster Поринг  (1)
[AutoEquip] 1 monster=Поринг 
[AutoEquip][0] 1.1 monster is defined, targetList:ПорингПоринг
[ 32/100] You attack Monster Поринг  (1) (Dmg: 99) (Delay: 560ms)
You have gained 39/30 (0.52%/0.00%) Exp
Target died

debugging Utils::DataStructures::existsInList

sub existsInList {
	my ($list, $val, $test) = @_;
	if ($test) {
	print "[existsInList]1 list=$list\n";
	print "[existsInList]2 val=$val\n";
	}
	return 0 if ($val eq "");
	my @array = split / *, */, $list;
	$val = lc($val);
	foreach (@array) {
		s/^\s+//;
		s/\s+$//;
		s/\s+/ /g;
		next if ($_ eq "");
		print "[existsInList]3 _=$_, val=$val, lc_=".lc($_)."\n" if ($test);
		print "[existsInList]4 RETURN=1\n" if ($test and lc($_) eq $val);
		return 1 if (lc($_) eq $val);
	}
	return 0;
}
[existsInList]1 list=╨Я╨╛╤А╨╕╨╜╨│,Poring
[existsInList]2 val=╨Я╨╛╤А╨╕╨╜╨│
[existsInList]3 _=╨Я╨╛╤А╨╕╨╜╨│, val=╨┐╨╛╤А╨╕╨╜╨│ , lc_=╨┐╨╛╤А╨╕╨╜╨│
[existsInList]3 _=Poring, val=╨┐╨╛╤А╨╕╨╜╨│ , lc_=poring

why doesn't it return 1?

manual function call:
eval existsInList("Поринг, Poring", "Поринг", 1)

[existsInList]1 list=╨Я╨╛╤А╨╕╨╜╨│, Poring
[existsInList]2 val=╨Я╨╛╤А╨╕╨╜╨│
[existsInList]3 _=╨Я╨╛╤А╨╕╨╜╨│, val=╨┐╨╛╤А╨╕╨╜╨│, lc_=╨┐╨╛╤А╨╕╨╜╨│
[existsInList]4 RETURN=1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from Utils::DataStructures::existsInList and reproduce the equipAuto configuration with the Russian target name shown in the issue. Compare the direct function call with the in-game path and trace how the target list and value are represented; done means the Russian name matches correctly in equipAuto without breaking the existing Poring case.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
internationalization, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.