+101201
-87
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -12,8 +12,8 @@
|
|||||||
"free_sns_coin": 0,
|
"free_sns_coin": 0,
|
||||||
"paid_sns_coin": 0,
|
"paid_sns_coin": 0,
|
||||||
"social_point": 1438395,
|
"social_point": 1438395,
|
||||||
"unit_max": 904,
|
"unit_max": 5000,
|
||||||
"waiting_unit_max": 700,
|
"waiting_unit_max": 1000,
|
||||||
"energy_max": 417,
|
"energy_max": 417,
|
||||||
"energy_full_time": "2023-03-20 03:58:55",
|
"energy_full_time": "2023-03-20 03:58:55",
|
||||||
"license_live_energy_recoverly_time": 60,
|
"license_live_energy_recoverly_time": 60,
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ require (
|
|||||||
github.com/redis/go-redis/v9 v9.0.2
|
github.com/redis/go-redis/v9 v9.0.2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require github.com/mattn/go-sqlite3 v1.14.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
@@ -14,7 +16,7 @@ require (
|
|||||||
github.com/go-playground/locales v0.14.0 // indirect
|
github.com/go-playground/locales v0.14.0 // indirect
|
||||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||||
github.com/go-playground/validator/v10 v10.11.1 // indirect
|
github.com/go-playground/validator/v10 v10.11.1 // indirect
|
||||||
github.com/goccy/go-json v0.9.11 // indirect
|
github.com/goccy/go-json v0.9.11
|
||||||
github.com/google/gopacket v1.1.19
|
github.com/google/gopacket v1.1.19
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/leodido/go-urn v1.2.1 // indirect
|
github.com/leodido/go-urn v1.2.1 // indirect
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
|
|||||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||||
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
|
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
||||||
|
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ func main() {
|
|||||||
tools.AnalysisApi1Data("assets/api1.json")
|
tools.AnalysisApi1Data("assets/api1.json")
|
||||||
tools.AnalysisApi2Data("assets/api2.json")
|
tools.AnalysisApi2Data("assets/api2.json")
|
||||||
tools.AnalysisApi3Data("assets/api3.json")
|
tools.AnalysisApi3Data("assets/api3.json")
|
||||||
|
// tools.ListUnitData()
|
||||||
|
|
||||||
if config.Conf.SifCap.Enabled {
|
if config.Conf.SifCap.Enabled {
|
||||||
sifcap.Start()
|
sifcap.Start()
|
||||||
|
|||||||
+111
@@ -0,0 +1,111 @@
|
|||||||
|
package tools
|
||||||
|
|
||||||
|
import (
|
||||||
|
"database/sql"
|
||||||
|
"fmt"
|
||||||
|
"honoka-chan/model"
|
||||||
|
|
||||||
|
"github.com/goccy/go-json"
|
||||||
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ListUnitData() {
|
||||||
|
db, err := sql.Open("sqlite3", "assets/unit.db")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
sql := `SELECT unit_id,rarity,rank_min,rank_max,hp_max,default_removable_skill_capacity FROM unit_m WHERE unit_id NOT IN (SELECT unit_id FROM unit_m WHERE unit_type_id IN (SELECT unit_type_id FROM unit_type_m WHERE image_button_asset IS NULL AND (background_color = 'dcdbe3' AND original_attribute_id IS NULL) OR (unit_type_id IN (10,110,127,128,129) OR unit_type_id BETWEEN 131 AND 140)));`
|
||||||
|
rows, err := db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
unitsData := []model.Active{}
|
||||||
|
oId := 3071290948
|
||||||
|
|
||||||
|
for rows.Next() {
|
||||||
|
unitData := model.Active{}
|
||||||
|
var uid, rit, rank, max_rank, hp_max, skill_capacity int
|
||||||
|
err = rows.Scan(&uid, &rit, &rank, &max_rank, &hp_max, &skill_capacity)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
oId++
|
||||||
|
|
||||||
|
unitData.UnitOwningUserID = oId
|
||||||
|
unitData.UnitID = uid
|
||||||
|
unitData.LevelLimitID = 1
|
||||||
|
unitData.Rank = rank
|
||||||
|
unitData.MaxRank = max_rank
|
||||||
|
unitData.MaxHp = hp_max
|
||||||
|
unitData.DisplayRank = 2
|
||||||
|
unitData.InsertDate = "2023-03-17 21:35:20"
|
||||||
|
if rit != 4 {
|
||||||
|
unitData.Exp = 0
|
||||||
|
unitData.Level = 1
|
||||||
|
unitData.Love = 0
|
||||||
|
unitData.UnitSkillExp = 0
|
||||||
|
unitData.UnitSkillLevel = 1
|
||||||
|
unitData.UnitRemovableSkillCapacity = skill_capacity
|
||||||
|
unitData.FavoriteFlag = false
|
||||||
|
unitData.IsRankMax = false
|
||||||
|
unitData.IsLevelMax = false
|
||||||
|
unitData.IsLoveMax = false
|
||||||
|
unitData.IsSigned = false
|
||||||
|
unitData.IsSkillLevelMax = false
|
||||||
|
unitData.IsRemovableSkillCapacityMax = false
|
||||||
|
switch rit {
|
||||||
|
case 1:
|
||||||
|
// N
|
||||||
|
unitData.NextExp = 6
|
||||||
|
unitData.MaxLevel = 40
|
||||||
|
unitData.MaxLove = 50
|
||||||
|
case 2:
|
||||||
|
// R
|
||||||
|
unitData.NextExp = 14
|
||||||
|
unitData.MaxLevel = 60
|
||||||
|
unitData.MaxLove = 200
|
||||||
|
case 3:
|
||||||
|
// SR
|
||||||
|
unitData.NextExp = 54
|
||||||
|
unitData.MaxLevel = 80
|
||||||
|
unitData.MaxLove = 500
|
||||||
|
case 5:
|
||||||
|
// SSR
|
||||||
|
unitData.NextExp = 128
|
||||||
|
unitData.MaxLevel = 90
|
||||||
|
unitData.MaxLove = 750
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// UR
|
||||||
|
unitData.Exp = 117111 // Lv.120
|
||||||
|
unitData.NextExp = 0
|
||||||
|
unitData.Level = 120
|
||||||
|
unitData.MaxLevel = 120
|
||||||
|
unitData.Love = 1000
|
||||||
|
unitData.MaxLove = 1000
|
||||||
|
unitData.UnitSkillExp = 29900
|
||||||
|
unitData.UnitSkillLevel = 8
|
||||||
|
unitData.UnitRemovableSkillCapacity = 8
|
||||||
|
unitData.FavoriteFlag = true
|
||||||
|
unitData.IsRankMax = false
|
||||||
|
unitData.IsLevelMax = false
|
||||||
|
unitData.IsLoveMax = false
|
||||||
|
unitData.IsSigned = true
|
||||||
|
unitData.IsSkillLevelMax = true
|
||||||
|
unitData.IsRemovableSkillCapacityMax = true
|
||||||
|
}
|
||||||
|
|
||||||
|
unitsData = append(unitsData, unitData)
|
||||||
|
}
|
||||||
|
|
||||||
|
data, err := json.Marshal(unitsData)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
fmt.Println(string(data))
|
||||||
|
|
||||||
|
db.Close()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user