整理代码、调用LUA修改场景天气

This commit is contained in:
unkown committed 2023-09-29 08:09:25 +08:00
1 parent a08d28a895
commit 282c16f7fe
7 files changed
+198 -104

No files matched your search

+2 -1
View File
@@ -84,7 +84,7 @@ type Player struct {
NetFreeze bool `bson:"-" msgpack:"-"` // 客户端网络上下行冻结状态
LastSceneBlockAoiMoveTime uint64 `bson:"-" msgpack:"-"` // 上一次移动处理场景区块aoi的时间
CommandAssignUid uint32 `bson:"-" msgpack:"-"` // 命令指定uid
WeatherAreaId int32 `bson:"-" msgpack:"-"` // 天气区域id
WeatherInfo *WeatherInfo `bson:"-" msgpack:"-"` // 天气信息
// 特殊数据
ChatMsgMap map[uint32][]*ChatMsg `bson:"-" msgpack:"-"` // 聊天信息 数据量偏大 只从db读写 不保存到redis
}
@@ -103,6 +103,7 @@ func (p *Player) InitOnlineData() {
p.CombatInvokeHandler = NewInvokeHandler[proto.CombatInvokeEntry]()
p.AbilityInvokeHandler = NewInvokeHandler[proto.AbilityInvokeEntry]()
p.GCGInfo = NewGCGInfo() // 临时测试用数据
p.WeatherInfo = NewWeatherInfo()
dbAvatar := p.GetDbAvatar()
dbAvatar.InitDbAvatar(p)
+13
View File
@@ -0,0 +1,13 @@
package model
type WeatherInfo struct {
WeatherAreaId uint32 // 天气区域id
ClimateType uint32 // 气候类型
}
func NewWeatherInfo() *WeatherInfo {
return &WeatherInfo{
WeatherAreaId: 0,
ClimateType: 0,
}
}