查看: 664|回復: 0

[閒聊閒語] destination

[複製鏈接]

71

主題

267

帖子

5707

金錢

火焰之影

Rank: 8Rank: 8

威望
247
精華
0
貢獻
0
鑽石
0
閱讀權限
50
積分
6468
在線時間
110 小時
相冊
0
日誌
0
好友
0
發表於 2026-2-23 20:46 | 顯示全部樓層 |閱讀模式



[color=rgba(252, 249, 249, 0.698)]                if npc.Dead {
[color=rgba(252, 249, 249, 0.698)]                        continue
[color=rgba(252, 249, 249, 0.698)]                }
[color=rgba(252, 249, 249, 0.698)]                if npc.MapID == player.MapID && npc.X == destX && npc.Y == destY {
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        deps.Log.Debug("阻擋: NPC 在目標格子", zap.String("player", player.Name), zap.Int32("npc_id", npc.NpcID))
[color=rgba(252, 249, 249, 0.698)]                        return // Blocked by NPC
[color=rgba(252, 249, 249, 0.698)]                }
[color=rgba(252, 249, 249, 0.698)]        }
[color=rgba(252, 249, 249, 0.698)]
[color=rgba(252, 249, 249, 0.698)]        // Check if destination is blocked by map obstacles (walls, etc.)
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(12.4074 5.10525 3.11836)]        if deps.MapData != nil && !deps.MapData.IsPassable(player.MapID, curX, curY, int(heading)) {
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(12.4074 5.10525 3.11836)]                return // Block movement
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]        if deps.MapData != nil {
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                isPassable := deps.MapData.IsPassable(player.MapID, curX, curY, int(heading))
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(29.8958 -7.99258 8.63413)]                deps.Log.Debug("移動檢查", zap.String("player", player.Name),
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        zap.Int32("curX", curX), zap.Int32("curY", curY),
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        zap.Int32("destX", destX), zap.Int32("destY", destY),
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        zap.Int16("mapID", player.MapID),
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        zap.Int("heading", heading),
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        zap.Bool("isPassable", isPassable))
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                if !isPassable {
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                        return // Block movement
[color=rgba(252, 249, 249, 0.698)][backcolor=lab(13.267 -0.671093 2.82415)]                }
[color=rgba(252, 249, 249, 0.698)]        }
[color=rgba(252, 249, 249, 0.698)]
[color=rgba(252, 249, 249, 0.698)]        // Mark old tile passable, new tile impassable (for NPC pathfinding only).
[color=rgba(252, 249, 249, 0.698)]        // Java C_MoveChar does NOT validate IsPassable for player movement — client







上一篇︰] 02/23 搖一搖 New New
下一篇︰搖一搖
您需要登錄後才可以回帖 登錄 | 註冊會員

本版積分規則

天堂私服列表

45客服

Archiver| 45天堂私服論壇   分享到微博! 分享到臉書! 分享到噗浪! 分享到維特! 分享到Google+! 分享到LINE!

45天堂私服發佈站 ©    天堂私服架設教學  提供最新天堂私服最新資訊

流量最高、品質最好、服務最優、玩家首選、最新天堂私服資訊,都在45天堂私服發佈站.    免責聲明

Sitetag
line客服聯繫
掃一掃二碼
Line客服聯繫
24H專人回覆
返回頂部 返回列表