Esempio n. 1
0
        protected void PrivateAddBandMember(RockBand ths, SimDescription otherSimDesc)
        {
            if (ths.mBandInfo == null)
            {
                ths.mBandInfo = new RockBandInfo();
                ths.mBandInfo.AddBandMember(ths.SkillOwner.SimDescriptionId);
                Sim createdSim = ths.SkillOwner.CreatedSim;
                if (createdSim != null)
                {
                    ActiveTopic.AddToSim(createdSim, "Rock Band");
                }
            }

            //if (ths.mBandInfo.NumBandMembers < 0x4)
            {
                ths.mBandInfo.AddBandMember(otherSimDesc.SimDescriptionId);
                Sim sim = otherSimDesc.CreatedSim;
                if (sim != null)
                {
                    ActiveTopic.AddToSim(sim, "Rock Band");
                }

                SkillManager skillManager = otherSimDesc.SkillManager;
                RockBand     skill        = skillManager.GetSkill <RockBand>(SkillNames.RockBand);
                if (skill == null)
                {
                    skillManager.AddAutomaticSkill(SkillNames.RockBand);
                    skill = skillManager.GetSkill <RockBand>(SkillNames.RockBand);
                }

                skill.mBandInfo = ths.mBandInfo;
                skill.BandNameUpdate(ths.mBandInfo.BandName);
            }
        }
        private void AddNeededSkills()
        {
            try
            {
                SkillManager skillManager = base.mSim.SkillManager;
                if (skillManager != null)
                {
                    Skill skill = skillManager.GetSkill <Skill>(SkillNames.ClubDancing);
                    if (skill == null)
                    {
                        skillManager.AddAutomaticSkill(SkillNames.ClubDancing);
                        skill = skillManager.GetSkill <Skill>(SkillNames.ClubDancing);
                    }

                    if (skill != null)
                    {
                        skill.SkillLevel = skill.MaxSkillLevel;
                        //Message.Sender.Show("Maxed the dancing skills!");
                    }
                }
            }
            catch (Exception e)
            {
                Message.Sender.ShowError(this, "Cannot add skills to dancer", false, e);
            }
        }
Esempio n. 3
0
        private void AddNeededSkills(Sim sim)
        {
            SkillManager skillManager = sim.SkillManager;

            if (skillManager != null)
            {
                Skill skill = skillManager.GetSkill <Skill>(SkillNames.Bartending);
                if (skill == null)
                {
                    skillManager.AddAutomaticSkill(SkillNames.Bartending);
                    skill = skillManager.GetSkill <Skill>(SkillNames.Bartending);
                }

                if (skill != null)
                {
                    skill.SkillLevel = skill.MaxSkillLevel;
                    //Message.Sender.Show("Maxed the dancing skills!");
                }
            }
        }