asamy / forgottenmapeditor

Map editor written in lua for Open Tibia. Written with OtClient's framework.
Other
46 stars 20 forks source link

Item search functions #32

Closed tosty33 closed 11 years ago

tosty33 commented 11 years ago

Hello, I'm planning to start working on Search Widget soon, but I found out that there are two missing functions for it:

asamy commented 11 years ago

Do you want a regex/wildcard search also?

On Thu, Aug 29, 2013 at 11:51 AM, Mateusz Pawlica notifications@github.comwrote:

Hello, I'm planning to start working on Search Widget soon, but I found out that there are two missing functions for it:

  • findItemTypesByName - I know that there's already 'findItemTypeByName' function, but what if there are more items with the same name (for ex. wooden chair)?
  • findItemTypesByString - useful function for autocomplete feature, for ex. findItemTypesByString('cha') will return all items with 'cha' in name.

— Reply to this email directly or view it on GitHubhttps://github.com/allanference/forgottenmapeditor/issues/32 .

tosty33 commented 11 years ago

No, I think it won't be needed.

asamy commented 11 years ago

Hmm, looks like I'm going to convert the ItemType list to be a hashmap, since the auto completion function would be slow. (Will do that later though)

Testing compilation and i'll commit the changes.

asamy commented 11 years ago

OTClient's upstream commit https://github.com/edubart/otclient/commit/3db8f54aa9c381a0e24479c9e4ee25ca54006d46 implements both.