mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-23 14:32:27 +08:00
优化
This commit is contained in:
@@ -422,17 +422,23 @@ func (g *GameManager) AoiPlayerMove(player *model.Player, oldPos *model.Vector,
|
|||||||
if trigger.Event != constant.LUA_EVENT_ENTER_REGION {
|
if trigger.Event != constant.LUA_EVENT_ENTER_REGION {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
cond := CallLuaFunc(group.GetLuaState(), trigger.Condition,
|
if trigger.Condition != "" {
|
||||||
&LuaCtx{uid: player.PlayerID},
|
cond := CallLuaFunc(group.GetLuaState(), trigger.Condition,
|
||||||
&LuaEvt{param1: region.ConfigId, targetEntityId: entityId})
|
&LuaCtx{uid: player.PlayerID},
|
||||||
if !cond {
|
&LuaEvt{param1: region.ConfigId, targetEntityId: entityId})
|
||||||
continue
|
if !cond {
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ok := CallLuaFunc(group.GetLuaState(), trigger.Action,
|
logger.Debug("scene group trigger fire, trigger: %v, uid: %v", trigger, player.PlayerID)
|
||||||
&LuaCtx{uid: player.PlayerID},
|
if trigger.Action != "" {
|
||||||
&LuaEvt{})
|
logger.Debug("scene group trigger do action, trigger: %v, uid: %v", trigger, player.PlayerID)
|
||||||
if !ok {
|
ok := CallLuaFunc(group.GetLuaState(), trigger.Action,
|
||||||
continue
|
&LuaCtx{uid: player.PlayerID},
|
||||||
|
&LuaEvt{})
|
||||||
|
if !ok {
|
||||||
|
logger.Error("trigger action fail, trigger: %v, uid: %v", trigger, player.PlayerID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateQuest = g.TriggerFire(dbQuest, trigger)
|
updateQuest = g.TriggerFire(dbQuest, trigger)
|
||||||
}
|
}
|
||||||
@@ -442,17 +448,23 @@ func (g *GameManager) AoiPlayerMove(player *model.Player, oldPos *model.Vector,
|
|||||||
if trigger.Event != constant.LUA_EVENT_LEAVE_REGION {
|
if trigger.Event != constant.LUA_EVENT_LEAVE_REGION {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
cond := CallLuaFunc(group.GetLuaState(), trigger.Condition,
|
if trigger.Condition != "" {
|
||||||
&LuaCtx{uid: player.PlayerID},
|
cond := CallLuaFunc(group.GetLuaState(), trigger.Condition,
|
||||||
&LuaEvt{param1: region.ConfigId, targetEntityId: entityId})
|
&LuaCtx{uid: player.PlayerID},
|
||||||
if !cond {
|
&LuaEvt{param1: region.ConfigId, targetEntityId: entityId})
|
||||||
continue
|
if !cond {
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ok := CallLuaFunc(group.GetLuaState(), trigger.Action,
|
logger.Debug("scene group trigger fire, trigger: %v, uid: %v", trigger, player.PlayerID)
|
||||||
&LuaCtx{uid: player.PlayerID},
|
if trigger.Action != "" {
|
||||||
&LuaEvt{})
|
logger.Debug("scene group trigger do action, trigger: %v, uid: %v", trigger, player.PlayerID)
|
||||||
if !ok {
|
ok := CallLuaFunc(group.GetLuaState(), trigger.Action,
|
||||||
continue
|
&LuaCtx{uid: player.PlayerID},
|
||||||
|
&LuaEvt{})
|
||||||
|
if !ok {
|
||||||
|
logger.Error("trigger action fail, trigger: %v, uid: %v", trigger, player.PlayerID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user