优化代码

This commit is contained in:
flswld
2023-02-18 22:09:59 +08:00
parent 21fb9d400f
commit e580baeb46
37 changed files with 198 additions and 118 deletions

View File

@@ -228,7 +228,7 @@ func (f *FightRoutine) attackHandle(gameMsg *mq.GameMsg) {
continue
}
hitInfo := new(proto.EvtBeingHitInfo)
if config.CONF.Hk4e.ClientProtoProxyEnable {
if config.GetConfig().Hk4e.ClientProtoProxyEnable {
clientProtoObj := GetClientProtoObjByName("EvtBeingHitInfo")
if clientProtoObj == nil {
logger.Error("get client proto obj is nil")
@@ -303,7 +303,7 @@ func (f *FightRoutine) getAllPlayer(entityMap map[uint32]*Entity) []uint32 {
var ClientCmdProtoMap *client_proto.ClientCmdProtoMap
func initClientCmdProtoMap() {
if config.CONF.Hk4e.ClientProtoProxyEnable {
if config.GetConfig().Hk4e.ClientProtoProxyEnable {
ClientCmdProtoMap = client_proto.NewClientCmdProtoMap()
}
}