composites.cs, default code checks for GameUI.ChangeQuestButton.IsEnabled but that button is still enabled when party members are in game. Need to check for game settings button instead 0xC4A9CC94C0A929B
Code:
//new Action(ret => SimpleFollow.Log("Checking if party is in game... IsInParty={0} FollowerCount={1} PlayButtonEnabled={2} ChangeQuestButtonEnabled={3}", Social.IsInParty, SimpleFollow.Followers.Count, GameUI.PlayGameButton.IsEnabled, GameUI.ChangeQuestButton.IsEnabled)),
new PrioritySelector(
new Decorator(ret => Social.IsInParty && SimpleFollow.Followers.Any(f => f.Value.IsInGame) || !GameUI.ChangeQuestButton.IsEnabled,
new Sequence(
new Action(ret => SimpleFollow.Log("Waiting for {0} followers to leave game...", SimpleFollow.Followers.Count(f => f.Value.IsInGame))),
new Sleep(2000)
)
),
new Sequence(
children.ToArray()
)
)
While im at it...
servers message to follower GetMessage() returns DateTime.MinValue when ZetaDia.Me == null (when in lobby).
FollowerTag does nothing when Leader.LastUpdated == DateTime.MinValue in MainSequence
So the follower can never get to execute LeaderNotInGame()
So will never leave the game.
Code:
if (!ZetaDia.Service.IsValid || !ZetaDia.Service.Platform.IsConnected)
{
m = new Message()
{
IsInGame = false,
};
return m;
}
if (ZetaDia.Me == null)
{
m = new Message()
{
IsInGame = false,
LastUpdated = DateTime.UtcNow,
IsInParty = Social.IsInParty,
BattleTagHash = ZetaDia.Service.Hero.BattleTagName.GetHashCode(),
NumPartymembers = Social.NumPartyMembers
};
return m;
}
The following will fix the issue where it spams "We're party leader - leaving game and party" and doesn't actually leave.
Code:
new Decorator(ret => Social.IsPartyleader,
new Sequence(
new Action(ret => SimpleFollow.Log("We're party leader - leaving game and party!")),
new Action(ret => SafeLeaveGame())
)
),