Skip to content

Commit

Permalink
add faction quartermasters ids for source links
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosen Rusinov committed May 11, 2024
1 parent c14bd8d commit 630020e
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 80 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/database/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -9548,7 +9548,6 @@
{"id":76858,"name":"Opportunity Strike","icon":"ability_backstab"},
{"id":77130,"name":"Improved Cleanse Spirit","icon":"ability_shaman_cleansespirit"},
{"id":77215,"name":"Potent Afflictions","icon":"ability_warlock_everlastingaffliction"},
{"id":77219,"name":"Master Demonologist","icon":"spell_shadow_shadowpact"},
{"id":77220,"name":"Fiery Apocalypse","icon":"spell_fire_moltenblood"},
{"id":77223,"name":"Enhanced Elements","icon":"spell_nature_elementalprecision_2"},
{"id":77478,"name":"Earthquake","icon":"spell_shaman_earthquake"},
Expand All @@ -9575,6 +9574,7 @@
{"id":77794,"name":"Focused Insight","icon":"spell_shaman_measuredinsight"},
{"id":77795,"name":"Focused Insight","icon":"spell_shaman_measuredinsight"},
{"id":77796,"name":"Focused Insight","icon":"spell_shaman_measuredinsight"},
{"id":77799,"name":"Fel Flame","icon":"spell_fire_felfirenova"},
{"id":77801,"name":"Demon Soul","icon":"spell_warlock_demonsoul"},
{"id":77829,"name":"Ancestral Resolve","icon":"spell_nature_rune"},
{"id":77830,"name":"Ancestral Resolve","icon":"spell_nature_rune"},
Expand Down
152 changes: 76 additions & 76 deletions assets/db_inputs/atlasloot_db.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions sim/warlock/demon_soul.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ func (warlock *Warlock) registerDemonSoulSpell() {
Timer: warlock.NewTimer(),
Duration: time.Minute * 2,
},
DefaultCast: core.Cast{
NonEmpty: true,
},
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
Expand Down
7 changes: 6 additions & 1 deletion tools/database/atlasloot.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func readAtlasLootFactionData(db *WowDatabase, srcUrl string) {
RepLevel: repLevel,
}

item := &proto.UIItem{Id: int32(itemID), Sources: []*proto.UIItemSource{{
item := &proto.UIItem{Id: int32(itemID), FactionRestriction: AtlasLootFactionRestrictions[faction], Sources: []*proto.UIItemSource{{
Source: &proto.UIItemSource_Rep{
Rep: factionSource,
},
Expand Down Expand Up @@ -352,6 +352,11 @@ var AtlasLootFactions = map[string]proto.Faction{
"FACTIONS_ALLI_CONTENT": proto.Faction_Alliance,
"FACTIONS_HORDE_CONTENT": proto.Faction_Horde,
}
var AtlasLootFactionRestrictions = map[proto.Faction]proto.UIItem_FactionRestriction{
proto.Faction_Unknown: proto.UIItem_FACTION_RESTRICTION_UNSPECIFIED,
proto.Faction_Alliance: proto.UIItem_FACTION_RESTRICTION_ALLIANCE_ONLY,
proto.Faction_Horde: proto.UIItem_FACTION_RESTRICTION_HORDE_ONLY,
}
var AtlasLootRepLevel = map[string]proto.RepLevel{
"Exalted": proto.RepLevel_RepLevelExalted,
"Revered": proto.RepLevel_RepLevelRevered,
Expand Down
5 changes: 3 additions & 2 deletions ui/core/components/gear_picker/gear_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ActionId } from '../../proto_utils/action_id';
import { getEnchantDescription, getUniqueEnchantString } from '../../proto_utils/enchants';
import { EquippedItem } from '../../proto_utils/equipped_item';
import { gemMatchesSocket, getEmptyGemSocketIconUrl } from '../../proto_utils/gems';
import { difficultyNames, professionNames, REP_FACTION_NAMES, REP_LEVEL_NAMES, shortSecondaryStatNames, slotNames } from '../../proto_utils/names';
import { difficultyNames, professionNames, REP_FACTION_NAMES, REP_FACTION_QUARTERMASTERS, REP_LEVEL_NAMES, shortSecondaryStatNames, slotNames } from '../../proto_utils/names';
import { Stats } from '../../proto_utils/stats';
import { getPVPSeasonFromItem, isPVPItem } from '../../proto_utils/utils';
import { Sim } from '../../sim';
Expand Down Expand Up @@ -1637,8 +1637,9 @@ export class ItemList<T extends ItemListType> {
source.source.oneofKind == 'rep' ? REP_FACTION_NAMES[source.source.rep.repFactionId] : REP_FACTION_NAMES[RepFaction.RepFactionUnknown],
);
const src = source.source.rep;
const npcId = REP_FACTION_QUARTERMASTERS[src.repFactionId]
return makeAnchor(
ActionId.makeItemUrl(item.id),
ActionId.makeNpcUrl(npcId),
<>
{factionNames.map(name => (
<span>
Expand Down
13 changes: 13 additions & 0 deletions ui/core/proto_utils/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,19 @@ export const REP_FACTION_NAMES: Record<RepFaction, string> = {
[RepFaction.RepFactionAvengersOfHyjal]: 'Avengers of Hyjal',
};

export const REP_FACTION_QUARTERMASTERS: Record<RepFaction, number> = {
[RepFaction.RepFactionUnknown]: 0,
[RepFaction.RepFactionTheEarthenRing]: 50324,
[RepFaction.RepFactionGuardiansOfHyjal]: 50314,
[RepFaction.RepFactionTherazane]: 45408,
[RepFaction.RepFactionDragonmawClan]: 49387,
[RepFaction.RepFactionRamkahen]: 48617,
[RepFaction.RepFactionWildhammerClan]: 49386,
[RepFaction.RepFactionBaradinsWardens]: 47328,
[RepFaction.RepFactionHellscreamsReach]: 48531,
[RepFaction.RepFactionAvengersOfHyjal]: 54401,
}

export const masterySpellNames: Map<Spec, string> = new Map([
[Spec.SpecAssassinationRogue, 'Potent Poisons'],
[Spec.SpecCombatRogue, 'Main Gauche'],
Expand Down

0 comments on commit 630020e

Please sign in to comment.