Friday, May 16, 2008

Scanner changes for Issue 12

As I mentioned in my previous post, Issue 12 has changed the way things work in the chat message system. This has necessitated some fairly major changes in the HeroStats scanner as of version 4.1.0.6.

For HeroStats Users

If you're a HeroStats user, you'll notice the changes in your hero configuration options. The Channels and Globals tabs are gone - you can no longer choose which channels you'd like HeroStats to scan. Taking their place is a Scanner tab. There are two options here.

First, there is a checkbox which allows you to choose whether HeroStats should ignore any chat tabs that display only "chat-type" messages, which are messages that don't contain any statistics information. Typically this means things from your global chat channels, local chat, etc.

Second, you can enter the name of a tab that you would like HeroStats to scan while ignoring all others. This is very handy to increase performance. The name of this is "HSData" by default, although you can change it to whatever you like. If the name given here doesn't exist, HeroStats will fall back to the default behavior of scanning all tabs. The image below shows a sample setup of the HSData tab for best performance (this is on Test, but a Live setup would be the same minus the new Pet and Hit Rolls channels).


For Developers

If you're a developer who has used the HeroStats scanner in your own program, you'll need to make a few changes with versions 4.1.0.6 and above. The first thing you'll likely notice is that the CohScanner class no longer has properties to set which channels to scan. If you were using those, you'll need to remove that code.

There are some new properties on the CohScanner class, too. The boolean IgnoreChatTypeMessages property and the string HSDataTabName property implement the two hero configuration options described above. Both of these are static properties, so you'll need to set them on the CohScanner class (rather than an instance). You can update these while the scanner is running if you like, it'll recognize the changes.

If you'd like some more control over what chat tabs are being scanned, you can access the list of available tabs using the AvailableTabs property. This one's not static, so access it through your CohScanner instance. AvailableTabs is a List of ChatTab objects, each of which represents one of the user's chat tabs. You can get the tab name from the Name property, and the number of messages on the tab from the MessageCount property. You can also set whether a tab should be scanned with the IsScannable property; if true, the scanner will ignore this tab (unless it's the one specified in HSDataTabName).

Internally, the old ChatChannel class in the scanner has been greatly reduced. Most of its functionality is now in the new ChatTab class. The old channel types still exist, but they're really used only for looking at which channels should be on each tab. There is also a new property on the MemlocFinder class called IsLiveCode, which is used throughout the scanner to drive logic that's different between Live and Test servers.

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.