pg_restore would fail because the dump contains CREATE DATABASE but
POSTGRES_DB already creates it. With set -e this aborted the script
before update/patch schemas could run.
- Allow pg_restore to continue past non-fatal errors
- Add --no-owner --no-acl to avoid permission mismatches
- Force LF line endings for .sh files via .gitattributes
- Quote file path variables in schema loops
Port test files from v9.2.x-stable branch to increase channelserver
coverage from 13.8% to 25.6% (556 tests passing).
Adapted all files to main's struct definitions: config import alias,
Airou/CatDefinition rename, packet field mismatches, Raviente struct
differences, and maxPlayers defaults. Removed tests referencing
production code not yet on main (Player, FestivalColour, etc.).
Excluded handlers_register_test.go (Raviente completely redesigned).
When a quest or scenario file was missing, handleMsgSysGetFile sent nil
data via doAckBufSucceed, which crashed the game client. Now sends
doAckBufFail so the client can handle the missing file gracefully.
Closes#109
Wrap *rand.Rand in a mutex-protected SafeRand type to make the global
RNG safe for concurrent use across goroutines. The previous bare
*rand.Rand caused data races detected by go test -race.
UTF8ToSJIS panicked when encountering characters outside the Shift-JIS
range (emoji, Lenny faces, cuneiform, etc.), crashing the server when
such characters were sent via the Discord relay channel.
Replace the panic with graceful filtering that drops unmappable runes
and preserves valid content. Also fix ToNGWord index-out-of-range panic
on empty encoder output.
Closes#116
Resolve conflict in handlers_stage.go: keep lock-free packet
building pattern (copy session list, release lock, then build)
over upstream's in-lock QueueSendMHF approach.
Fix test compilation: remove objectIDs field references after
upstream removed it from Server struct.
Resync vendor directory with updated go.mod dependencies.
Mainly, there are differences in the MHFG low version network protocol when pkt.ShopType=1 or 2 in handleMgMhfEnumerationShop. Conducted code judgment and differentiation processing.
If you need to configure the optional material list among the three options,
Configure directly in gacha_detries
The same Entry Type can be merged and displayed in GG
In addition, the prizes are also directly configured in the gacha-entries table,
MHFG1~GG does not use the gacha_items table throughout the entire process, which meets the lottery function of MHFG with a more single function
In addition, the MHFG function itself is relatively simple
Example of lottery configuration for G1~GG:
eg:
gachaname:test
entry:
itemgroup:
group1:(choose one of the two) ITEM_1_ID:7 COUNT:1 ITEM_1_ID:8 COUNT:2
group2:ITEM_1_ID:9 COUNT:3
reward:
reward1: ITEM_ID:1 COUNT:4 weight:10%
reward1: ITEM_ID:2 COUNT:5 weight:90%
table:gacha_shop
|id|min_gr|min_hr|name|url_bannel|url_feature|url_thmubnail|wide|recommendded|gacha_type|hidden|
|1|0|0|test|null|null|null|f|f|3|t|
table:gacha_entries
|id|gacha_id|entry_type|item_type|item_number|item_quantity|weight|rarity|rolls|frontier_points|daily_limit|name|
|1|1|0|7|7|1|0|0|0|0|0|null|
|4|1|0|7|8|2|0|0|0|0|0|null|
|5|1|1|7|9|3|0|0|0|0|0|null|
|8|1|100|7|1|4|1000|0|0|0|0|null|
|9|1|100|7|2|5|9000|0|0|0|0|null|