修复一些小问题

This commit is contained in:
UnKownOwO
2022-11-24 11:56:37 +08:00
parent 01bcaa0309
commit 6dd7cb3f43
3088 changed files with 26 additions and 91314 deletions

View File

@@ -3,7 +3,6 @@ package config
import (
"encoding/json"
"hk4e/logger"
"io/ioutil"
"os"
"strings"
)
@@ -24,7 +23,7 @@ type AbilityEmbryoEntry struct {
func (g *GameDataConfig) loadAbilityEmbryos() {
dirPath := g.binPrefix + "Avatar"
fileList, err := ioutil.ReadDir(dirPath)
fileList, err := os.ReadDir(dirPath)
if err != nil {
logger.LOG.Error("open dir error: %v", err)
return

View File

@@ -3,7 +3,6 @@ package config
import (
appConfig "hk4e/common/config"
"hk4e/logger"
"io/ioutil"
"os"
)
@@ -141,7 +140,7 @@ func (g *GameDataConfig) WriteWorldTerrain(data []byte) {
logger.LOG.Error("open game data world static dir error: %v", err)
return
}
err = ioutil.WriteFile(resourcePath+"/WorldStatic/world_terrain.bin", data, 0644)
err = os.WriteFile(resourcePath+"/WorldStatic/world_terrain.bin", data, 0644)
if err != nil {
logger.LOG.Error("write world terrain file error: %v", err)
return

View File

@@ -3,7 +3,6 @@ package config
import (
"encoding/json"
"hk4e/logger"
"io/ioutil"
"os"
"strings"
)
@@ -55,7 +54,7 @@ func (g *GameDataConfig) loadOpenConfig() {
folderNames := []string{"Talent/EquipTalents", "Talent/AvatarTalents"}
for _, v := range folderNames {
dirPath := g.binPrefix + v
fileList, err := ioutil.ReadDir(dirPath)
fileList, err := os.ReadDir(dirPath)
if err != nil {
logger.LOG.Error("open dir error: %v", err)
return

View File

@@ -3,7 +3,6 @@ package config
import (
"encoding/json"
"hk4e/logger"
"io/ioutil"
"os"
"strconv"
"strings"
@@ -37,7 +36,7 @@ func (g *GameDataConfig) loadScenePoints() {
g.ScenePointEntries = make(map[string]*ScenePointEntry)
g.ScenePointIdList = make([]int32, 0)
dirPath := g.binPrefix + "Scene/Point"
fileList, err := ioutil.ReadDir(dirPath)
fileList, err := os.ReadDir(dirPath)
if err != nil {
logger.LOG.Error("open dir error: %v", err)
return