コード例 #1
0
        public void RefreshRegions()
        {
            if (m_MobFactionRegion != null)
            {
                m_MobFactionRegion.Unregister();
            }
            // define a new one based on the named region
            m_MobFactionRegion = new MobFactionRegion(m_MobFactionRegionName, m_MobFactionMap, m_MobFactionPriority, m_MobFactionArea);
            // update the new region properties with current values
            m_MobFactionRegion.Music         = m_Music;
            m_MobFactionRegion.EjectLocation = m_EjectLocation;
            m_MobFactionRegion.EjectMap      = m_EjectMap;
            m_MobFactionRegion.FactionType   = m_FactionType;
            m_MobFactionRegion.FactionLevel  = m_FactionLevel;

            m_MobFactionRegion.Register();
        }
コード例 #2
0
        public void RefreshRegions()
        {
            if (this.m_MobFactionRegion != null)
            {
                this.m_MobFactionRegion.Unregister();
            }
            // define a new one based on the named region
            this.m_MobFactionRegion = new MobFactionRegion(this.m_MobFactionRegionName, this.m_MobFactionMap, this.m_MobFactionPriority, this.m_MobFactionArea);
            // update the new region properties with current values
            this.m_MobFactionRegion.Music         = this.m_Music;
            this.m_MobFactionRegion.EjectLocation = this.m_EjectLocation;
            this.m_MobFactionRegion.EjectMap      = this.m_EjectMap;
            this.m_MobFactionRegion.FactionType   = this.m_FactionType;
            this.m_MobFactionRegion.FactionLevel  = this.m_FactionLevel;

            this.m_MobFactionRegion.Register();
        }
コード例 #3
0
        public MobFactionRegionStone() : base(0x161D)
        {
            Visible = false;
            Movable = false;
            Name    = "MobFaction Region Controller";

            MobFactionRegionName = "MobFaction Game Region";

            MobFactionPriority = 0x90;                         // high priority

            if (m_MobFactionRegion == null)
            {
                if (m_MobFactionMap == null)
                {
                    m_MobFactionMap = this.Map;
                }
                m_MobFactionRegion = new MobFactionRegion(MobFactionRegionName, m_MobFactionMap);
                Region.AddRegion(m_MobFactionRegion);
            }
        }
コード例 #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                m_Music                = (MusicName)reader.ReadInt();
                m_Priority             = reader.ReadInt();
                m_MobFactionArea       = reader.ReadRect2D();
                m_MobFactionRegionName = reader.ReadString();
                string mapname = reader.ReadString();
                try{
                    m_MobFactionMap = Map.Parse(mapname);
                } catch {}
                m_CopiedRegion = reader.ReadString();

                m_MobFactionRegion = new MobFactionRegion(m_MobFactionRegionName, m_MobFactionMap);

                // do the coord list
                int count = reader.ReadInt();
                m_MobFactionRegion.Coords = new ArrayList();
                for (int i = 0; i < count; i++)
                {
                    m_MobFactionRegion.Coords.Add(reader.ReadRect2D());
                }

                m_MobFactionRegion.Priority = m_Priority;
                m_MobFactionRegion.Music    = m_Music;
                m_MobFactionRegion.Map      = m_MobFactionMap;

                break;
            }
            }

            // refresh the region
            RefreshRegions();
        }
コード例 #5
0
        public MobFactionRegionStone()
            : base(0x161D)
        {
            Visible = false;
            Movable = false;
            Name = "MobFaction Region Controller";

            MobFactionRegionName = "MobFaction Game Region";

            MobFactionPriority = 0x90;             // high priority

            if(m_MobFactionRegion == null)
            {
                if(m_MobFactionMap == null )
                {
                    m_MobFactionMap = this.Map;
                }
                m_MobFactionRegion = new MobFactionRegion(MobFactionRegionName, m_MobFactionMap);
                Region.AddRegion( m_MobFactionRegion );
            }
        }
コード例 #6
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {

                case 0:
                {
                    m_Music = (MusicName)reader.ReadInt();
                    m_Priority = reader.ReadInt();
                    m_MobFactionArea = reader.ReadRect2D();
                    m_MobFactionRegionName = reader.ReadString();
                    string mapname = reader.ReadString();
                    try{
                       m_MobFactionMap = Map.Parse(mapname);
                    } catch {}
                    m_CopiedRegion = reader.ReadString();

                    m_MobFactionRegion = new MobFactionRegion(m_MobFactionRegionName, m_MobFactionMap);

                    // do the coord list
                    int count = reader.ReadInt();
                    m_MobFactionRegion.Coords = new ArrayList();
                    for(int i =0;i<count;i++)
                    {
                        m_MobFactionRegion.Coords.Add(reader.ReadRect2D());
                    }

                    m_MobFactionRegion.Priority = m_Priority;
                    m_MobFactionRegion.Music = m_Music;
                    m_MobFactionRegion.Map = m_MobFactionMap;

                    break;
                }
            }

            // refresh the region
            RefreshRegions();
        }
コード例 #7
0
        public void RefreshRegions()
        {
            if (this.m_MobFactionRegion != null)
            {
                this.m_MobFactionRegion.Unregister();
            }
            // define a new one based on the named region
            this.m_MobFactionRegion = new MobFactionRegion(this.m_MobFactionRegionName, this.m_MobFactionMap, this.m_MobFactionPriority, this.m_MobFactionArea);
            // update the new region properties with current values
            this.m_MobFactionRegion.Music = this.m_Music;
            this.m_MobFactionRegion.EjectLocation = this.m_EjectLocation;
            this.m_MobFactionRegion.EjectMap = this.m_EjectMap;
            this.m_MobFactionRegion.FactionType = this.m_FactionType;
            this.m_MobFactionRegion.FactionLevel = this.m_FactionLevel;

            this.m_MobFactionRegion.Register();
        }
コード例 #8
0
		public void RefreshRegions()
		{
			if (m_MobFactionRegion != null)
			{
				m_MobFactionRegion.Unregister();
			}
			// define a new one based on the named region
			m_MobFactionRegion = new MobFactionRegion(m_MobFactionRegionName, m_MobFactionMap, m_MobFactionPriority, m_MobFactionArea);
			// update the new region properties with current values
			m_MobFactionRegion.Music = m_Music;
			m_MobFactionRegion.EjectLocation = m_EjectLocation;
			m_MobFactionRegion.EjectMap = m_EjectMap;
			m_MobFactionRegion.FactionType = m_FactionType;
			m_MobFactionRegion.FactionLevel = m_FactionLevel;

			m_MobFactionRegion.Register();
		}