Example #1
0
        public static List<CareerLevel> AllLevels(Sims3.Gameplay.Careers.Career job)
        {
            List<CareerLevel> list = new List<CareerLevel>();

            if (job != null)
            {
                CareerLevel level1 = job.Level1;
                if (level1 != null)
                {
                    list.Add(level1);

                    int index = 0;
                    while(index < list.Count)
                    {
                        CareerLevel level = list[index];
                        index++;

                        foreach (CareerLevel next in level.NextLevels)
                        {
                            list.Add(next);
                        }
                    }
                }
            }

            return list;
        }
Example #2
0
        private static void OnGameSpeedChanged(Sims3.Gameplay.Gameflow.GameSpeed newSpeed, bool locked)
        {
            if (LoadingScreenController.IsLayoutLoaded())
            {
                return;
            }

            sYieldRequired = (newSpeed <= Sims3.Gameplay.Gameflow.GameSpeed.Normal);

            OnYieldAll();
        }
Example #3
0
        private void OnHouseholdSimChanged(Sims3.Gameplay.CAS.HouseholdEvent householdEvent, IActor actor, Household oldHousehold)
        {
            Common.StringBuilder msg = new Common.StringBuilder("OnHouseholdSimChanged");

            try
            {
                HudModel ths = Sims3.UI.Responder.Instance.HudModel as HudModel;

                if (ths.HouseholdChanged != null)
                {
                    msg += "A";

                    if (householdEvent != Sims3.Gameplay.CAS.HouseholdEvent.kNone)
                    {
                        msg += "B";

                        ths.ClearSimList();
                        if ((ths.mCurrentHousehold != null) && (ths.mCurrentHousehold.CurrentMembers != null))
                        {
                            msg += "C";

                            int count = ths.mCurrentHousehold.CurrentMembers.Count;
                            for (int i = 0x0; i < count; i++)
                            {
                                msg += "D";

                                Household.Member member = ths.mCurrentHousehold.CurrentMembers[i];
                                SimInfo item = ths.CreateSimInfo(member.mSimDescription);
                                if (item != null)
                                {
                                    msg += "E";

                                    ths.mSimList.Add(item);
                                }
                            }
                            ths.mSimList.Sort();
                        }
                    }

                    /*
                    switch (householdEvent)
                    {
                        case Sims3.Gameplay.CAS.HouseholdEvent.kSimAdded:
                            ths.HouseholdChanged(HouseholdEvent.SimAdded, actor.ObjectId);
                            break;

                        case Sims3.Gameplay.CAS.HouseholdEvent.kSimRemoved:
                            ths.HouseholdChanged(HouseholdEvent.SimRemoved, actor.ObjectId);
                            break;
                    }
                    */
                }
                ths.UpdateHouseholdThumb();
            }
            catch (Exception e)
            {
                Common.Exception(msg, e);
            }
            finally
            {
                Common.DebugNotify(msg);
            }
        }
Example #4
0
 public void LTRForceChangeState(ISimDescription simDesc1, ISimDescription simDesc2, Sims3.UI.Controller.LongTermRelationshipTypes relation)
 {
     mCASModel.LTRForceChangeState(simDesc1, simDesc2, relation);
 }
Example #5
0
 public void OnHouseholdChanged(Sims3.UI.Hud.HouseholdEvent ev, ObjectGuid objectGuid)
 {
     Common.FunctionTask.Perform(PopulateSkewers);
 }
Example #6
0
        public static void Promote(Sims3.Gameplay.Careers.Career job, CareerLevel newLevel)
        {
            CareerLevel curLevel = job.CurLevel;

            int bonusAmount = job.GivePromotionBonus();
            job.GivePromotionRewardObjectsIfShould(newLevel);
            job.SetLevel(newLevel);
            job.OnPromoteDemote(curLevel, newLevel);
            if (job.OwnerDescription.CreatedSim != null)
            {
                job.SetTones(job.OwnerDescription.CreatedSim.CurrentInteraction);
            }

            job.ShowOccupationTNS(job.GeneratePromotionText(bonusAmount));
        }
Example #7
0
        public override void GiveRewards(bool bDialogResult, Sim sim, string icon, Sims3.Gameplay.ActorSystems.Origin origin)
        {
            base.GiveRewards(bDialogResult, sim, icon, origin);

            RewardInfoEx.GiveRewards(sim, null, mYesRewardsList);
        }
Example #8
0
 public void OnHouseholdChangedProxy(Sims3.UI.Hud.HouseholdEvent ev, ObjectGuid objectGuid)
 {
     try
     {
         if (HouseholdChanged != null)
         {
             HouseholdChanged(ev, objectGuid);
         }
     }
     catch (Exception e)
     {
         Common.Exception(Simulator.GetProxy(objectGuid), e);
     }
 }
Example #9
0
 public new static bool DisplayScriptError(Sims3.SimIFace.IScriptProxy proxy, Exception e)
 {
     return ((Sims3.SimIFace.IScriptErrorWindow)AppDomain.CurrentDomain.GetData("ScriptErrorWindow")).DisplayScriptError(proxy, e);
 }
Example #10
0
 public Item(Sims3.Gameplay.Careers.Career.EventDaily item, Sims3.Gameplay.Careers.Career career, string name)
     : base (name, 0)
 {
     mEvent = item;
     mCareer = career;
 }