2019-01-18 17:10:46 +03:00
|
|
|
package mapobject
|
|
|
|
|
|
|
|
import (
|
|
|
|
"mapserver/coords"
|
|
|
|
"mapserver/mapblockparser"
|
2019-01-18 17:51:10 +03:00
|
|
|
"mapserver/mapobjectdb"
|
2019-01-18 17:10:46 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type ClearMapData struct {
|
2019-01-18 17:51:10 +03:00
|
|
|
db mapobjectdb.DBAccessor
|
2019-01-18 17:10:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *ClearMapData) OnParsedMapBlock(block *mapblockparser.MapBlock, pos coords.MapBlockCoords) {
|
|
|
|
err := this.db.RemoveMapData(pos)
|
2019-01-18 17:18:42 +03:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2019-01-18 17:10:46 +03:00
|
|
|
}
|