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; }
private static void OnGameSpeedChanged(Sims3.Gameplay.Gameflow.GameSpeed newSpeed, bool locked) { if (LoadingScreenController.IsLayoutLoaded()) { return; } sYieldRequired = (newSpeed <= Sims3.Gameplay.Gameflow.GameSpeed.Normal); OnYieldAll(); }
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); } }
public void LTRForceChangeState(ISimDescription simDesc1, ISimDescription simDesc2, Sims3.UI.Controller.LongTermRelationshipTypes relation) { mCASModel.LTRForceChangeState(simDesc1, simDesc2, relation); }
public void OnHouseholdChanged(Sims3.UI.Hud.HouseholdEvent ev, ObjectGuid objectGuid) { Common.FunctionTask.Perform(PopulateSkewers); }
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)); }
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); }
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); } }
public new static bool DisplayScriptError(Sims3.SimIFace.IScriptProxy proxy, Exception e) { return ((Sims3.SimIFace.IScriptErrorWindow)AppDomain.CurrentDomain.GetData("ScriptErrorWindow")).DisplayScriptError(proxy, e); }
public Item(Sims3.Gameplay.Careers.Career.EventDaily item, Sims3.Gameplay.Careers.Career career, string name) : base (name, 0) { mEvent = item; mCareer = career; }