mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
优化协议代理代码生成
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
appConfig "hk4e/common/config"
|
||||
"hk4e/common/config"
|
||||
"hk4e/common/constant"
|
||||
"hk4e/common/utils"
|
||||
"hk4e/gs/model"
|
||||
@@ -104,7 +104,7 @@ func (g *GameManager) CombatInvocationsNotify(player *model.Player, payloadMsg p
|
||||
switch entry.ArgumentType {
|
||||
case proto.CombatTypeArgument_COMBAT_EVT_BEING_HIT:
|
||||
hitInfo := new(proto.EvtBeingHitInfo)
|
||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
if config.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
clientProtoObj := g.GetClientProtoObjByName("EvtBeingHitInfo")
|
||||
if clientProtoObj == nil {
|
||||
logger.Error("get client proto obj is nil")
|
||||
@@ -161,7 +161,7 @@ func (g *GameManager) CombatInvocationsNotify(player *model.Player, payloadMsg p
|
||||
player.CombatInvokeHandler.AddEntry(entry.ForwardType, entry)
|
||||
case proto.CombatTypeArgument_ENTITY_MOVE:
|
||||
entityMoveInfo := new(proto.EntityMoveInfo)
|
||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
if config.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
clientProtoObj := g.GetClientProtoObjByName("EntityMoveInfo")
|
||||
if clientProtoObj == nil {
|
||||
logger.Error("get client proto obj is nil")
|
||||
@@ -227,7 +227,7 @@ func (g *GameManager) CombatInvocationsNotify(player *model.Player, payloadMsg p
|
||||
player.CombatInvokeHandler.AddEntry(entry.ForwardType, entry)
|
||||
case proto.CombatTypeArgument_COMBAT_ANIMATOR_STATE_CHANGED:
|
||||
evtAnimatorStateChangedInfo := new(proto.EvtAnimatorStateChangedInfo)
|
||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
if config.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
clientProtoObj := g.GetClientProtoObjByName("EvtAnimatorStateChangedInfo")
|
||||
if clientProtoObj == nil {
|
||||
logger.Error("get client proto obj is nil")
|
||||
@@ -386,7 +386,7 @@ func (g *GameManager) ClientAbilityChangeNotify(player *model.Player, payloadMsg
|
||||
switch abilityInvokeEntry.ArgumentType {
|
||||
case proto.AbilityInvokeArgument_ABILITY_META_ADD_NEW_ABILITY:
|
||||
abilityMetaAddAbility := new(proto.AbilityMetaAddAbility)
|
||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
if config.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
clientProtoObj := g.GetClientProtoObjByName("AbilityMetaAddAbility")
|
||||
if clientProtoObj == nil {
|
||||
logger.Error("get client proto obj is nil")
|
||||
@@ -413,7 +413,7 @@ func (g *GameManager) ClientAbilityChangeNotify(player *model.Player, payloadMsg
|
||||
worldAvatar.abilityList = append(worldAvatar.abilityList, abilityMetaAddAbility.Ability)
|
||||
case proto.AbilityInvokeArgument_ABILITY_META_MODIFIER_CHANGE:
|
||||
abilityMetaModifierChange := new(proto.AbilityMetaModifierChange)
|
||||
if appConfig.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
if config.CONF.Hk4e.ClientProtoProxyEnable {
|
||||
clientProtoObj := g.GetClientProtoObjByName("AbilityMetaModifierChange")
|
||||
if clientProtoObj == nil {
|
||||
logger.Error("get client proto obj is nil")
|
||||
|
||||
Reference in New Issue
Block a user