掉落场景物件初步

This commit is contained in:
flswld
2023-03-28 19:49:58 +08:00
parent a175417ebf
commit 41e51297db
8 changed files with 126 additions and 135 deletions

View File

@@ -182,6 +182,7 @@ func (g *GMCmd) GMForceFinishAllQuest(userId uint32) {
GAME_MANAGER.AcceptQuest(player, true)
}
// GMUnlockAllPoint 解锁场景全部传送点
func (g *GMCmd) GMUnlockAllPoint(userId uint32, sceneId uint32) {
player := USER_MANAGER.GetOnlineUser(userId)
if player == nil {
@@ -205,6 +206,20 @@ func (g *GMCmd) GMUnlockAllPoint(userId uint32, sceneId uint32) {
})
}
// GMCreateGadget 在玩家附近创建物件实体
func (g *GMCmd) GMCreateGadget(userId uint32, gadgetId uint32, posX, posY, posZ float64, itemId uint32) {
player := USER_MANAGER.GetOnlineUser(userId)
if player == nil {
logger.Error("player is nil, uid: %v", userId)
return
}
GAME_MANAGER.CreateGadget(player, gadgetId, &model.Vector{
X: posX,
Y: posY,
Z: posZ,
}, itemId)
}
// 系统级GM指令
func (g *GMCmd) ChangePlayerCmdPerm(userId uint32, cmdPerm uint8) {