Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: friends targeting changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 30, 2023
1 parent 414fe09 commit 9157d96
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions RotationSolver/Updaters/TargetUpdater_Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,13 @@ internal unsafe static void UpdateFriends()
: party.Where(obj => obj != null && obj.GameObject is BattleChara).Select(obj => obj.GameObject as BattleChara);

//添加亲信
PartyMembers = PartyMembers.Union(Service.ObjectTable.Where(obj => obj.SubKind == 9 && obj is BattleChara).Cast<BattleChara>());
PartyMembers = PartyMembers.Union(Service.ObjectTable.OfType<BattleChara>().Where(obj => obj.SubKind == 9));

HavePet = Service.ObjectTable.Where(obj => obj != null && obj is BattleNpc npc
&& npc.BattleNpcKind == BattleNpcSubKind.Pet
&& npc.OwnerId == Service.ClientState.LocalPlayer.ObjectId).Count() > 0;
var mayPet = Service.ObjectTable.OfType<BattleNpc>().Where(npc => npc.OwnerId == Service.ClientState.LocalPlayer.ObjectId);

HaveChocobo = Service.ObjectTable.Where(obj => obj != null && obj is BattleNpc npc
&& npc.BattleNpcKind == BattleNpcSubKind.Chocobo
&& npc.OwnerId == Service.ClientState.LocalPlayer.ObjectId).Count() > 0;
HavePet = mayPet.Any(npc => npc.BattleNpcKind == BattleNpcSubKind.Pet);

HaveChocobo = mayPet.Any(npc => npc.BattleNpcKind == BattleNpcSubKind.Chocobo);

AllianceMembers = Service.ObjectTable.OfType<PlayerCharacter>();

Expand Down

0 comments on commit 9157d96

Please sign in to comment.