jedi-gg / swgoh.gg.public

SWGOH.GG Issues
https://swgoh.gg
41 stars 12 forks source link

Some Omicrons not marked as such in the API #751

Closed driderdesigns closed 2 years ago

driderdesigns commented 2 years ago

Admiral Ackbar is one example. His Rebel Coordination ability has an Omicron, both in game and on the swgoh.gg web site. https://swgoh.gg/characters/admiral-ackbar/ The JSON data coming from the player API does not mark the ability as being an omicron.

"data": {
"base_id": "ADMIRALACKBAR",
"name": "Admiral Ackbar",
"gear_level": 11,
"level": 85,
"power": 16494,
"rarity": 7,
...
"url": "/p/838822353/characters/admiral-ackbar",
...
"zeta_abilities": [],
"omicron_abilities": [],
"ability_data": [
    ...
    {
        "id": "leaderskill_ADMIRALACKBAR",
        "ability_tier": 7,
        "is_omega": false,
        "is_zeta": false,
        "is_omicron": false,
        "has_omicron_learned": false,
        "has_zeta_learned": false,
        "name": "Rebel Coordination",
        "tier_max": 7
    },

Unmarked Omicrons: Admiral Ackbar - Rebel Coordination Director Krennic - Immeasurable Power Princess Leia - Against All Odds Embo - Way of the Kyuzo Jyn Erso - Fierce Determination Luke Skywalker (Farmboy) - Draw a Bead T3-M4 - Master Gearhead

I think Wampa or Zam used to be unmarked, but appears to be correct now. Maybe it's only new Omicrons that need time to propogate to the API?

scobenes commented 2 years ago

hmmm, thats a caching bug, that we will have to look into. I would recommend using the data provided by https://swgoh.gg/api/abilities/ to know if a given id is an omicron. This one is not a quick fix, and you can just use the ability definitions I linked to figure out if we are lying in that.

Basically what happens is we write this data to elasticsearch, CG changes it to be an omicron, and we dont break the cache to fix all of these units that potentially changed. if that user changed something about their ackbar that SHOULD change and fix itself.

driderdesigns commented 2 years ago

Caching logic makes sense... Abilities API looks good though, and it's the "right" source for that info anyway. I'll switch to that once I can work on getting around the CDN block. Thanks! It also explains why my Wampa shows up correctly now... I finally started working on him.