I was going to annoy Sidoh on msn this weekend about this project. I'm very interested in it. You're going to make it plugin-accessable, right?
Would you like to write something for it?
As it stands, the WoW aspect itself is a plugin. Pretty much, the way it works is this:
JinxBot (program) enumerates all the plugin DLLs. There are two kinds of plugin DLLs, the ones that provide connections and UIs for protocols (for example, Battle.net, WoW, etc.). The other will extend the user interface of individual connections; for instance, I might have two WoW connections and a Battle.net connection going at once. The WoW connections can have a separate set of plugins running, or the same plugins running with different parameters. It may be possible that a single plugin can support more than one connection type, too, but since each connection is supposed to have its own set of events (in an enumeration) and objects, it wouldn't be without some adaptation layer.
Plugins are unloaded from memory until their first actual use, at which point they're loaded into the main AppDomain space and are not unloaded for the duration of the application's lifetime. (This is because graphical elements from an alternate AppDomain, which could have been unloaded, could not be marshalled across AppDomain boundaries).
When is this going to be open for beta
I'm hoping to release a closed beta to clan members at some point in the next couple of weeks. Before an open beta would begin I need to document the API and create a sample plugin - probably for Battle.net - and open-source it. I am NOT open-sourcing the WoW plugin, but there will be an API for that.
For example:
public Image GetIconFor(Item item)
{
Image img = null;
DbcFile itemDisplayInfo = InterfaceData.Singleton.ItemDisplayInfoDatabase;
string iconName = null;
lock (itemDisplayInfo)
{
if (itemDisplayInfo.FindRecordById(item.DisplayId))
{
iconName = itemDisplayInfo.GetStringInColumn(5);
}
else return img;
}
string iconPath = string.Format("Interface\\Icons\\{0}.blp", iconName);
try
{
BlpImage blp = new BlpImage(InterfaceData.Singleton.InterfaceArchive.OpenFile(iconPath));
img = blp.ToBitmap();
} catch (FileNotFoundException ex) { return null; }
return img;
}
All of that will be publically-accessible. Obviously that code requires a working knowledge of the MPQ file layouts and DBC files, but this information can be viewed either by using something like MyWarCraftStudio or
www.hackwow.com, respectively.