private void WarpInside(Creature creature, Prop prop)
{
var creaturePos = creature.GetPosition();
var cCoord = new Position(creaturePos.X / Dungeon.TileSize, creaturePos.Y / Dungeon.TileSize);
if (cCoord == _closedFrom)
{
Send.Notice(creature, NoticeType.MiddleSystem, Localization.Get("There is a monster still standing.\nYou must defeat all the monsters for the door to open."));
return;
}
var x = _closedFrom.X * Dungeon.TileSize + Dungeon.TileSize / 2;
var y = _closedFrom.Y * Dungeon.TileSize + Dungeon.TileSize / 2;
if (cCoord.X < _closedFrom.X)
x -= 1000;
else if (cCoord.X > _closedFrom.X)
x += 1000;
else if (cCoord.Y < _closedFrom.Y)
y -= 1000;
else if (cCoord.Y > _closedFrom.Y)
y += 1000;
creature.SetPosition(x, y);
Send.SetLocation(creature, x, y);
}