2020-08-06 16:45:38 -04:00
|
|
|
package d2ds1
|
2020-01-26 00:39:13 -05:00
|
|
|
|
|
|
|
import (
|
2020-09-08 15:58:35 -04:00
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2path"
|
2020-01-26 00:39:13 -05:00
|
|
|
)
|
|
|
|
|
2020-06-30 09:17:07 -04:00
|
|
|
// Object is a game world object
|
2020-01-26 00:39:13 -05:00
|
|
|
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
|
2020-09-08 15:58:35 -04:00
|
|
|
Paths []d2path.Path
|
2020-01-26 00:39:13 -05:00
|
|
|
}
|
2021-02-17 05:18:37 -05:00
|
|
|
|
|
|
|
// 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)
|
|
|
|
}
|