掉落场景物件

This commit is contained in:
flswld
2023-03-28 21:59:46 +08:00
parent 41e51297db
commit 2ba73cce5b
4 changed files with 49 additions and 17 deletions

View File

@@ -207,17 +207,17 @@ func (g *GMCmd) GMUnlockAllPoint(userId uint32, sceneId uint32) {
}
// GMCreateGadget 在玩家附近创建物件实体
func (g *GMCmd) GMCreateGadget(userId uint32, gadgetId uint32, posX, posY, posZ float64, itemId uint32) {
func (g *GMCmd) GMCreateGadget(userId uint32, posX, posY, posZ float64, gadgetId, itemId, count 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{
GAME_MANAGER.CreateGadget(player, &model.Vector{
X: posX,
Y: posY,
Z: posZ,
}, itemId)
}, gadgetId, itemId, count)
}
// 系统级GM指令