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

            m_Persona = new PlayerBotPersona();

            m_Persona.Experience  = (PlayerBotPersona.PlayerBotExperience)reader.ReadInt();
            m_Persona.Profile     = (PlayerBotPersona.PlayerBotProfile)reader.ReadInt();
            m_IsPlayerKiller      = reader.ReadBool();
            m_PrefersMelee        = reader.ReadBool();
            m_PreferedCombatSkill = (SkillName)reader.ReadInt();
        }
Example #2
0
        private void InitPersona()
        {
            // Note about Titles (Karma & Professions)
            // They do not need to be set at creation time. They're handled in Titles.cs, same way as real players.
            // So it'll be possible to see "The Glorious Lord Soandso, Grandmaster Swordsman" instead of traditional NPC titles.
            m_Persona = new PlayerBotPersona();

            switch (Utility.Random(3))
            {
            case 0:
                m_Persona.Profile = PlayerBotPersona.PlayerBotProfile.PlayerKiller;
                break;

            case 1:
                m_Persona.Profile = PlayerBotPersona.PlayerBotProfile.Crafter;
                break;

            case 2:
                m_Persona.Profile = PlayerBotPersona.PlayerBotProfile.Adventurer;
                break;
            }

            switch (Utility.Random(4))
            {
            case 0:
                m_Persona.Experience = PlayerBotPersona.PlayerBotExperience.Newbie;
                break;

            case 1:
                m_Persona.Experience = PlayerBotPersona.PlayerBotExperience.Average;
                break;

            case 2:
                m_Persona.Experience = PlayerBotPersona.PlayerBotExperience.Proficient;
                break;

            case 3:
                m_Persona.Experience = PlayerBotPersona.PlayerBotExperience.Grandmaster;
                break;
            }

            m_IsPlayerKiller = IsPlayerKiller();
        }