コード例 #1
0
        public void InitializeFactories()
        {
            mFactory = new FactoryMobPoint(listMobPoints, MonsterMap);

            MonsterMap.EditPoint   = new ShaiyaMonsterMap.Components.EditPointEventHandler(MonsterMap_EditPoint);
            MonsterMap.RemovePoint = new ShaiyaMonsterMap.Components.RemovePointEventHandler(MonsterMap_RemovePoint);
        }
コード例 #2
0
 public void DeinitializeMap()
 {
     if (MapControl.CanEdit == true && mFactory != null)
     {
         mFactory.SavePoints(MapControl.CanEdit);
     }
     ClearMobList();
     mFactory = null;
 }
コード例 #3
0
        public int RuleLevelToIndex(FactoryMobPoint fac)
        {
            int index = 0;

            if (LevelInt >= fac.ActiveMapRule.MobLevelInt4)
            {
                index = 3;
            }
            else if (LevelInt >= fac.ActiveMapRule.MobLevelInt3)
            {
                index = 2;
            }
            else if (LevelInt >= fac.ActiveMapRule.MobLevelInt2)
            {
                index = 1;
            }
            return(index);
        }
コード例 #4
0
        public void EditMobPoint(int i, int x, int y)
        {
            frmMobPoint frm = new frmMobPoint("bearbeiten...");

            SMobPoint p = mFactory[i] as SMobPoint;

            frm.txtName.Text            = p.Name;
            frm.txtLevel.Text           = p.Level;
            frm.cbCount.Text            = p.Anzahl;
            frm.cbElement.SelectedIndex = (int)p.Element;
            frm.chkBoss.Checked         = p.IsBoss;
            frm.txtInfo.Text            = p.InfoDesc;
            if (frm.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            p.Changed  = true;
            p.Name     = frm.txtName.Text;
            p.Level    = frm.txtLevel.Text;
            p.Anzahl   = frm.cbCount.Text;
            p.Element  = (EMobElement)frm.cbElement.SelectedIndex;
            p.IsBoss   = frm.chkBoss.Checked;
            p.InfoDesc = frm.txtInfo.Text;

            for (int j = 0; j < listMobPoints.Items.Count; j++)
            {
                if (int.Parse(listMobPoints.Items[j].Tag.ToString()) == i)
                {
                    listMobPoints.Items[j] = FactoryMobPoint.BuildListItem(mFactory, i, p);
                    break;
                }
            }

            MonsterMap.Invalidate();
        }
コード例 #5
0
		public void DeinitializeMap() {
			if( MapControl.CanEdit == true && mFactory != null )
				mFactory.SavePoints( MapControl.CanEdit );
			ClearMobList();
			mFactory = null;
		}
コード例 #6
0
		public void InitializeFactories() {
			mFactory = new FactoryMobPoint( listMobPoints, MonsterMap );

			MonsterMap.EditPoint = new ShaiyaMonsterMap.Components.EditPointEventHandler( MonsterMap_EditPoint );
			MonsterMap.RemovePoint = new ShaiyaMonsterMap.Components.RemovePointEventHandler( MonsterMap_RemovePoint );
		}
コード例 #7
0
ファイル: SMobPoint.cs プロジェクト: GodLesZ/svn-dump
		public int RuleLevelToIndex( FactoryMobPoint fac ) {
			int index = 0;
			if( LevelInt >= fac.ActiveMapRule.MobLevelInt4 )
				index = 3;
			else if( LevelInt >= fac.ActiveMapRule.MobLevelInt3 )
				index = 2;
			else if( LevelInt >= fac.ActiveMapRule.MobLevelInt2 )
				index = 1;
			return index;
		}