本文整理汇总了C#中ActiveTopic类的典型用法代码示例。如果您正苦于以下问题:C# ActiveTopic类的具体用法?C# ActiveTopic怎么用?C# ActiveTopic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActiveTopic类属于命名空间,在下文中一共展示了ActiveTopic类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAccept
public static void OnAccept(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
actor.Motives.SetDecay(CommodityKind.Fun, true);
target.Motives.SetDecay(CommodityKind.Fun, true);
actor.Motives.ChangeValue(CommodityKind.Fun, Jetpack.kFunGainJetPackWoohoo);
target.Motives.ChangeValue(CommodityKind.Fun, Jetpack.kFunGainJetPackWoohoo);
if (CommonPregnancy.IsSuccess(actor, target, i.Autonomous, CommonWoohoo.WoohooStyle.TryForBaby))
{
CommonPregnancy.Impregnate(actor, target, i.Autonomous, CommonWoohoo.WoohooStyle.TryForBaby);
}
CommonWoohoo.RunPostWoohoo(actor, target, actor.GetActiveJetpack(), CommonWoohoo.WoohooStyle.TryForBaby, CommonWoohoo.WoohooLocation.Jetpack, true);
}
catch (ResetException)
{
throw;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例2: OnAccept
public static void OnAccept(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
int actorAge = (int)Aging.GetCurrentAgeInDays(actor.SimDescription);
int targetAge = (int)Aging.GetCurrentAgeInDays(target.SimDescription);
int difference = 0;
string suffix = "SameResult";
if (targetAge > actorAge)
{
suffix = "OlderResult";
difference = targetAge - actorAge;
}
else if (targetAge < actorAge)
{
suffix = "YoungerResult";
difference = actorAge - targetAge;
}
if (SimTypes.IsSelectable(actor))
{
Common.Notify(Common.Localize("AskAboutAge:" + suffix, target.IsFemale, new object[] { difference }), target.ObjectId, ObjectGuid.InvalidObjectGuid, StyledNotification.NotificationStyle.kSimTalking);
}
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例3: OnAccept
public static void OnAccept(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
// Reset the attraction so it is recalculated now
RelationshipEx.CalculateAttractionScore(Relationship.Get(target.SimDescription, actor.SimDescription, false), true);
int score = (int)RelationshipEx.GetAttractionScore(target.SimDescription, actor.SimDescription, true);
int index = score / 10;
if (index >= 10)
{
index = 9;
}
else if (index < 0)
{
index = 0;
}
Common.Notify(Common.Localize("CheckAttraction:Result" + index, actor.IsFemale, target.IsFemale, new object[] { actor, target }), actor.ObjectId, target.ObjectId, StyledNotification.NotificationStyle.kSimTalking);
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例4: BeforeDiagnose
public static void BeforeDiagnose(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
FreeClinicSessionSituation freeClinicSessionSituation = FreeClinicSessionSituation.GetFreeClinicSessionSituation(actor);
if (freeClinicSessionSituation != null)
{
freeClinicSessionSituation.NumVaccinations++;
freeClinicSessionSituation.AddToIgnoreList(target);
freeClinicSessionSituation.BringRandomSimsToSession(0x1);
/*
HealthManager healthManager = target.SimDescription.HealthManager;
if (healthManager != null)
{
healthManager.Vaccinate();
}
*/
}
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例5: CallbackTest
public static bool CallbackTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
if (target.Household == null)
{
greyedOutTooltipCallback = Common.DebugTooltip("No Household");
return false;
}
if (target.Household == actor.Household)
{
greyedOutTooltipCallback = Common.DebugTooltip("Same Household");
return false;
}
if (target.Household.IsSpecialHousehold)
{
greyedOutTooltipCallback = Common.DebugTooltip("Special Household");
return false;
}
return true;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}
示例6: OnFinishMakeoverFreestyle
public static void OnFinishMakeoverFreestyle(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
bool tookSemaphore = false;
Styling.MakeoverOutcome makeoverOutcome = Styling.GetMakeoverOutcome(target, actor, true);
bool forceFailureOutfit = makeoverOutcome == Styling.MakeoverOutcome.EpicFailure;
bool flag3 = false;
try
{
if (forceFailureOutfit)
{
Styling.LoadMakeoverEpicFailureOutfitForCasOverride(target);
}
flag3 = GetMakeoverEx.DisplayCAS(target, actor, ref tookSemaphore, forceFailureOutfit);
}
catch (Exception)
{
throw;
}
finally
{
if (tookSemaphore)
{
GameStates.ReleaseInteractionStateChangeSemaphore();
}
}
if (CASChangeReporter.Instance.GetPropertyChanged(CASChangeReporter.ChangeFlags.Any))
{
SkillLevel customerReactionType = Styling.GetCustomerReactionType(target, actor, makeoverOutcome, false);
SkillLevel stylerReactionType = Styling.GetStylerReactionType(customerReactionType);
StateMachineClient client = StateMachineClient.Acquire(actor, "StylistActiveCareer");
client.SetActor("x", target);
client.SetActor("y", actor);
client.SetParameter("doClothesSpin", !flag3);
client.SetParameter("customerReactionType", customerReactionType);
client.SetParameter("stylistReactionType", stylerReactionType);
client.EnterState("x", "Enter");
client.EnterState("y", "Enter");
actor.LoopIdle();
client.RequestState("x", "Customer Reaction");
Styling.PostMakeover(target, actor, makeoverOutcome, false, customerReactionType, true, true, new Styling.OnMakeoverCompletedCallback(SocialCallback.OnMakeoverFreestyleCompleted));
client.RequestState(false, "x", "Exit");
client.RequestState("y", "Stylist Reaction");
client.RequestState("y", "Exit");
}
}
catch (ResetException)
{
throw;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例7: OnAccepted
public static void OnAccepted(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
Kill.OnAccepted(actor, target, SimDescription.DeathType.Burn);
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例8: CallbackTest
public static bool CallbackTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
return Assassination.Allow(actor, target, SimDescription.DeathType.Burn, isAutonomous, false, false, ref greyedOutTooltipCallback);
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}
示例9: OnScoreNeutral
public static bool OnScoreNeutral(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
return true;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}
示例10: OnGiveGiftReject
public static void OnGiveGiftReject(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
Sim.GiveGift inst = i as Sim.GiveGift;
DoAcceptReject(actor, target, inst);
}
catch (Exception e)
{
Common.Exception(actor, target, interaction, e);
}
}
示例11: OnScoreInsulting
public static bool OnScoreInsulting(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
return WoohooScoring.ScoreInsulting(actor, target, Common.IsAutonomous(actor), "InterestInRisky");
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}
示例12: TestFight
public static bool TestFight(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
if (!CommonTest(actor, target)) return false;
if (TestBarBrawl(actor, target, topic, isAutonomous, ref greyedOutTooltipCallback))
{
return false;
}
else if ((actor.SimDescription.ChildOrBelow) || (target.SimDescription.ChildOrBelow))
{
if ((actor.SimDescription.YoungAdultOrAbove) || (target.SimDescription.YoungAdultOrAbove))
{
return false;
}
}
if (target.Service is Burglar)
{
BurglarSituation situation = ServiceSituation.FindServiceSituationInvolving(target) as BurglarSituation;
if (((situation != null) && (situation.HasBeenApprehended || situation.HasBeenDefeated)) || (target.LotCurrent != Household.ActiveHousehold.LotHome))
{
return false;
}
else if ((!actor.IsBrave && !actor.BuffManager.HasElement(BuffNames.OddlyPowerful)) && !actor.TraitManager.HasElement(TraitNames.CanApprehendBurglar))
{
return false;
}
return true;
}
if ((actor.Genealogy == null) || (target.Genealogy == null))
{
return false;
}
Relationship relationship = Relationship.Get(actor, target, false);
if ((actor.HasTrait(TraitNames.MeanSpirited) && (relationship != null)) && ((relationship.AreFriendsOrRomantic() || (actor.Household.Contains(target.SimDescription) && (relationship.LTR.Liking >= 0f))) || target.Genealogy.IsParentOrStepParent(actor.Genealogy)))
{
return false;
}
return (((relationship == null) || (relationship.LTR.Liking < SocialComponent.kFightLikingValue)) && !target.Genealogy.IsParentOrStepParent(actor.Genealogy));
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}
示例13: OnAccepted
public static void OnAccepted(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
if ((actor.Household == Household.ActiveHousehold) || (target.Household == Household.ActiveHousehold))
{
Common.Notify(Common.Localize("AskAboutFunds:Result", target.IsFemale, new object[] { target, target.FamilyFunds }), target.ObjectId);
}
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例14: OnTest
public static bool OnTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
if ((actor != Sim.ActiveActor) && (target != Sim.ActiveActor)) return false;
return true;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}
示例15: CallbackTest
public static bool CallbackTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
if (!GameUtils.IsInstalled(ProductVersion.EP1)) return false;
return Assassination.Allow(actor, target, SimDescription.DeathType.MummyCurse, isAutonomous, false, false, ref greyedOutTooltipCallback);
}
catch (Exception e)
{
Common.Exception(actor, target, e);
return false;
}
}