Jump to content

55 posts in this topic

Recommended Posts

Posted (edited)

Unlocking all Units still not working

public void OnUnlockAllUnitsPressed()
{
    try
    {
        DebugController.Instance.UnlockAllUnits();
        Debug.Log("[QA] All units unlocked successfully");
    }
    catch (Exception ex)
    {
        Debug.LogError($"[QA] Unlock failed: {ex}");
    }
}

or

public void OnUnlockAllUnitsPressed()
{
    DebugController.Instance.UnlockAllUnits();
}

 

CastleClashers.Core.DebugController.UnlockEverything RVA 0x46C0980 

unlock all units
unlock all wheels
unlock all helpers
grant 5,000,000 coins
grant 5,000,000 wood
configure default utilities
persist the resulting state

 

@Puddinwould you be able to implement it? 

 

what I found as well is the chain via IDA: 

Debug menu button: “Unlock Units”
        ↓
VoodoDebuggerController.UnlockAllUnits
        ↓
VoodoDebuggerController.Safe
        ↓
CastleClashers.Core.DebugController.UnlockAllUnits
        ↓
AddPieces(unitId, 1000)
        ↓
GetUnitCardData(unitId)
        ↓
UpdateUnlocked(true)
        ↓
Save()
        ↓
UnlockCardFromArena(10)
        ↓
Save()

or is wrong? I checked the decrypted IPA 
 

void UnlockAllUnits()
{
    CardController.Load();
    CardController.Save();

    List<UnitData> units = GetAllUnits();

    AddPieces(units[0].ID, 1);

    foreach (UnitData unit in units)
    {
        AddPieces(unit.ID, 1000);

        CardData card = GetUnitCardData(unit.ID);

        if (card != null)
        {
            card.UpdateUnlocked(true);
            CardController.Save();
        }
    }

    UnlockCardFromArena(10);
    CardController.Save();
}

 

Updated by Deutsch1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines