mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
move ProxyPort config out of DevMode
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"DeleteOnSaveCorruption": false,
|
||||
"ClientMode": "ZZ",
|
||||
"QuestCacheExpiry": 300,
|
||||
"ProxyPort": 0,
|
||||
"DevMode": true,
|
||||
"DevModeOptions": {
|
||||
"AutoCreateAccount": true,
|
||||
@@ -29,7 +30,6 @@
|
||||
"MezFesAlt": false,
|
||||
"DisableTokenCheck": false,
|
||||
"QuestDebugTools": false,
|
||||
"ProxyPort": 0,
|
||||
"EarthStatusOverride": 0,
|
||||
"EarthIDOverride": 0,
|
||||
"EarthMonsterOverride": 0,
|
||||
|
||||
@@ -80,6 +80,7 @@ type Config struct {
|
||||
ClientMode string
|
||||
RealClientMode Mode
|
||||
QuestCacheExpiry int // Number of seconds to keep quest data cached
|
||||
ProxyPort uint16 // Forces the game to connect to a channel server proxy
|
||||
DevMode bool
|
||||
|
||||
DevModeOptions DevModeOptions
|
||||
@@ -110,7 +111,6 @@ type DevModeOptions struct {
|
||||
MezFesAlt bool // Swaps out Volpakkun for Tokotoko
|
||||
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
|
||||
QuestDebugTools bool // Enable various quest debug logs
|
||||
ProxyPort uint16 // Forces the game connect to a channel server proxy
|
||||
EarthStatusOverride int32
|
||||
EarthIDOverride int32
|
||||
EarthMonsterOverride int32
|
||||
|
||||
2
main.go
2
main.go
@@ -26,7 +26,7 @@ func cleanDB(db *sqlx.DB, config *_config.Config) {
|
||||
_ = db.MustExec("DELETE FROM guild_characters")
|
||||
_ = db.MustExec("DELETE FROM guilds")
|
||||
_ = db.MustExec("DELETE FROM characters")
|
||||
if !config.DevMode || config.DevModeOptions.ProxyPort == 0 {
|
||||
if config.ProxyPort == 0 {
|
||||
_ = db.MustExec("DELETE FROM sign_sessions")
|
||||
}
|
||||
_ = db.MustExec("DELETE FROM users")
|
||||
|
||||
@@ -69,8 +69,8 @@ func encodeServerInfo(config *_config.Config, s *Server, local bool) []byte {
|
||||
|
||||
for channelIdx, ci := range si.Channels {
|
||||
sid = (4096 + serverIdx*256) + (16 + channelIdx)
|
||||
if _config.ErupeConfig.DevMode && _config.ErupeConfig.DevModeOptions.ProxyPort != 0 {
|
||||
bf.WriteUint16(_config.ErupeConfig.DevModeOptions.ProxyPort)
|
||||
if _config.ErupeConfig.DevMode && _config.ErupeConfig.ProxyPort != 0 {
|
||||
bf.WriteUint16(_config.ErupeConfig.ProxyPort)
|
||||
} else {
|
||||
bf.WriteUint16(ci.Port)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user