From 38bb63ebc3cf0d37aa118e937b19f8ba9c1effea Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 9 Sep 2024 00:32:55 -0300 Subject: [PATCH 1/2] itens do migeu --- db/dml.sql | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/db/dml.sql b/db/dml.sql index d2ed89e..d7e12ea 100644 --- a/db/dml.sql +++ b/db/dml.sql @@ -16194,7 +16194,6 @@ VALUES ('Pedregulho', null), ('Pedregulho', null), ('Maçã', NULL), - ('Maçã', NULL), ('Mapa', NULL), ('Olho do Ender', NULL), ('Bússola', NULL), @@ -16210,17 +16209,13 @@ VALUES ('Obsidiana', null), ('Obsidiana', null), ('Isqueiro', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Obsidiana', null), - ('Isqueiro', null); + ('Picareta de Ferro', 251), + ('Espada de Ferro', 250), + ('Machado de Ferro', 250), + ('Pá de Ferro', 251), + ('Barras de Ferro', NULL), + ('Barras de Ferro', NULL), + ('Barras de Ferro', NULL); -- Tabela Inventario INSERT INTO Inventario (id_inst_item, id_inventario) @@ -16250,12 +16245,7 @@ VALUES (23, 1), (24, 1), (25, 1), - (26, 1), - (27, 1), - (28, 1), - (29, 1), - (30, 1), - (31, 1); + (26, 1); -- Inserindo Mobs From 05cb0383ba926a44e16b023fd9835fbce42382ee Mon Sep 17 00:00:00 2001 From: EhOMiguel Date: Mon, 9 Sep 2024 00:34:08 -0300 Subject: [PATCH 2/2] Concertando query --- app/src/game/environment_actions.py | 2 +- app/src/game/gameplay.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/game/environment_actions.py b/app/src/game/environment_actions.py index cad95d4..5184cd8 100644 --- a/app/src/game/environment_actions.py +++ b/app/src/game/environment_actions.py @@ -83,7 +83,7 @@ def minerar_fonte(connection, cursor, nomeUser, nomeFonte): SELECT FerramentaMineraFonte.nome_ferramenta FROM FerramentaMineraFonte WHERE FerramentaMineraFonte.nome_fonte = %s - ORDER BY nome_ferramenta IS NULL, nome_ferramenta ASC LIMIT 1; + LIMIT 1; """, (nomeFonte,)) ferramenta_minima = cursor.fetchone() diff --git a/app/src/game/gameplay.py b/app/src/game/gameplay.py index a2566b2..45ad1a8 100644 --- a/app/src/game/gameplay.py +++ b/app/src/game/gameplay.py @@ -172,7 +172,7 @@ def processar_comando(connection, cursor, nomeUser, movimentos): utilizar_item(connection, cursor, nomeUser, nomeItem) break - elif acao == "minerar_fonte" and parametros: + elif acao == "minerar_fonte" and parametros: # Feito limpar_tela() nome_fonte = formatar_nome_item(' '.join(parametros)) minerar_fonte(connection, cursor, nomeUser, nome_fonte)