From 00224585bb8772046061a36d4c6fab6eab2ccde4 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Fri, 14 Jun 2024 00:06:39 -0400 Subject: [PATCH] pokken: fix pokemon_data uk --- .../3657efefc5a4_pokken_fix_pokemon_uk.py | 54 +++++++++++++++++++ titles/pokken/base.py | 12 ++--- titles/pokken/data/fighters.json | 2 +- 3 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 core/data/alembic/versions/3657efefc5a4_pokken_fix_pokemon_uk.py diff --git a/core/data/alembic/versions/3657efefc5a4_pokken_fix_pokemon_uk.py b/core/data/alembic/versions/3657efefc5a4_pokken_fix_pokemon_uk.py new file mode 100644 index 0000000..2867fb7 --- /dev/null +++ b/core/data/alembic/versions/3657efefc5a4_pokken_fix_pokemon_uk.py @@ -0,0 +1,54 @@ +"""pokken_fix_pokemon_uk + +Revision ID: 3657efefc5a4 +Revises: 4a02e623e5e6 +Create Date: 2024-06-13 23:50:57.611998 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import mysql + +# revision identifiers, used by Alembic. +revision = '3657efefc5a4' +down_revision = '4a02e623e5e6' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column('pokken_pokemon_data', 'char_id', + existing_type=mysql.INTEGER(display_width=11), + nullable=True) + op.alter_column('pokken_pokemon_data', 'illustration_book_no', + existing_type=mysql.INTEGER(display_width=11), + nullable=False) + op.drop_constraint('pokken_pokemon_data_ibfk_1', table_name='pokken_pokemon_data', type_='foreignkey') + op.drop_index('pokken_pokemon_data_uk', table_name='pokken_pokemon_data') + op.create_unique_constraint('pokken_pokemon_uk', 'pokken_pokemon_data', ['user', 'illustration_book_no']) + op.create_foreign_key("pokken_pokemon_data_ibfk_1", "pokken_pokemon_data", "aime_user", ['user'], ['id']) + op.alter_column('pokken_profile', 'trainer_name', + existing_type=mysql.VARCHAR(length=16), + type_=sa.String(length=14), + existing_nullable=True) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column('pokken_profile', 'trainer_name', + existing_type=sa.String(length=14), + type_=mysql.VARCHAR(length=16), + existing_nullable=True) + op.drop_constraint('pokken_pokemon_data_ibfk_1', table_name='pokken_pokemon_data', type_='foreignkey') + op.drop_constraint('pokken_pokemon_uk', 'pokken_pokemon_data', type_='unique') + op.create_index('pokken_pokemon_data_uk', 'pokken_pokemon_data', ['user', 'char_id'], unique=True) + op.create_foreign_key("pokken_pokemon_data_ibfk_1", "pokken_pokemon_data", "aime_user", ['user'], ['id']) + op.alter_column('pokken_pokemon_data', 'illustration_book_no', + existing_type=mysql.INTEGER(display_width=11), + nullable=True) + op.alter_column('pokken_pokemon_data', 'char_id', + existing_type=mysql.INTEGER(display_width=11), + nullable=False) + # ### end Alembic commands ### diff --git a/titles/pokken/base.py b/titles/pokken/base.py index de974a3..fe11e99 100644 --- a/titles/pokken/base.py +++ b/titles/pokken/base.py @@ -305,12 +305,12 @@ class PokkenBase: for x in profile_dict.get("event_achievement_param", []): load_usr.event_achievement_param.append(x) - load_usr.support_set_1.append(profile_dict.get("support_set_1_1", 4294967295)) - load_usr.support_set_1.append(profile_dict.get("support_set_1_2", 4294967295)) - load_usr.support_set_2.append(profile_dict.get("support_set_2_1", 4294967295)) - load_usr.support_set_2.append(profile_dict.get("support_set_2_2", 4294967295)) - load_usr.support_set_3.append(profile_dict.get("support_set_3_1", 4294967295)) - load_usr.support_set_3.append(profile_dict.get("support_set_3_2", 4294967295)) + load_usr.support_set_1.append(profile_dict.get("support_set_1_1", 587)) + load_usr.support_set_1.append(profile_dict.get("support_set_1_2", 653)) + load_usr.support_set_2.append(profile_dict.get("support_set_2_1", 495)) + load_usr.support_set_2.append(profile_dict.get("support_set_2_2", 131)) + load_usr.support_set_3.append(profile_dict.get("support_set_3_1", 657)) + load_usr.support_set_3.append(profile_dict.get("support_set_3_2", 133)) res.load_user.CopyFrom(load_usr) return res.SerializeToString() diff --git a/titles/pokken/data/fighters.json b/titles/pokken/data/fighters.json index 90681ec..a5ba6f8 100644 --- a/titles/pokken/data/fighters.json +++ b/titles/pokken/data/fighters.json @@ -53,7 +53,7 @@ "type": 0, "artwork": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/257.png" }, - "4029": { + "10025": { "name_en": "Pikachu Libre", "name_jp": "マスクド・ピカチュウ", "type": 3,