```
feat(broadcast): 添加全服广播功能并完善相关逻辑 新增 Broadcast 结构体及 Server 的 Broadcast 方法,用于实现全服广播消息, 并在 RPC 客户端中增加对应接口。同时在 fight 模块中添加聊天信息结构体和处理逻辑。 refactor(pet_skill): 优化宠物技能设置逻辑 修复宠物技能替换判断条件错误的问题,并调整相关逻辑顺序以提高代码可读性与健壮性。 feat(chat): 实现战斗内聊天功能 新增战斗中的聊天指令结构体 ChatInfo 和对应的控制器方法 FightChat, 支持玩家在战斗中发送聊天消息。 refactor(item_buy): 调整金币购买道具的扣费方式 将原直接比较金币数量改为调用
This commit is contained in:
@@ -2,6 +2,7 @@ package xmlres
|
||||
|
||||
import (
|
||||
"blazing/common/utils"
|
||||
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
@@ -55,7 +56,7 @@ var (
|
||||
GoldProductMap = make(map[int]GoldProductItem, 0)
|
||||
)
|
||||
|
||||
func initfile() {
|
||||
func Initfile() {
|
||||
path1, _ := os.Getwd()
|
||||
path = path1 + "/public/config/"
|
||||
MapConfig = getXml[Maps](path + "210.xml")
|
||||
@@ -133,8 +134,6 @@ func initfile() {
|
||||
|
||||
func init() {
|
||||
|
||||
initfile() //先初始化一次
|
||||
|
||||
go func() {
|
||||
|
||||
if !gfile.Exists(path) {
|
||||
|
||||
Reference in New Issue
Block a user