mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
edit default configs
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"devmodeoptions": {
|
||||
"serverName" : "",
|
||||
"cleandb": false,
|
||||
"maxlauncherhr": true,
|
||||
"maxlauncherhr": false,
|
||||
"LogInboundMessages": false,
|
||||
"LogOutboundMessages": false,
|
||||
"MaxHexdumpLength": 256,
|
||||
@@ -47,34 +47,34 @@
|
||||
{
|
||||
"name": "Newbie", "description": "", "ip": "", "type": 3, "recommended": 2, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54001, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 },
|
||||
{ "port": 54002, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 }
|
||||
{ "port": 54001, "MaxPlayers": 100 },
|
||||
{ "port": 54002, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Normal", "description": "", "ip": "", "type": 1, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54003, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 },
|
||||
{ "port": 54004, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 }
|
||||
{ "port": 54003, "MaxPlayers": 100 },
|
||||
{ "port": 54004, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Cities", "description": "", "ip": "", "type": 2, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54005, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 }
|
||||
{ "port": 54005, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Tavern", "description": "", "ip": "", "type": 4, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54006, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 }
|
||||
{ "port": 54006, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Return", "description": "", "ip": "", "type": 5, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54007, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 }
|
||||
{ "port": 54007, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "MezFes", "description": "", "ip": "", "type": 6, "recommended": 6, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54008, "MaxPlayers": 50, "Unk0": 319, "Unk1": 252, "Unk2": 248 }
|
||||
{ "port": 54008, "MaxPlayers": 100 }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -98,9 +98,6 @@ type EntranceChannelInfo struct {
|
||||
Port uint16
|
||||
MaxPlayers uint16
|
||||
CurrentPlayers uint16
|
||||
Unk0 uint16
|
||||
Unk1 uint16
|
||||
Unk2 uint16
|
||||
}
|
||||
|
||||
// getOutboundIP4 gets the preferred outbound ip4 of this machine
|
||||
|
||||
@@ -22,7 +22,7 @@ func encodeServerInfo(config *config.Config, s *Server) []byte {
|
||||
bf := byteframe.NewByteFrame()
|
||||
|
||||
for serverIdx, si := range serverInfos {
|
||||
sid := (4096 + serverIdx * 256) + 16
|
||||
sid := (4096 + serverIdx*256) + 16
|
||||
err := s.db.QueryRow("SELECT season FROM servers WHERE server_id=$1", sid).Scan(&season)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -37,14 +37,14 @@ func encodeServerInfo(config *config.Config, s *Server) []byte {
|
||||
bf.WriteUint8(si.Type)
|
||||
bf.WriteUint8(season)
|
||||
bf.WriteUint8(si.Recommended)
|
||||
combined := append([]byte{0x00}, stringsupport.UTF8ToSJIS(si.Name)...)
|
||||
combined = append(combined, []byte{0x00}...)
|
||||
bf.WriteUint8(0) // Prevents malformed server name
|
||||
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
|
||||
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
||||
bf.WriteBytes(stringsupport.PaddedString(string(combined), 66, false))
|
||||
bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))
|
||||
bf.WriteUint32(si.AllowedClientFlags)
|
||||
|
||||
for channelIdx, ci := range si.Channels {
|
||||
sid = (4096 + serverIdx * 256) + (16 + channelIdx)
|
||||
sid = (4096 + serverIdx*256) + (16 + channelIdx)
|
||||
bf.WriteUint16(ci.Port)
|
||||
bf.WriteUint16(16 + uint16(channelIdx))
|
||||
bf.WriteUint16(ci.MaxPlayers)
|
||||
@@ -56,9 +56,9 @@ func encodeServerInfo(config *config.Config, s *Server) []byte {
|
||||
bf.WriteUint32(0)
|
||||
bf.WriteUint32(0)
|
||||
bf.WriteUint32(0)
|
||||
bf.WriteUint16(ci.Unk0)
|
||||
bf.WriteUint16(ci.Unk1)
|
||||
bf.WriteUint16(ci.Unk2)
|
||||
bf.WriteUint16(319) // Unk
|
||||
bf.WriteUint16(252) // Unk
|
||||
bf.WriteUint16(248) // Unk
|
||||
bf.WriteUint16(0x3039)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package signserver
|
||||
|
||||
import (
|
||||
"erupe-ce/common/byteframe"
|
||||
ps "erupe-ce/common/pascalstring"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/server/channelserver"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"time"
|
||||
"erupe-ce/server/channelserver"
|
||||
"erupe-ce/common/stringsupport"
|
||||
ps "erupe-ce/common/pascalstring"
|
||||
"erupe-ce/common/byteframe"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@@ -99,13 +99,12 @@ func (s *Session) makeSignInResp(uid int) []byte {
|
||||
}
|
||||
}
|
||||
|
||||
bf.WriteUint8(0) // notice_count
|
||||
bf.WriteUint8(1) // Notice count
|
||||
noticeText := "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9 Beta 2!<BR><BODY><LEFT><SIZE_2><C_5>Erupe is experimental software<C_7>, we are not liable for any<BR><BODY>issues caused by installing the software!<BR><BODY><BR><BODY><C_4>■Report bugs on Discord!<C_7><BR><BODY><BR><BODY><C_4>■Test everything!<C_7><BR><BODY><BR><BODY><C_4>■Don't talk to softlocking NPCs!<C_7><BR><BODY><BR><BODY><C_4>■Fork the code on GitHub!<C_7><BR><BODY><BR><BODY>Thank you to all of the contributors,<BR><BODY><BR><BODY>this wouldn't exist without you."
|
||||
ps.Uint32(bf, noticeText, true)
|
||||
|
||||
// noticeText := "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9!<BR><BODY><LEFT><SIZE_2><C_5>Erupe is experimental software<C_7>, we are not liable for any<BR><BODY>issues caused by installing the software!<BR><BODY><BR><BODY><C_4>■Report bugs on Discord!<C_7><BR><BODY><BR><BODY><C_4>■Test everything!<C_7><BR><BODY><BR><BODY><C_4>■Don't talk to softlocking NPCs!<C_7><BR><BODY><BR><BODY><C_4>■Fork the code on GitHub!<C_7><BR><BODY><BR><BODY>Thank you to all of the contributors,<BR><BODY><BR><BODY>this wouldn't exist without you."
|
||||
// ps.Uint32(bf, noticeText, true)
|
||||
|
||||
bf.WriteUint32(s.server.getLastCID(uid)) // last played character id
|
||||
bf.WriteUint32(s.server.getUserRights(uid)) // course bitfield
|
||||
bf.WriteUint32(s.server.getLastCID(uid))
|
||||
bf.WriteUint32(s.server.getUserRights(uid))
|
||||
ps.Uint16(bf, "", false) // filters
|
||||
bf.WriteUint32(0xCA104E20)
|
||||
ps.Uint16(bf, "", false) // encryption
|
||||
@@ -127,10 +126,12 @@ func (s *Session) makeSignInResp(uid int) []byte {
|
||||
mezfes := s.server.erupeConfig.DevModeOptions.MezFesEvent
|
||||
alt := false
|
||||
if mezfes {
|
||||
bf.WriteUint32(uint32(channelserver.Time_Current_Adjusted().Add(-5 * time.Minute).Unix())) // Start time
|
||||
bf.WriteUint32(uint32(channelserver.Time_Current_Adjusted().Add(24 * time.Hour * 7).Unix())) // End time
|
||||
// Start time
|
||||
bf.WriteUint32(uint32(channelserver.Time_Current_Adjusted().Add(-5 * time.Minute).Unix()))
|
||||
// End time
|
||||
bf.WriteUint32(uint32(channelserver.Time_Current_Adjusted().Add(24 * time.Hour * 7).Unix()))
|
||||
bf.WriteUint8(2) // Unk
|
||||
bf.WriteUint32(0) // Single tickets
|
||||
bf.WriteUint32(20) // Single tickets
|
||||
bf.WriteUint32(0) // Group tickets
|
||||
bf.WriteUint8(8) // Stalls open
|
||||
bf.WriteUint8(0xA) // Unk
|
||||
@@ -140,7 +141,7 @@ func (s *Session) makeSignInResp(uid int) []byte {
|
||||
if alt {
|
||||
bf.WriteUint8(0x2) // Tokotoko
|
||||
} else {
|
||||
bf.WriteUint8(0x4) // Volpkun
|
||||
bf.WriteUint8(0x4) // Volpakkun
|
||||
}
|
||||
bf.WriteUint8(0x8) // Battle cats
|
||||
bf.WriteUint8(0x5) // Gook
|
||||
|
||||
Reference in New Issue
Block a user