// From SocialComponent private static List <InteractionObjectPair> GetUnfilteredSocials(SocialComponent ths, Sim actor, Sim target, Relationship r) { string msg = actor.FullName; msg += Common.NewLine + target.FullName; bool isAutonomous = false; List <InteractionObjectPair> results = new List <InteractionObjectPair>(); if (actor != target) { bool flag2; int numSocials = STCData.GetNumSocials(ths.Conversation); SocialInteractionCandidateCollection candidates = new SocialInteractionCandidateCollectionEx(actor, target, r, ths.Conversation, isAutonomous, ref msg); Conversation.GetCurrentSTC(actor, target, r, ths.Conversation, out flag2); foreach (CommodityTypes str in CommodityData.AllPlayableCommodities) { using (Common.TestSpan span = new Common.TestSpan(TimeSpanLogger.Bin, "Commodity: " + str, Common.DebugLevel.Stats)) { msg += Common.NewLine + "1 " + str; switch (str) { case CommodityTypes.Amorous: { if ((actor.CanGetRomantic(target, false) || !actor.SimDescription.IsHuman) || !target.SimDescription.IsHuman) { break; } results.Add(new InteractionObjectPair(Sim.BetrayedSimsFutileRomance.Singleton, target)); continue; } case CommodityTypes.Steamed: { if (!r.STC.IsPositive) { break; } continue; } case CommodityTypes.Insulting: if (isAutonomous && actor.BuffManager.HasElement(BuffNames.Admonished)) { continue; } break; } msg += Common.NewLine + "2 " + str; int num2 = numSocials; if (CommodityData.AppearsAsSubMenu(str)) { msg += Common.NewLine + "AppearsAsSubMenu " + str; List <SocialInteractionCandidate> socialsFor = candidates.GetSocialsFor(str); if (socialsFor != null) { msg += Common.NewLine + "socialsFor " + str + " " + socialsFor.Count; string changeToneText = CommodityData.Get(str).GetChangeToneText(); AddSocials(ths, actor, target, socialsFor, isAutonomous, num2, results, new string[] { changeToneText }, TraitNames.Unknown, ref msg); if (str == CommodityTypes.Friendly) { List <SocialInteractionCandidate> socials = candidates.GetSocialsFor(CommodityTypes.Neutral); if (socials != null) { AddSocials(ths, actor, target, socials, isAutonomous, num2, results, new string[] { changeToneText }, TraitNames.Unknown, ref msg); } } } } } } string str3 = Localization.LocalizeString("Gameplay/Socializing:Special", new object[0x0]); foreach (Trait trait in actor.TraitManager.List) { List <SocialInteractionCandidate> list4 = candidates.GetSocialsFor(trait.Guid); if ((list4 != null) && (list4.Count > 0x0)) { string str5 = trait.TraitName(actor.IsFemale); string[] inlineParentMenu = new string[] { str3, str5 + Localization.Ellipsis }; AddSocials(ths, actor, target, list4, isAutonomous, numSocials, results, inlineParentMenu, trait.Guid, ref msg); } } if (((ths.Conversation != null) && (actor.Household != target.Household)) && ((!actor.IsAtHome || target.IsAtHome) && (actor.IsAtHome || !target.IsAtHome))) { SocialInteractionCandidate candidate = new SocialInteractionCandidate(ths.GetGoodbyeSocial(actor, target), new string[0], null); ths.AddSocials(actor, target, new List <SocialInteractionCandidate>(new SocialInteractionCandidate[] { candidate }), isAutonomous, numSocials, results, new string[0x0], TraitNames.Unknown); } } Common.WriteLog(msg); return(results); }
private static List <InteractionObjectPair> GetUnfilteredSocials(SocialComponent ths, Sim actor, Sim target, Relationship r) { bool isAutonomous = false; List <InteractionObjectPair> results = new List <InteractionObjectPair>(); if (actor != target) { int numSocials = STCData.GetNumSocials(ths.Conversation); SocialInteractionCandidateCollection candidates = new SocialInteractionCandidateCollection(actor, target, r, ths.Conversation, isAutonomous); foreach (CommodityTypes types in CommodityData.AllPlayableCommodities) { sMsg += Common.NewLine + "CommodityType: " + types; switch (types) { case CommodityTypes.Amorous: { if (actor.CanGetRomantic(target, false)) { break; } results.Add(new InteractionObjectPair(Sim.BetrayedSimsFutileRomance.Singleton, target)); sMsg += Common.NewLine + "Amorous Denied"; continue; } case CommodityTypes.Steamed: { if (!r.STC.IsPositive) { break; } sMsg += Common.NewLine + "Steamed Denied"; continue; } case CommodityTypes.Insulting: if (isAutonomous && actor.BuffManager.HasElement(BuffNames.Admonished)) { sMsg += Common.NewLine + "Insulting Denied"; continue; } break; } int maxNumSocials = numSocials; if (CommodityData.AppearsAsSubMenu(types)) { GetSocialsForSTC(types, actor, target, r, ths.Conversation, isAutonomous); List <SocialInteractionCandidate> socialsFor = candidates.GetSocialsFor(types); if (socialsFor != null) { string changeToneText = CommodityData.Get(types).GetChangeToneText(); AddSocials("1", ths, types, actor, target, socialsFor, isAutonomous, maxNumSocials, results, new string[] { changeToneText }, TraitNames.Unknown); if (types == CommodityTypes.Friendly) { List <SocialInteractionCandidate> socials = candidates.GetSocialsFor(CommodityTypes.Neutral); if (socials != null) { AddSocials("2", ths, CommodityTypes.Neutral, actor, target, socials, isAutonomous, maxNumSocials, results, new string[] { changeToneText }, TraitNames.Unknown); } } } } } string str3 = Common.LocalizeEAString("Gameplay/Socializing:Special"); foreach (Trait trait in actor.TraitManager.List) { List <SocialInteractionCandidate> list4 = candidates.GetSocialsFor(trait.Guid); if ((list4 != null) && (list4.Count > 0x0)) { string str5 = trait.TraitName(actor.IsFemale); string[] inlineParentMenu = new string[] { str3, str5 + Localization.Ellipsis }; AddSocials("3", ths, CommodityTypes.Undefined, actor, target, list4, isAutonomous, numSocials, results, inlineParentMenu, trait.Guid); } } if (((ths.Conversation != null) && (actor.Household != target.Household)) && ((!actor.IsAtHome || target.IsAtHome) && (actor.IsAtHome || !target.IsAtHome))) { SocialInteractionCandidate candidate = new SocialInteractionCandidate(ths.GetGoodbyeSocial(actor, target), new string[0], null); AddSocials("4", ths, CommodityTypes.Undefined, actor, target, new List <SocialInteractionCandidate>(new SocialInteractionCandidate[] { candidate }), isAutonomous, numSocials, results, new string[0x0], TraitNames.Unknown); } } return(results); }