private static void BringBack(int id) { Actor actor = Module <ActorMgr> .Self.Get(id); actor.SetBehaviorState(BehaveState.Default, true); Module <ActorMgr> .Self.MoveToScenario(actor, "Main", ReturnLocations[id][0]); FavorObject f = Module <FavorManager> .Self.GetFavorObject(id); FavorRelationshipId r = f.Relationship; f.Relationship = FavorRelationshipId.Friend; FavorRelationshipUtil.TryUpgradeRelationShip(f, false, false, true); Module <FavorInfluenceManager> .Self.OnUpdateRelation(f.ID, r, f.Relationship); Module <FavorManager> .Self.RemoveToBlackList(f.ID); }
private static void BringBack(int id) { Actor actor = Module <ActorMgr> .Self.Get(id); actor.SetBehaviorState(BehaveState.Default, true); Module <ActorMgr> .Self.MoveToScenario(actor, "Main", ReturnLocations[id][0]); FavorObject f = Module <FavorManager> .Self.GetFavorObject(id); FavorRelationshipId r = f.Relationship; f.Relationship = FavorRelationshipId.Friend; FavorRelationshipUtil.TryUpgradeRelationShip(f, false, false, true); Module <FavorInfluenceManager> .Self.OnUpdateRelation(f.ID, r, f.Relationship); if (typeof(FavorManager).GetMethod("RemoveFromBlackList") != null) { typeof(FavorManager).GetMethod("RemoveFromBlackList").Invoke(Module <FavorManager> .Self, new object[] { f.ID }); } else if (typeof(FavorManager).GetMethod("RemoveToBlackList") != null) { typeof(FavorManager).GetMethod("RemoveToBlackList").Invoke(Module <FavorManager> .Self, new object[] { f.ID }); } }
static void Postfix() { Dbgl("new Vector3" + Module <Player> .Self.actor.gamePos.ToString() + ","); return; Module <Player> .Self.bag.ChangeMoney(1000000, true, 0); Module <Player> .Self.AddExp(400000, true); //Object here is necessary. //Dbgl("OtherConfig: " + string.Format(str)); //trialDungeonMonsterConfInfo.ActorID; //trialDungeonMonsterConfInfo.Faction; //ActorAgent aa new ActorAgent(vp, vr,); /* * int id = ruleData.PickOneBossMonster(); * TrialDungeonMonsterConfInfo trialDungeonMonsterConfInfo = Module<DungeonConfCreator>.Self.RandomDungeonMonsterConfList.Find((TrialDungeonMonsterConfInfo m) => m.ID == id); * if (trialDungeonMonsterConfInfo == null) * { * Debug.LogError(string.Format("monster {0} not existed!", id)); * return; * } * GameObject gameObject = spawnPoint.Spawn(new object[] * { * trialDungeonMonsterConfInfo.ActorID, * trialDungeonMonsterConfInfo.Faction * }); * if (gameObject != null) * { * Actor component = gameObject.GetComponent<Actor>(); * this.mCreatedActorList.Add(component); * Module<TrialRandomDungeonManager>.Self.AddMonster(component, trialDungeonMonsterConfInfo); * component.killEvent += Module<TrialRandomDungeonManager>.Self.MonsterBeKilledCBMethod; * } */ //FavorObject ff = FavorManager.Self.GetFavorObject(-1); //bool test = ff.IsDebut; if (true) { FavorObject[] fa = FavorManager.Self.GetAllFavorObjects(); foreach (FavorObject f in fa) { if (!f.IsDebut || f.RelationshipType == FavorRelationshipType.Couple) { FavorManager.Self.GainFavorValue(f.ID, -1, 100); if (false) { FavorRelationshipId relationId = FavorRelationshipId.UltimateCouple; relationId = FavorRelationshipId.Friend; FavorUtility.SetNpcRelation(f.ID, relationId, 1); relationId = FavorRelationshipId.SoulMate; FavorUtility.SetNpcRelation(f.ID, relationId, 1); } } } if (false) { Module <Player> .Self.bag.AddItem(ItemObject.CreateItem(7000041, 100), true); Module <Player> .Self.bag.AddItem(ItemObject.CreateItem(8000019, 100), true); Module <Player> .Self.bag.ChangeMoney(100000, true, 0); } } }