1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-29 22:56:07 -04:00
OpenDiablo2/d2common/d2fileformats/d2ds1/object.go

26 lines
485 B
Go
Raw Normal View History

package d2ds1
import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2path"
)
// Object is a game world object
type Object struct {
2020-07-23 12:56:50 -04:00
Type int
2020-07-24 07:54:52 -04:00
ID int
2020-07-23 12:56:50 -04:00
X int
Y int
Flags int
Paths []d2path.Path
}
// Equals checks if this Object is equivalent to the given Object
func (o *Object) Equals(other *Object) bool {
return o.Type == other.Type &&
o.ID == other.ID &&
o.X == other.X &&
o.Y == other.Y &&
o.Flags == other.Flags &&
len(o.Paths) == len(other.Paths)
}