Skip to content

Commit

Permalink
added Siege of Orgrimmar
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Sep 13, 2013
1 parent 0c4dc45 commit f03c858
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 50 deletions.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# **Features** ([demo](http://mottie.github.com/wowProgression/index.html))
# **Features** ([demo](http://Unrepentant.github.com/wowProgression/index.html))

* Automatic updates - uses the World of Warcraft API to obtain information.
* Works with any region and language.
Expand All @@ -17,27 +17,27 @@
# **Notes**

* Guild progression is determined from individual raider progression.
* A boss is determined to be killed when a set number of raiders have killed a boss (see the [ratio](https://github.com/Mottie/wowProgression/wiki/Options#wiki-ratio) option).
* A boss is determined to be killed when a set number of raiders have killed a boss (see the [ratio](https://github.com/Unrepentant/wowProgression/wiki/Options#wiki-ratio) option).
* Guild run achievements were not used because they didn't seem to return consistent results. Also only the last heroic boss is tracked.
* The number of boss kills can also be added to the tooltip. But because every raider has a different value, it averages the number of kills. So if a raider that has no boss kills is included, it may drastically affect the average.
* Any tooltip plugin can be used along with this script.

# **Screenshots**

### Showing fractional boss count with killed boss text
![fractions](http://mottie.github.com/wowProgression/demo/screenshot1.jpg)
![fractions](http://Unrepentant.github.com/wowProgression/demo/screenshot1.jpg)

### Showing percentage complete with killed boss text and number of kills (averaged)
![percentage](http://mottie.github.com/wowProgression/demo/screenshot2.jpg)
![percentage](http://Unrepentant.github.com/wowProgression/demo/screenshot2.jpg)

### Showing specific raider kill details inside the tooltip (see the [details](https://github.com/Mottie/wowProgression/wiki/Options#wiki-details) option)
![details](http://mottie.github.com/wowProgression/demo/screenshot3.jpg)
### Showing specific raider kill details inside the tooltip (see the [details](https://github.com/Unrepentant/wowProgression/wiki/Options#wiki-details) option)
![details](http://Unrepentant.github.com/wowProgression/demo/screenshot3.jpg)

# **Documentation**

* [Setup](https://github.com/Mottie/wowProgression/wiki/Setup)
* [Options](https://github.com/Mottie/wowProgression/wiki/Options)
* [Change Log](https://github.com/Mottie/wowProgression/wiki/Change)
* [Setup](https://github.com/Unrepentant/wowProgression/wiki/Setup)
* [Options](https://github.com/Unrepentant/wowProgression/wiki/Options)
* [Change Log](https://github.com/Unrepentant/wowProgression/wiki/Change)

# **Dependencies**

Expand All @@ -54,18 +54,24 @@

# **Change Log**

### Version 1.4.0

* Added Siege of Orgrimmar instance.
* Fixed the normal instance total number of bosses within the details display (click on any progress bar to see it).

### Version 1.3.0

* Fixed an issue with the plugin not working with localized languages properly.
* The plugin now uses the instance ID instead of the instance name, so now all intances names are localized properly.
* To change the language of the expansion name, modify the `allexps` option.

```javascript
allexps : {
"mists" : "mistery", // get it? HA!
"cat" : "cataclyzum" // I spell guud
}
```
```javascript
allexps : {
"mists" : "mistery", // get it? HA!
"cat" : "cataclyzum" // I spell guud
}
```

* Added a `debug` option which outputs to the console for troubleshooting.

### Version 1.2.1
Expand Down
1 change: 1 addition & 0 deletions css/progression.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

/* specific instances */
/* mists */
.wowprogression .inst-SoO .icon { background-position: -1963px -5px; }
.wowprogression .inst-ToT .icon { background-position: -1902px -5px; }
.wowprogression .inst-HoF .icon { background-position: -1780px -5px; }
.wowprogression .inst-MV .icon { background-position: -1719px -5px; }
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
guild : 'The Disreputable Dogs',
// list raiders under "all" for all expansion; or under a specific expansion
raiders : {
'all' : [ 'Dgenerate', 'Merci', 'Talthax', 'Alometella' ],
'mists' : [ 'Holydele' ],
'cat' : [ 'Holymist' ]
'all' : [ 'Merci', 'Talthax', 'Alometella', 'Xendia' ],
'mists' : [ 'Joranbragi' ],
'cat' : [ 'Motty' ]
},

// ** Appearance **
Expand Down
57 changes: 37 additions & 20 deletions js/jquery.wowProgression.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! WoW Progression v1.3.0
/*! WoW Progression v1.4.0
by Rob G (Mottie)
https://github.com/Mottie/wowProgression
http://www.opensource.org/licenses/mit-license.php
Expand Down Expand Up @@ -64,19 +64,30 @@
"mists" : "Mists of Pandaria",
"cat" : "Catacylsm"
},
// list of all raids in each expansion, with abbreviations & boss icons
/***
list of all raids in each expansion, with abbreviations & boss icons
get the id and icon numbers from wowhead, e.g.
Siege of Orgrimmar: http://www.wowhead.com/zone=6738 <- 6738 is the instance ID
Immerseus: http://www.wowhead.com/npc=71543 <- 71543 is the boss id/icon number (first boss)
if the raid doesn't show up, it might not be available from the battlenet feed:
http://us.battle.net/api/wow/character/{server}/{character}?locale=en_US&fields=progression
load the above feed replacing the {server}/{character} with appropriate names,
then CTRL-F to find the instance name & see if it exists
***/
allraids: {
"mists": [
{ abbr: "SoO", hasHeroic: true, id: 6738, icons: [71543,71475,71965,71734,72249,72616,71859,71515,71454,71889,71529,71504,71152,71865] },
{ abbr: "ToT", hasHeroic: true, id: 6622, icons: [69465,68476,69078,67977,68066,68177,67827,69017,69427,68078,68904,68397,69473], heroicBoss: true },
{ abbr: "ToES", hasHeroic: true, id: 6067, icons: [60583, 62442, 62983, 60999] },
{ abbr: "HoF", hasHeroic: true, id: 6297, icons: [62980, 62543, 62164, 62397, 62511, 62837] },
{ abbr: "ToES", hasHeroic: true, id: 6067, icons: [60583,62442,62983,60999] },
{ abbr: "HoF", hasHeroic: true, id: 6297, icons: [62980,62543,62164,62397,62511,62837] },
{ abbr: "MV", hasHeroic: true, id: 6125, icons: [60051,60009,60143,60701,60410,60396] }
],
"cat": [
{ abbr: "DS", hasHeroic: true, id: 5892, icons: [55265,55308,55312,55689,55294,56427,53879,57962] },
{ abbr: "FL", hasHeroic: true, id: 5723, icons: [52498,52558,53691,52530,53494,52571,52409] },
{ abbr: "ToFW", hasHeroic: true, id: 5638, icons: [45871,46753] },
// heroicBoss was added as a hack to make the last boss in the instance only show up in heroic mode; in this case it's Sinestra
// otherwise we'd have two separate "icons" arrays, one for normal and the other for heroic (lots of duplication)
{ abbr: "BoT", hasHeroic: true, id: 5334, icons: [44600,45993,43687,43324,45213], heroicBoss: true },
{ abbr: "BD", hasHeroic: true, id: 5094, icons: [42179,41570,41442,43296,41378,41376] },
{ abbr: "BH", hasHeroic: false,id: 5600, icons: [47120,52363,55869] }
Expand Down Expand Up @@ -176,7 +187,7 @@
if (hasInitialized) { return; }
var i, j, k, l, m, n, p, z,
bh, bn, bt, bt2, c, cn, ch,
dbt, dbn, dbh,
dbnt, dbht, dbn, dbh, hb,
t = '', th, tn, ttn, tth,
inst, instances, boss, exp,
len;
Expand All @@ -199,19 +210,22 @@
instances[j].name = inst.name;
if (o.debug) { output[exp][inst.name] = {}; }
// make tooltip
ttn = ''; tth = ''; dbt = []; dbn = []; dbh = [];
ttn = ''; tth = ''; dbnt = []; dbht = []; dbn = []; dbh = [];
boss = inst.bosses;
bn = 0; bh = 0;
bt = boss.length;
bt2 = bt;
bt = boss.length; // bt = boss total in normal
bt2 = bt; // bt2 = boss total in heroic (-1 if heroicBoss is true)
// find instance boss kill counts
for (l = 0; l < bt; l++) {

// Check for instance icon, if it doesn't exist, don't add it (removes Ragnaros repeat)
if (instances[j].icons[l]) {
dbt.push(l+1); // details boss # in header
cn = 0; tn = 0;
ch = 0; th = 0;
// has heroic boss
hb = !instances[j].heroicBoss || ( instances[j].heroicBoss && l < inst.bosses.length - 1 );
if (hb) { dbnt.push(l+1); } // details (normal) boss # in header
dbht.push(l+1); // (heroic)
cn = 0; tn = 0; // normal instance boss count/total
ch = 0; th = 0; // heroic instance boss count/total
// check other raiders
for (m = 0; m < len; m++){
// check that the raider is listed in the current expansion
Expand All @@ -221,13 +235,16 @@
// add raider names to detailed report
if (!dbn[m]) { dbn[m] = [z]; }
if (!dbh[m]) { dbh[m] = [z]; }
// calculate boss kills
if (raids[n][k].bosses[l].normalKills > 0) {
dbn[m].push('+');
cn++;
tn += raids[n][k].bosses[l].normalKills;
} else {
dbn[m].push('-');
// don't count the heroic only boss (only the last boss is skipped)
if (hb) {
// calculate boss kills
if (raids[n][k].bosses[l].normalKills > 0) {
dbn[m].push('+');
cn++;
tn += raids[n][k].bosses[l].normalKills;
} else {
dbn[m].push('-');
}
}
if (raids[n][k].bosses[l].heroicKills > 0) {
dbh[m].push('+');
Expand Down Expand Up @@ -302,7 +319,7 @@
bn + "/" + bt2 + " (" + p + ")</span></div></div>" + ttn;
// add details
ttn += "<div class='details'" + (o.details ? "" : " style='display:none'") +
"><hr><table><tr><td>Raider</td><td class='mono'>" + dbt.join(' ') + "</td></tr>";
"><hr><table><tr><td>Raider</td><td class='mono'>" + dbnt.join(' ') + "</td></tr>";
for (m = 0; m < len; m++){
if (dbn[m]) {
ttn += "<tr><td>" + dbn[m].shift() + "</td><td class='mono'>" + dbn[m].join(' ') + "</td></tr>";
Expand Down Expand Up @@ -334,7 +351,7 @@

// add details
tth += "<div class='details'" + (o.details ? "" : " style='display:none'") +
"><hr><table><tr><td>Raider</td><td class='mono'>" + dbt.join(' ') + "</td></tr>";
"><hr><table><tr><td>Raider</td><td class='mono'>" + dbht.join(' ') + "</td></tr>";
for (m = 0; m < len; m++){
if (dbh[m]) {
tth += "<tr><td>" + dbh[m].shift() + "</td><td class='mono'>" + dbh[m].join(' ') + "</td></tr>";
Expand Down
Loading

0 comments on commit f03c858

Please sign in to comment.