示例#1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                // Players kills
                int playersKills = reader.ReadInt();
                for (int i = 0; i < playersKills; i++)
                {
                    Alignment key = (Alignment)reader.ReadInt();
                    int       val = reader.ReadInt();
                    m_PlayersKills[key] = val;
                }

                // Mobiles kills
                int mobilesKills = reader.ReadInt();
                for (int i = 0; i < mobilesKills; i++)
                {
                    Alignment key = (Alignment)reader.ReadInt();
                    int       val = reader.ReadInt();
                    m_MobilesKills[key] = val;
                }
                break;
            }
            }

            m_Instance = this;
        }
示例#2
0
        public Alignments()
            : base(0x48E3)
        {
            Name    = "Nounours de Scriptiz";
            Weight  = 1e3;
            Movable = false;

            m_MobilesKills = new Dictionary <Alignment, int>();
            m_PlayersKills = new Dictionary <Alignment, int>();

            m_Instance = this;
        }
示例#3
0
        // Don't use this !!! (BBMABOB is cool)
        public static void Reset()
        {
            List<Item> toDelete = new List<Item>();
            foreach (Item i in World.Items.Values)
            {
                if (i is Alignments && i != null)
                {
                    toDelete.Add(i);
                }
            }

            for (int i = 0; i < toDelete.Count; i++)
                toDelete[i].Delete();

            if (m_Instance != null) 
                m_Instance.Delete();

            m_Instance = new Alignments();
        }
示例#4
0
        // Don't use this !!! (BBMABOB is cool)
        public static void Reset()
        {
            List <Item> toDelete = new List <Item>();

            foreach (Item i in World.Items.Values)
            {
                if (i is Alignments && i != null)
                {
                    toDelete.Add(i);
                }
            }

            for (int i = 0; i < toDelete.Count; i++)
            {
                toDelete[i].Delete();
            }

            if (m_Instance != null)
            {
                m_Instance.Delete();
            }

            m_Instance = new Alignments();
        }
示例#5
0
        public Alignments()
            : base(0x48E3)
        {
            Name = "Nounours de Scriptiz";
            Weight = 1e3;
            Movable = false;

            m_MobilesKills = new Dictionary<Alignment, int>();
            m_PlayersKills = new Dictionary<Alignment, int>();

            m_Instance = this;
        }
示例#6
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
                case 0:
                    {
                        // Players kills
                        int playersKills = reader.ReadInt();
                        for (int i = 0; i < playersKills; i++)
                        {
                            Alignment key = (Alignment)reader.ReadInt();
                            int val = reader.ReadInt();
                            m_PlayersKills[key] = val;
                        } 
                        
                        // Mobiles kills
                        int mobilesKills = reader.ReadInt();
                        for (int i = 0; i < mobilesKills; i++)
                        {
                            Alignment key = (Alignment)reader.ReadInt();
                            int val = reader.ReadInt();
                            m_MobilesKills[key] = val;
                        }
                        break;
                    }
            }

            m_Instance = this;
        }