Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packs support #16

Open
sgkoishi opened this issue Oct 26, 2021 · 0 comments
Open

Packs support #16

sgkoishi opened this issue Oct 26, 2021 · 0 comments

Comments

@sgkoishi
Copy link
Owner

sgkoishi commented Oct 26, 2021

Currently, the HDT's pack opening event does not support mass opening, catch-up and merc packs (and likely won't). Even worse, it is broken for regular packs as well.

I really want to keep track of my packs, even if it requires modding
Modding violates the TOS, I KNOW HOW AND DO WANT TO CONTINUE
[HarmonyPostfix]
[HarmonyPatch(typeof(Networking.ConnectAPI), "GetOpenedBooster")]
public static void GetOpenedBooster(ref PegasusUtil.BoosterContent __result)
{
    Console.WriteLine($"IsCatchupPack: {__result.IsCatchupPack}");
    Console.WriteLine($"PacksOpened: {__result.PacksOpened}");
    Console.WriteLine($"IsMpo: {__result.IsMpo}");
    Console.WriteLine($"MassPackOpeningEnabled: {__result.MassPackOpeningEnabled}");
    foreach (var i in __result.List)
    {
        Console.WriteLine($"CardId: {GameUtils.TranslateDbIdToCardId(i.CardDef.Asset)}");
        Console.WriteLine($"Premium: {i.CardDef.Premium}");
        Console.WriteLine($"Time: {new DateTime(i.InsertDate.Year, i.InsertDate.Month, i.InsertDate.Day, i.InsertDate.Hours, i.InsertDate.Min, i.InsertDate.Sec):yyyyMMddHHmmss}");
    }
}
@sgkoishi sgkoishi pinned this issue Oct 26, 2021
@sgkoishi sgkoishi changed the title Mercenaries Pack support Packs support Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant