I want to offer up the code base that I have established for a 2.0-compatible RaidTracker addon.
Caveats
Some of this code is borrowed or open source (the javascript calendar popup, some functions of Armorysync, etc.) It was all with permission, or deemed open source for personal use. Please make sure that if you re-use this code you apply all terms of copyright.
I make no warranties, expressed or implied, about whether this code will work, or cause any damage to your existing data. Make a backup of your data before attempting to play with this code.
I will openly give permission for anyone to utilize this code as a base for finishing a working version of a raidtracker. Please just leave me a little line of credit somewhere ("Thanks, Gaxme, for that little nugget." or something) if you use anything I wrote.
I may continue to work on the project, but I cannot gurantee it. I hope by releasing this code it can be utilized by someone with more time.
/Caveats
This is extremely rough code, many of the functions are not yet working on the front-end display. However, it should prove a decent framework or code base for someone wanting to pick up the project and run with it.
Things that do work that should be useful:
Incoming data, for the most part, is correctly collated. It may need a few tweaks to work with the newest MLDKP tracker, I have not tested it.
Scanning is done for replacement vs. additional data when uploading. One of my frustrations with the old version was that, if there were 3 officers on a raid and one logged early, that was the version of the raid that stuck. Additional bosses were never logged, since the raid already existed. This version goes through a series of checks to scan RaidID, then date within a specified period.
One of the major challenges was getting it to work with multi-guild setups. I attempted to tackle this by scanning the current uploader context in comparison to the raidtracker's data. (The creator put in a player@realm context for me.) It may or may not be working correctly, I don't remember.
Probably the most useful is that, with Zanix and a few others' collaboration
, I implimented a system that caches items in a local database or fetches them from the armory if they are not there. You must be running the base character profile addons to use this system, because loot is checked in the following ways to display tooltips:
1) If it exists in the standard item DB, it is shown as equipped on the character.
2) If it exists in the local (Raidtracker) item DB, it is shown as cached.
3) If it does not exist in either of the above, it downloads the item from the armory and caches it.
That particular code segment we had talked about implimenting in later versions of Roster for a unified item database. Maybe Zanix or Pleegwat can pull that section out.
My Concept
I intended to have a per guild/realm/character listing of all attended raids, loots, and boss kills; as well as an administrative interface to remove (by way of marking things not to show up, since uploaded data would just re-add if it was deleted) any of those items.
If you install it, you'll see that I added buttons to each of the contexts. Many of those front-end pages do not work, since I was just starting to design them when I stopped work.
Item Cache Format
I don't remember if the system makes the item cache. I do not remember adding that functionality, since it had been in testing. Here's the format for it:
- Code: Select all
DROP TABLE IF EXISTS `roster20_addons_raidtracker_itemcache`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `roster20_addons_raidtracker_itemcache` (
`item_id` int(11) NOT NULL auto_increment,
`wow_id` varchar(64) NOT NULL default '0:0:0:0:0:0',
`item_name` varchar(96) NOT NULL default '',
`item_color` varchar(16) NOT NULL default 'ffffffff',
`item_texture` varchar(64) NOT NULL default '',
`item_tooltip` mediumtext,
`html_tooltip` mediumtext,
`item_level` int(11) NOT NULL default '0',
`locale` varchar(4) NOT NULL default 'enUS',
`last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`item_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1456 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
Finale
That's all I've got for now. Thank you everyone that helped me get a lock on the things that did get done. I hope this comes in handy for someone.