public static Guild GetGuildFor( Guild def, Mobile m )
{
Guild g = def;
BaseCreature c = m as BaseCreature;
if( c != null && c.Controlled && c.ControlMaster != null )
{
c.DisplayGuildTitle = false;
if( c.Map != Map.Internal && (Core.AOS || Guild.NewGuildSystem || c.ControlOrder == OrderType.Attack || c.ControlOrder == OrderType.Guard) )
g = (Guild)(c.Guild = c.ControlMaster.Guild);
else if( c.Map == Map.Internal || c.ControlMaster.Guild == null )
g = (Guild)(c.Guild = null);
}
return g;
}