Skip to content

Commit

Permalink
Merge pull request #46 from lologarithm/upgrade_item_upgrade
Browse files Browse the repository at this point in the history
v1.1.15 - Upgraded UI for item upgrades tab
  • Loading branch information
lologarithm authored Sep 4, 2021
2 parents 6ce5162 + 4348657 commit 63edaf2
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 53 deletions.
23 changes: 12 additions & 11 deletions tbc/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ func NewEquipmentSet(equipSpec EquipmentSpec) Equipment {
const (
SubslotUnknown byte = iota
SubslotShield
SubslotTwoHand
)

// slot consts
Expand Down Expand Up @@ -531,16 +532,16 @@ var items = []Item{
{ID: 27910, Slot: EquipOffhand, SubSlot: SubslotShield, Name: "Silvermoon Crest Shield", Phase: 1, Quality: ItemQualityRare, SourceZone: "SLabs - Murmur", SourceDrop: "", Stats: Stats{20, 0, 0, 0, 23, 0, 5}},
{ID: 30984, Slot: EquipOffhand, SubSlot: SubslotShield, Name: "Spellbreaker's Buckler", Phase: 1, Quality: ItemQualityRare, SourceZone: "Akama's Promise - SMV Quest", SourceDrop: "", Stats: Stats{10, 22, 0, 0, 29, 0, 0}},
{ID: 27534, Slot: EquipOffhand, Name: "Hortus' Seal of Brilliance", Phase: 1, Quality: ItemQualityRare, SourceZone: "SH - Warchief Kargath Bladefist", SourceDrop: "", Stats: Stats{20, 18, 0, 0, 23, 0, 0}},
{ID: 29355, Slot: EquipWeapon, Name: "Terokk's Shadowstaff", Phase: 1, Quality: ItemQualityEpic, SourceZone: "H SH - Talon King Ikiss", SourceDrop: "", Stats: Stats{42, 40, 37, 0, 168, 0, 0}},
{ID: 29130, Slot: EquipWeapon, Name: "Auchenai Staff", Phase: 1, Quality: ItemQualityRare, SourceZone: "The Aldor - Revered", SourceDrop: "", Stats: Stats{46, 0, 26, 19, 121, 0, 0}},
{ID: 28341, Slot: EquipWeapon, Name: "Warpstaff of Arcanum", Phase: 1, Quality: ItemQualityRare, SourceZone: "Bot - Warp Splinter", SourceDrop: "", Stats: Stats{38, 37, 26, 16, 121, 0, 0}},
{ID: 31308, Slot: EquipWeapon, Name: "The Bringer of Death", Phase: 1, Quality: ItemQualityRare, SourceZone: "BoE World Drop", SourceDrop: "", Stats: Stats{31, 32, 42, 0, 121, 0, 0}},
{ID: 28188, Slot: EquipWeapon, Name: "Bloodfire Greatstaff", Phase: 1, Quality: ItemQualityRare, SourceZone: "BM - Aeonus", SourceDrop: "", Stats: Stats{42, 42, 28, 0, 121, 0, 0}},
{ID: 30011, Slot: EquipWeapon, Name: "Ameer's Impulse Taser", Phase: 1, Quality: ItemQualityRare, SourceZone: "Nexus-King Salhadaar - Netherstorm Quest", SourceDrop: "", Stats: Stats{27, 27, 27, 17, 103, 0, 0}},
{ID: 27842, Slot: EquipWeapon, Name: "Grand Scepter of the Nexus-Kings", Phase: 1, Quality: ItemQualityRare, SourceZone: "H MT - Nexus-Prince Shaffar", SourceDrop: "", Stats: Stats{43, 45, 0, 19, 121, 0, 0}},
{ID: 29355, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Terokk's Shadowstaff", Phase: 1, Quality: ItemQualityEpic, SourceZone: "H SH - Talon King Ikiss", SourceDrop: "", Stats: Stats{42, 40, 37, 0, 168, 0, 0}},
{ID: 29130, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Auchenai Staff", Phase: 1, Quality: ItemQualityRare, SourceZone: "The Aldor - Revered", SourceDrop: "", Stats: Stats{46, 0, 26, 19, 121, 0, 0}},
{ID: 28341, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Warpstaff of Arcanum", Phase: 1, Quality: ItemQualityRare, SourceZone: "Bot - Warp Splinter", SourceDrop: "", Stats: Stats{38, 37, 26, 16, 121, 0, 0}},
{ID: 31308, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "The Bringer of Death", Phase: 1, Quality: ItemQualityRare, SourceZone: "BoE World Drop", SourceDrop: "", Stats: Stats{31, 32, 42, 0, 121, 0, 0}},
{ID: 28188, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Bloodfire Greatstaff", Phase: 1, Quality: ItemQualityRare, SourceZone: "BM - Aeonus", SourceDrop: "", Stats: Stats{42, 42, 28, 0, 121, 0, 0}},
{ID: 30011, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Ameer's Impulse Taser", Phase: 1, Quality: ItemQualityRare, SourceZone: "Nexus-King Salhadaar - Netherstorm Quest", SourceDrop: "", Stats: Stats{27, 27, 27, 17, 103, 0, 0}},
{ID: 27842, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Grand Scepter of the Nexus-Kings", Phase: 1, Quality: ItemQualityRare, SourceZone: "H MT - Nexus-Prince Shaffar", SourceDrop: "", Stats: Stats{43, 45, 0, 19, 121, 0, 0}},

{ID: 28346, Slot: EquipOffhand, Name: "Gladiator's Endgame", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Arena Season 1 Reward", SourceDrop: "", Stats: Stats{14, 21, 0, 0, 19, 0, 0}},
{ID: 24557, Slot: EquipWeapon, Name: "Gladiator's War Staff", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Arena Season 1 Reward", SourceDrop: "", Stats: Stats{35, 48, 36, 21, 199, 0, 0}},
{ID: 24557, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Gladiator's War Staff", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Arena Season 1 Reward", SourceDrop: "", Stats: Stats{35, 48, 36, 21, 199, 0, 0}},

{ID: 29389, Slot: EquipTotem, Name: "Totem of the Pulsing Earth", Phase: 1, Quality: ItemQualityEpic, SourceZone: "15 Badge of Justice - G'eras", SourceDrop: "", Stats: Stats{0, 0, 0, 0, 0, 0, 0}, Activate: ActivateTotemOfPulsingEarth, ActivateCD: neverExpires},
// {Slot: EquipTotem, Name: "Totem of Impact", Phase: 1, Quality: ItemQualityRare, SourceZone: "15 Mark of Thrallmar/ Honor Hold", SourceDrop: "", Stats: Stats{0, 0, 0, 0, 0, 0, 0}},
Expand Down Expand Up @@ -651,9 +652,9 @@ var items = []Item{
{ID: 30723, Slot: EquipWeapon, Name: "Talon of the Tempest", Phase: 1, Quality: ItemQualityEpic, SourceZone: "World Boss", SourceDrop: "Doomwalker", Stats: Stats{StatStm: 0, StatInt: 10, StatSpellDmg: 194, StatSpellCrit: 19, StatSpellHit: 9}, GemSlots: []GemColor{GemColorYellow, GemColorYellow}, SocketBonus: Stats{StatInt: 3}},
{ID: 34009, Slot: EquipWeapon, Name: "Hammer of Judgement", Phase: 3, Quality: ItemQualityEpic, SourceZone: "Hyjal", SourceDrop: "Trash", Stats: Stats{StatStm: 33, StatInt: 22, StatSpellDmg: 236, StatSpellHit: 22}},
{ID: 32237, Slot: EquipWeapon, Name: "The Maelstrom's Fury", Phase: 3, Quality: ItemQualityEpic, SourceZone: "BT", SourceDrop: "Najentus", Stats: Stats{StatStm: 33, StatInt: 21, StatSpellDmg: 236, StatSpellCrit: 22}},
{ID: 28633, Slot: EquipWeapon, Name: "Staff of Infinite Mysteries", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Kara", SourceDrop: "Curator", Stats: Stats{StatStm: 61, StatInt: 51, StatSpellDmg: 185, StatSpellHit: 23}},
{ID: 29988, Slot: EquipWeapon, Name: "The Nexus Key", Phase: 2, Quality: ItemQualityEpic, SourceZone: "TK", SourceDrop: "Kaelthas", Stats: Stats{StatStm: 76, StatInt: 52, StatSpellDmg: 236, StatSpellCrit: 51}},
{ID: 32374, Slot: EquipWeapon, Name: "Zhar'doom, Greatstaff of the Devourer", Phase: 3, Quality: ItemQualityEpic, SourceZone: "BT", SourceDrop: "Illidan", Stats: Stats{StatStm: 70, StatInt: 47, StatSpellDmg: 259, StatHaste: 55, StatSpellCrit: 36}},
{ID: 28633, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Staff of Infinite Mysteries", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Kara", SourceDrop: "Curator", Stats: Stats{StatStm: 61, StatInt: 51, StatSpellDmg: 185, StatSpellHit: 23}},
{ID: 29988, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "The Nexus Key", Phase: 2, Quality: ItemQualityEpic, SourceZone: "TK", SourceDrop: "Kaelthas", Stats: Stats{StatStm: 76, StatInt: 52, StatSpellDmg: 236, StatSpellCrit: 51}},
{ID: 32374, Slot: EquipWeapon, SubSlot: SubslotTwoHand, Name: "Zhar'doom, Greatstaff of the Devourer", Phase: 3, Quality: ItemQualityEpic, SourceZone: "BT", SourceDrop: "Illidan", Stats: Stats{StatStm: 70, StatInt: 47, StatSpellDmg: 259, StatHaste: 55, StatSpellCrit: 36}},
{ID: 28734, Slot: EquipOffhand, Name: "Jewel of Infinite Possibilities", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Kara", SourceDrop: "Netherspite", Stats: Stats{StatStm: 19, StatInt: 18, StatSpellDmg: 23, StatSpellHit: 21}},
{ID: 28611, Slot: EquipOffhand, SubSlot: SubslotShield, Name: "Dragonheart Flameshield", Phase: 1, Quality: ItemQualityEpic, SourceZone: "Kara", SourceDrop: "Nightbane", Stats: Stats{StatStm: 19, StatInt: 33, StatSpellDmg: 23, StatMP5: 7}},
{ID: 34011, Slot: EquipOffhand, SubSlot: SubslotShield, Name: "Illidari Runeshield", Phase: 3, Quality: ItemQualityEpic, SourceZone: "BT", SourceDrop: "Trash", Stats: Stats{StatStm: 45, StatInt: 39, StatSpellDmg: 34}},
Expand Down
7 changes: 7 additions & 0 deletions ui/components/gear.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ class GearUI {
item.Enchant = null;
item.Gems = null;
this.currentGear[slot] = item;

// If the item is a 2h, remove any offhand that is currently equipped.
if (item.subSlot == 2 && this.currentGear["equipoffhand"] != null) {
this.currentGear["equipoffhand"] = null;
this.itemCompSlots["equipoffhand"].updateEquipped(null);
}

itemComp.updateEquipped(item);
} else if (change.gem != null) {
if (this.currentGear[slot].Gems == null) {
Expand Down
1 change: 0 additions & 1 deletion ui/components/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ function itemQualityCssClass(itemQuality) {
return 'qualityUncommon';
case 2:
return 'qualityRare';
this.name.style.color = "#589BE1"
case 3:
return 'qualityEpic';
case 4:
Expand Down
50 changes: 43 additions & 7 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ <h4>Standard Elemental Build</h4>
</select>
<button id="calcstatweight">Calculate</button>
</div>
<table id="statweights" style="width: 60%;margin: 0px auto;">
<table id="statweights" style="width: 90%;margin: 0px auto;max-width: 1080px;">
<tr style="font-size: 1.3em;font-weight: 700;text-align: center;">
<th></th>
<th>Dmg</th>
Expand All @@ -255,7 +255,7 @@ <h4>Standard Elemental Build</h4>
<th>MP5</th>
</tr>
<tr style="font-size: 1.2em;text-align: center;">
<td style="font-size: 1em;text-align:right;" id="">Mean Weight</td>
<td style="font-size: 1em;text-align:right" id="">Weight</td>
<td id="w0">0</td>
<td id="w1">0</td>
<td id="w2">0</td>
Expand All @@ -264,7 +264,7 @@ <h4>Standard Elemental Build</h4>
<td id="w5">0</td>
</tr>
<tr style="font-size: 1.2em;text-align: center;">
<td style="font-size: 1em;text-align:right;" id="">90% Confidence Weight Range</td>
<td style="font-size: 1em;text-align:right" id="">90% Conf</td>
<td id="wc0">-</td>
<td id="wc1">0</td>
<td id="wc2">0</td>
Expand All @@ -273,8 +273,44 @@ <h4>Standard Elemental Build</h4>
<td id="wc5">0</td>
</tr>
</table>
<table id="upgrades" style="margin: 0px auto;">
</table>
<div uk-grid id="upgrades" style="margin: 0px auto;">
<div class="uk-width-auto">
<ul class="uk-tab-left" id="upgradetabs" uk-tab="connect: #upgradeslots">
<li class="uk-active"><a href="#">Head</a></li>
<li><a href="#">Neck</a></li>
<li><a href="#">Shoulder</a></li>
<li><a href="#">Back</a></li>
<li><a href="#">Chest</a></li>
<li><a href="#">Wrist</a></li>
<li><a href="#">Hands</a></li>
<li><a href="#">Waist</a></li>
<li><a href="#">Legs</a></li>
<li><a href="#">Feet</a></li>
<li><a href="#">Finger</a></li>
<li><a href="#">Weapon</a></li>
<li><a href="#">Offhand</a></li>
<li><a href="#">Totem</a></li>
</ul>
</div>
<div class="uk-width-expand">
<ul id="upgradeslots" class="uk-switcher uk-margin" style="height: 100%;overflow: auto;margin-bottom:0px">
<li><table id="uphead" style="margin: 0px auto"></table></li>
<li><table id="upneck" style="margin: 0px auto"></table></li>
<li><table id="upshoulder" style="margin: 0px auto"></table></li>
<li><table id="upback" style="margin: 0px auto"></table></li>
<li><table id="upchest" style="margin: 0px auto"></table></li>
<li><table id="upwrist" style="margin: 0px auto"></table></li>
<li><table id="uphands" style="margin: 0px auto"></table></li>
<li><table id="upwaist" style="margin: 0px auto"></table></li>
<li><table id="uplegs" style="margin: 0px auto"></table></li>
<li><table id="upfeet" style="margin: 0px auto"></table></li>
<li><table id="upfinger" style="margin: 0px auto"></table></li>
<li><table id="upweapon" style="margin: 0px auto"></table></li>
<li><table id="upoffhand" style="margin: 0px auto"></table></li>
<li><table id="uptotem" style="margin: 0px auto"></table></li>
</ul>
</div>
</div>
</li>
<li style="height:100%">
<div style="text-align: right">
Expand All @@ -290,13 +326,13 @@ <h4>Standard Elemental Build</h4>
<pre id="simlogs" class="dtd" style="width: 99%;border:1px solid black;">
</pre>
</li>
</ul>
</ul>
</div>
</div>
<div id="pullout">
<div class="dtl" style="height:100%;width:100%;padding:10px">
<div id="themetoggle" style="height:20px; bottom: 10px; cursor: pointer;" onclick="toggletheme()">
<text>v1.1.14</text>
<text>v1.1.15</text>
<img id="themebulb" style="height: 20px; width: 20px" src="icons/light-bulb.svg"></img>
</div>
<div style="margin-top:10px">
Expand Down
Binary file modified ui/lib.wasm
Binary file not shown.
Loading

0 comments on commit 63edaf2

Please sign in to comment.