Search Downloads

Go Back   Pengoros's Portal > Bug List

» Home

Files: 1
Downloads: 514,739
Favorites: 379

New & Updated


View Bug Report
Player names containing hyphen not handled correctly (fix proposed)
Bug #: 75
File: BuffBars
Date: 04-11-2012 06:52 AM
By: LagunaD
Status: Fixed
When a character transfers to a server where the character's name is already taken, Turbine appends a "-1" to the name. I have such a character, named "Silmara-1".

In the file EffectTrigger.lua, in the method EffectTrigger:MatchesEffect, there is a comparison done on the player name using the line:

elseif (self.target ~= nil and string.match(target:GetName():lower(), self.target) == nil) then
The string.match function expects a pattern as its second argument, and a hyphen in the player name is interpreted (I think) as specifying a range of characters. The comparison therefore fails, even though both arguments (interpreted as literal strings) are identical, and no buffs on the player character are ever matched.

I was able to make it work for my character by changing the above line to:

elseif (self.target ~= nil and string.find(target:GetName():lower(), self.target, 1, true) == nil) then
The string.find method has an optional argument that tells it NOT to treat the second string as a pattern, and therefore the two identical strings are matched correctly.

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Pengoros - 11-30-2012 01:28 AM
Fixed in 2.0.5, thanks for the code snippet!

All times are GMT -5. The time now is 08:39 PM.

Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui