Beispiel #1
0
		private void frmMain_Load( object sender, EventArgs e ) {
			// add the Mods
			foreach( string mode in Enum.GetNames( typeof( EGameMode ) ) )
				cbMode.Items.Add( mode );

			// add the Classes with an Icon
			cbClass.Items.Add( "<Klasse wählen>" );
			cbClass.Items.Add( new ImageComboItem( EClass.Fighter_Human.ToName(), cbClass.Font, Color.Black, EClass.Fighter_Human.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Fighter_Human ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Warrior_Nordein.ToName(), cbClass.Font, Color.Black, EClass.Warrior_Nordein.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Warrior_Nordein ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Defender_Human.ToName(), cbClass.Font, Color.Black, EClass.Defender_Human.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Defender_Human ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Guardian_Nordein.ToName(), cbClass.Font, Color.Black, EClass.Guardian_Nordein.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Guardian_Nordein ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Priest_Human.ToName(), cbClass.Font, Color.Black, EClass.Priest_Human.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Priest_Human ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Oracle_Vail.ToName(), cbClass.Font, Color.Black, EClass.Oracle_Vail.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Oracle_Vail ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Mage_Elf.ToName(), cbClass.Font, Color.Black, EClass.Mage_Elf.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Mage_Elf ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Pagan_Vail.ToName(), cbClass.Font, Color.Black, EClass.Pagan_Vail.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Pagan_Vail ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Ranger_Elf.ToName(), cbClass.Font, Color.Black, EClass.Ranger_Elf.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Ranger_Elf ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Assasin_Vail.ToName(), cbClass.Font, Color.Black, EClass.Assasin_Vail.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Assasin_Vail ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Archer_Elf.ToName(), cbClass.Font, Color.Black, EClass.Archer_Elf.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Archer_Elf ) );
			cbClass.Items.Add( new ImageComboItem( EClass.Hunter_Nordein.ToName(), cbClass.Font, Color.Black, EClass.Hunter_Nordein.ToImageIndex(), EImageComboItemTextAlign.Right, EClass.Hunter_Nordein ) );

			for( int i = 1; i < 61; i++ )
				cmbLevel.Items.Add( i );

			mSkillPanel = new SkillControl[ Enum.GetNames( typeof( ESkillType ) ).Length ];

			cbClass.SelectedIndex = 0;
			cbMode.SelectedIndex = 1;
			cmbLevel.SelectedIndex = 0;

			//Cursor = Ssc.Native.GetCursor( "Ssc.Resources.ShaiyaCursor.png", ExecutingAssembly );
		}
        public void RefreshSkillInfo(SkillControl SkillPanel)
        {
            Clear();

            SkillDescControl lastControl = null;
            int heightUntil = 5;

            for (int i = 0; i < SkillPanel.SkillLevel.Length; i++)
            {
                lastControl = new SkillDescControl();
                lastControl.SetSkillDesc(SkillPanel, i);
                lastControl.Location = new Point(5, heightUntil);
                heightUntil         += lastControl.Height + 5;

                this.Controls.Add(lastControl);
            }

            if (lastControl == null)              // huh? o.o
            {
                return;
            }

            if (this.Width < lastControl.Width + 10)
            {
                this.Width = lastControl.Width + 10;
            }
            if (this.Height < heightUntil)
            {
                this.Height = heightUntil;
            }
        }
Beispiel #3
0
		public void RefreshSkillInfo( SkillControl SkillPanel ) {
			Clear();

			SkillDescControl lastControl = null;
			int heightUntil = 5;
			for( int i = 0; i < SkillPanel.SkillLevel.Length; i++ ) {
				lastControl = new SkillDescControl();
				lastControl.SetSkillDesc( SkillPanel, i );
				lastControl.Location = new Point( 5, heightUntil );
				heightUntil += lastControl.Height + 5;

				this.Controls.Add( lastControl );
			}

			if( lastControl == null ) // huh? o.o
				return;

			if( this.Width < lastControl.Width + 10 )
				this.Width = lastControl.Width + 10;
			if( this.Height < heightUntil )
				this.Height = heightUntil;
		}
Beispiel #4
0
        public void SetSkillDesc(SkillControl SkillPanel, int LvlNum)
        {
            SkillLevel Level = SkillPanel.Skill[LvlNum];

            LvlNum++;             // lazy for ( LvlNum + 1 )


            if (Level.Name == "")
            {
                lblName.Text = SkillPanel.Skill.Name + " - Lvl " + LvlNum;
            }
            else
            {
                lblName.Text = Level.Name + " - Lvl " + LvlNum;
            }

            if (SkillPanel.CurrentLevelNum >= LvlNum)
            {
                this.BackColor = Color.FromArgb(227, 240, 254);
            }

            picIcon.Image                = SkillPanel.Skill.Icon;
            lblDesc.Text                 = Level.Description;
            lblLevelValue.Text           = Level.RequiredLevel.ToString();
            lblLevel.Location            = new Point(lblLevel.Location.X, lblDesc.Location.Y + lblDesc.Height + 4);
            lblLevelValue.Location       = new Point(lblLevelValue.Location.X, lblLevel.Location.Y);
            lblSkillPointsValue.Text     = Level.SkillPunkte.ToString();
            lblSkillPoints.Location      = new Point(lblSkillPoints.Location.X, lblLevel.Location.Y);
            lblSkillPointsValue.Location = new Point(lblSkillPointsValue.Location.X, lblSkillPoints.Location.Y);

            this.Anchor = (AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top);
            this.Height = lblLevel.Location.Y + lblLevel.Size.Height + 4;

            if (SkillPanel.Skill.Type == ESkillType.Passive)
            {
                if (this.Height < 58)
                {
                    this.Height = 58;                     // 13 padding below Icon
                    // move Label near bottom line
                    lblLevel.Location            = new Point(lblLevel.Location.X, this.Height - lblLevel.Height - 4);
                    lblLevelValue.Location       = new Point(lblLevelValue.Location.X, lblLevel.Location.Y);
                    lblSkillPoints.Location      = new Point(lblSkillPoints.Location.X, lblLevel.Location.Y);
                    lblSkillPointsValue.Location = new Point(lblSkillPointsValue.Location.X, lblSkillPoints.Location.Y);
                }
                return;
            }

            if (Level.Mana != 0)
            {
                AddLabel("Mana:", (Level.Mana < 0 ? Level.Mana + "%" : Level.Mana.ToString()));
            }

            if (Level.Stamina != 0)
            {
                AddLabel("Ausdauer:", (Level.Stamina < 0 ? Level.Stamina + "%" : Level.Stamina.ToString()));
            }

            if (Level.Delay != 0)
            {
                AddLabel("Cooldown:", Level.Delay + " sec");
            }

            if (Level.Range != 0)
            {
                AddLabel("Reichweite:", Level.Range + "m");
            }

            if (Level.CastTime != 0f)
            {
                AddLabel("Casttime:", Level.CastTime + " sec");
            }

            if (Level.AoE != 0)
            {
                AddLabel("AoE:", Level.AoE + "m");
            }

            if (Level.Element != ESkillElement.None)
            {
                AddLabel("Element:", Level.Element.ToString());
                AddElementBox(Level.Element);
            }

            if (Level.Status != "")
            {
                AddLabel("Status:", Level.Status);
            }

            // reconfig height based on last label
            if (mLastLabel != null)
            {
                this.Size = new Size(this.Size.Width, mLastLabel.Location.Y + mLastLabel.Size.Height + 4);
            }
        }
Beispiel #5
0
		public void SetSkillDesc( SkillControl SkillPanel, int LvlNum ) {
			SkillLevel Level = SkillPanel.Skill[ LvlNum ];
			LvlNum++; // lazy for ( LvlNum + 1 )


			if( Level.Name == "" )
				lblName.Text = SkillPanel.Skill.Name + " - Lvl " + LvlNum;
			else
				lblName.Text = Level.Name + " - Lvl " + LvlNum;

			if( SkillPanel.CurrentLevelNum >= LvlNum )
				this.BackColor = Color.FromArgb( 227, 240, 254 );

			picIcon.Image = SkillPanel.Skill.Icon;
			lblDesc.Text = Level.Description;
			lblLevelValue.Text = Level.RequiredLevel.ToString();
			lblLevel.Location = new Point( lblLevel.Location.X, lblDesc.Location.Y + lblDesc.Height + 4 );
			lblLevelValue.Location = new Point( lblLevelValue.Location.X, lblLevel.Location.Y );
			lblSkillPointsValue.Text = Level.SkillPunkte.ToString();
			lblSkillPoints.Location = new Point( lblSkillPoints.Location.X, lblLevel.Location.Y );
			lblSkillPointsValue.Location = new Point( lblSkillPointsValue.Location.X, lblSkillPoints.Location.Y );

			this.Anchor = ( AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top );
			this.Height = lblLevel.Location.Y + lblLevel.Size.Height + 4;

			if( SkillPanel.Skill.Type == ESkillType.Passive ) {
				if( this.Height < 58 ) {
					this.Height = 58; // 13 padding below Icon
					// move Label near bottom line
					lblLevel.Location = new Point( lblLevel.Location.X, this.Height - lblLevel.Height - 4 );
					lblLevelValue.Location = new Point( lblLevelValue.Location.X, lblLevel.Location.Y );
					lblSkillPoints.Location = new Point( lblSkillPoints.Location.X, lblLevel.Location.Y );
					lblSkillPointsValue.Location = new Point( lblSkillPointsValue.Location.X, lblSkillPoints.Location.Y );
				}
				return;
			}

			if( Level.Mana != 0 ) 
				AddLabel( "Mana:", ( Level.Mana < 0 ? Level.Mana + "%" : Level.Mana.ToString() ) );

			if( Level.Stamina != 0 )
				AddLabel( "Ausdauer:", ( Level.Stamina < 0 ? Level.Stamina + "%" : Level.Stamina.ToString() ) );

			if( Level.Delay != 0 )
				AddLabel( "Cooldown:", Level.Delay + " sec" );

			if( Level.Range != 0 )
				AddLabel( "Reichweite:", Level.Range + "m" );

			if( Level.CastTime != 0f )
				AddLabel( "Casttime:", Level.CastTime + " sec" );

			if( Level.AoE != 0 )
				AddLabel( "AoE:", Level.AoE + "m" );

			if( Level.Element != ESkillElement.None ) {
				AddLabel( "Element:", Level.Element.ToString() );
				AddElementBox( Level.Element );
			}

			if( Level.Status != "" )
				AddLabel( "Status:", Level.Status );

			// reconfig height based on last label
			if( mLastLabel != null )
				this.Size = new Size( this.Size.Width, mLastLabel.Location.Y + mLastLabel.Size.Height + 4 );
		}
Beispiel #6
0
		private void InitializeSkills() {
			if( cbClass.SelectedIndex == 0 )
				return;

			panelPassive.Controls.Clear();
			panelBasic.Controls.Clear();
			panelCombat.Controls.Clear();
			panelSpecial.Controls.Clear();
			mSkillsCount = new int[ Enum.GetNames( typeof( ESkillType ) ).Length ];
			mSkillsRowCount = new int[ Enum.GetNames( typeof( ESkillType ) ).Length ];
			mSkillList = SkillListDict[ ( (EClass)( cbClass.SelectedItem as ImageComboItem ).Tag ) ];

			mSkillPanel = new SkillControl[ mSkillList.Count ];
			for( int i = 0; i < mSkillPanel.Length; i++ ) {
				mSkillPanel[ i ] = new SkillControl( mSkillList[ i ] );
				if( mSkillList[ i ].Mode > cbMode.SelectedIndex )
					continue;

				mSkillPanel[ i ] = new SkillControl( mSkillList[ i ] );
				mSkillPanel[ i ].MouseEnter += new EventHandler( sklPanel_MouseEnter );
				mSkillPanel[ i ].Click += new EventHandler( sklPanel_Click );
				mSkillPanel[ i ].Tag = i;

				mSkillPanel[ i ].btnUp.Tag = i;
				mSkillPanel[ i ].btnUp.Click += new EventHandler( btnUp_Click );
				mSkillPanel[ i ].btnDown.Tag = i;
				mSkillPanel[ i ].btnDown.Click += new EventHandler( btnDown_Click );
				mSkillPanel[ i ].pbIcon.Tag = i;

				int type = (int)mSkillList[ i ].Type;
				if( ( mSkillsCount[ type ] % 2 ) == 0 ) {
					mSkillPanel[ i ].Location = new Point( 5, 5 + ( ( mSkillPanel[ i ].Height + 8 ) * mSkillsRowCount[ type ] ) );
				} else {
					mSkillPanel[ i ].Location = new Point( mSkillPanel[ i ].Width + 10, 5 + ( ( mSkillPanel[ i ].Height + 8 ) * mSkillsRowCount[ type ] ) );
					mSkillsRowCount[ type ]++;
				}


				GetPanel( mSkillList[ i ].Type ).Controls.Add( mSkillPanel[ i ] );
				mSkillsCount[ type ]++;
			}

			UpdateButtons();
			UpdateSkillPoints();
		}