Update GaCy-GO

This commit is contained in:
CAtlas0784 committed 2026-10-28 18:54:43 +07:00
1 parent da8a32f60d
commit 0cbe460e49
345 files changed
+98202 -77559

No files matched your search

+26 -21
View File
@@ -2,11 +2,9 @@ package gameserver
import (
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"gac-hkrpg-go/internal/common"
goproto "gac-hkrpg-go/protocol/proto"
)
@@ -63,25 +61,32 @@ func init() {
finalData = append(finalData, '\n')
finalData = append(finalData, probe...)
}
if refresh, err := loadAARoundRefreshLua(s); err != nil {
PacketLog("AA round refresh withheld: " + err.Error())
} else {
finalData = append(finalData, refresh...)
}
if presentation, err := loadGachaPresentationLua(); err != nil {
PacketLog("GACHA presentation withheld: " + err.Error())
} else {
finalData = append(finalData, presentation...)
}
// Load all .lua files from scripts/ directory in deterministic order
if entries, err := os.ReadDir("scripts"); err == nil {
var luaFiles []string
for _, entry := range entries {
if !entry.IsDir() && strings.HasSuffix(entry.Name(), ".lua") {
luaFiles = append(luaFiles, entry.Name())
}
}
sort.Strings(luaFiles)
for _, name := range luaFiles {
if content, err := os.ReadFile(filepath.Join("scripts", name)); err == nil {
finalData = append(finalData, '\n')
finalData = append(finalData, content...)
}
}
} else if freecam, err := os.ReadFile("scripts/freecam.lua"); err == nil {
if camera, err := common.ReadFaceCamSettings(); err == nil {
finalData = append(finalData, []byte(fmt.Sprintf("\n_G.__GAC_CAMERA_SETTINGS={mode=%q,distance=%.3f}\n", camera.Mode, camera.Distance))...)
} else {
PacketLog("Camera settings withheld: " + err.Error())
}
luaScripts := common.ClientLuaScripts()
for _, script := range luaScripts {
finalData = append(finalData, '\n')
finalData = append(finalData, freecam...)
finalData = append(finalData, script.Data...)
}
if len(luaScripts) == 0 {
if freecam, err := common.ReadResourceFile("scripts/freecam.lua"); err == nil {
finalData = append(finalData, '\n')
finalData = append(finalData, freecam...)
}
}
rsp.DownloadData = &goproto.ClientDownloadData{
@@ -158,7 +163,7 @@ const heartbeatLua = `local function beta_text()
if gameObject then
local textComponent = gameObject:GetComponentInChildren(typeof(CS.RPG.Client.LocalizedText))
if textComponent then
textComponent.text = "<color=#5C82DB><b>GaC hkrpg GO แล้วเรามาเกกันนะ</b></color>"
textComponent.text = "<color=#5C82DB><b>GaCy GO | แล้วเรามาเกกันนะ</b></color>"
end
end
end