RedBeard
Member
This is a bulletin board that finds escorts by proximity from the board, my problem is it doesn't determine which map the mobile is on. It will show trammel escorts on felucca boards but not show any on trammel boards. What can I change to have escort.trammel appear on board.trammel and escort.felucca appear on board.felucca?
Code:
#region BBS Quests
public static BulletinBoard FindClosestBB(Mobile m, out double distance)
{
BulletinBoard closest = null;
distance = double.MaxValue;
double tempdist = 0;
foreach (Item item in World.Items.Values)
{
if (item is BulletinBoard)
{
tempdist = m.GetDistanceToSqrt(item.Location);
if (tempdist < distance)
{
closest = item as BulletinBoard;
distance = tempdist;
}
}
}
return closest;
Last edited: