Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

equipAuto block does not work with Russian target names #3299

Open
ya4ept opened this issue Oct 30, 2020 · 0 comments
Open

equipAuto block does not work with Russian target names #3299

ya4ept opened this issue Oct 30, 2020 · 0 comments
Labels

Comments

@ya4ept
Copy link
Contributor

ya4ept commented Oct 30, 2020

  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants