소스 검색

Merge branch 'APIv2'

Iñigo Valentin 6 년 전
부모
커밋
ce896dcae2
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 2
      application/API/v2/bin/upload_profile.py
  2. 2 1
      install_data/install_base.sql

+ 3 - 2
application/API/v2/bin/upload_profile.py

@@ -980,17 +980,18 @@ def parseRuneCraft(db, data):
         id = item["craft_item_id"]
         type = item["craft_type"]
         value = item["sell_value"]
-        info = str(item["craft_type_id"])
+        amount = str(item["amount"])
         """
         info : 5 or 6 digit number: RRSSQ
           RR: Rune
           SS: Stat
           Q:  Quality
         """
+        info = str(item["craft_type_id"])
         quality = int(info[-1:])
         stat = int(info[-4:-2])
         rune = int(info[:-4])
-        insert(db, "rune_craft", (uid, id, type, quality, rune, stat, value))
+        insert(db, "rune_craft", (uid, id, type, quality, rune, stat, value, amount))
 
 """
 Parses guild data (tables guild, guild_member).

+ 2 - 1
install_data/install_base.sql

@@ -576,7 +576,8 @@ CREATE TABLE k_rune_craft_type(
     name TEXT NOT NULL UNIQUE,
     gem INT NOT NULL CHECK(gem IN (1, 0)),
     inmemorial INT NOT NULL CHECK(inmemorial IN (1, 0)),
-    ancient INT NOT NULL CHECK(ancient IN (1, 0))
+    ancient INT NOT NULL CHECK(ancient IN (1, 0)),
+    amount INT NOT NULL CHECK(amount > 0)
 );
 INSERT INTO k_rune_craft_type VALUES(1,'Enchant Gem',1,0,0);
 INSERT INTO k_rune_craft_type VALUES(2,'Grindstone',0,0,0);