refactor(common): 重构 Conn 实体并优化地图进入逻辑

- 优化 Conn 实体的 SendPack 方法,提高代码复用性
- 添加 goja 模块到 go.work 文件
- 重构地图进入逻辑,增加玩家广播和刷怪功能
- 调整 OutInfo 结构中的 Vip 和 Viped 字段类型
- 简化 MonsterRefresh 结构体定义
This commit is contained in:
2025-08-18 00:38:14 +08:00
parent 9a6587a2da
commit 10eed9418c
142 changed files with 77533 additions and 17 deletions

View File

@@ -0,0 +1,36 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.20.x, 1.x]
os: [ubuntu-latest]
arch: ["", "386"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Check formatting
run: diff -u <(echo -n) <(gofmt -d .)
if: ${{ matrix.go-version == '1.x' }}
- name: Run go vet
run: go vet ./...
- name: Run staticcheck
uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2023.1.2"
install-go: false
cache-key: ${{ matrix.go-version }}
if: ${{ matrix.go-version == '1.x' }}
- name: Checkout tc39 tests
run: ./.tc39_test262_checkout.sh
- name: Run tests
env:
GOARCH: ${{ matrix.arch }}
run: go test -vet=off ./...