Server.Guilds.Guild.IsAlly C# (CSharp) Method

IsAlly() public method

public IsAlly ( Guild g ) : bool
g Guild
return bool
		public bool IsAlly( Guild g )
		{
			return m_Allies.Contains( g );
		}

Usage Example

Ejemplo n.º 1
0
        public DiplomacyMiscGump( Mobile leader, Guild target )
            : base(10, 40)
        {
            m_Mobile = leader;
            t_Guild = target;
            m_Guild = m_Mobile.Guild as Guild;

            /*0*/
            Intern( "Unknown" );
            /*1*/
            Intern( "" );
            /*2*/
            Intern( "" );
            /*3*/
            Intern( "0/0" );
            /*4*/
            Intern( "0/0" );
            /*5*/
            Intern( "00:00" );
            /*6*/
            Intern( target.Name );
            /*7*/
            Intern( "<basefont color=#black>" + t_Guild.AllianceName + "</basefont>" );
            /*8*/
            Intern( target.Abbreviation );
            /*9*/
            Intern( "<basefont color=#black>0/0</basefont>" );
            /*10*/
            Intern( "<basefont color=#black>00:00</basefont>" );
            /*11*/
            Intern( "<basefont color=#black>0/0</basefont>" );

            AddPage( 0 );

            AddBackground( 0, 0, 520, 335, 0x242C );

            AddHtmlLocalized( 20, 15, 480, 26, 1062975, false, false ); // <div align=center><i>Guild Relationship</i></div>
            AddImageTiled( 20, 40, 480, 2, 0x2711 );

            AddHtmlLocalized( 20, 50, 120, 26, 1062954, true, false ); // <i>Guild Name</i>
            AddHtmlIntern( 150, 53, 360, 26, 6, false, false );

            AddHtmlLocalized( 20, 80, 120, 26, 1063025, true, false ); // <i>Alliance</i>
            AddHtmlIntern( 150, 83, 360, 26, 7, false, false );

            AddHtmlLocalized( 20, 110, 120, 26, 1063139, true, false ); // <i>Abbreviation</i>
            AddHtmlIntern( 150, 113, 120, 26, 8, false, false );

            AddHtmlLocalized( 280, 110, 120, 26, 1062966, true, false ); // <i>Your Kills</i>
            AddHtmlIntern( 410, 113, 120, 26, 9, false, false );

            AddHtmlLocalized( 20, 140, 120, 26, 1062968, true, false ); // <i>Time Remaining</i>
            AddHtmlIntern( 150, 143, 120, 26, 10, false, false );

            AddHtmlLocalized( 280, 140, 120, 26, 1062967, true, false ); // <i>Their Kills</i>
            AddHtmlIntern( 410, 143, 120, 26, 11, false, false );

            AddImageTiled( 20, 172, 480, 2, 0x2711 );

            AddBackground( 275, 290, 225, 26, 0x2486 );
            AddButton( 280, 295, 0x845, 0x846, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 305, 293, 185, 26, 3000091, false, false ); // Cancel

            AddBackground( 20, 290, 225, 26, 0x2486 );
            AddButton( 25, 295, 0x845, 0x846, 400, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 50, 293, 185, 26, 1062989, false, false ); // Declare War!

            AddBackground( 20, 260, 225, 26, 0x2486 );
            AddButton( 25, 265, 0x845, 0x846, 305, GumpButtonType.Reply, 0 ); // Request Alliance
            AddHtmlLocalized( 50, 263, 185, 26, 1062990, false, false );

            if ( m_Guild.IsWar( t_Guild ) )
                AddHtmlLocalized( 20, 180, 480, 30, 1062965, true, false ); // war
            else if ( m_Guild.IsAlly( t_Guild ) )
                AddHtmlLocalized( 20, 180, 480, 30, 1062970, true, false ); // allied
            else
                AddHtmlLocalized( 20, 180, 480, 30, 1062973, true, false ); // peace

            AddImageTiled( 20, 245, 480, 2, 0x2711 );
        }
All Usage Examples Of Server.Guilds.Guild::IsAlly