package maps

import (
	"blazing/logic/service/common"
	"blazing/logic/service/player"
	"blazing/logic/service/space"
)

type LeaveMapInboundInfo struct {
	Head player.TomeeHeader `cmd:"2002" struc:"[0]pad"` //切换地图
}

func (t *LeaveMapInboundInfo) Broadcast(mapid uint32, o space.LeaveMapOutboundInfo) {

	space.GetSpace(mapid).Range(func(playerID uint32, player common.PlayerI) bool {
		t.Head.Result = 0

		player.SendPack(t.Head.Pack(&o))
		return true
	})
}
