コード例 #1
0
 public void OnPartyClick(GameObject go, bool isClicked)
 {
     this.Hide(delegate() {
         FF9PARTY_INFO ff9PARTY_INFO = new FF9PARTY_INFO();
         ff9PARTY_INFO.menu          = new byte[] {
             0,
             1,
             2,
             3
         };
         ff9PARTY_INFO.select = new byte[] {
             4,
             5,
             6,
             7,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue,
             byte.MaxValue
         };
         FF9PARTY_INFO ff9PARTY_INFO2 = ff9PARTY_INFO;
         bool[] array           = new bool[9];
         array[0]               = true;
         ff9PARTY_INFO2.fix     = array;
         ff9PARTY_INFO.party_ct = 4;
         PersistenSingleton <UIManager> .Instance.PartySettingScene.Info = ff9PARTY_INFO;
         PersistenSingleton <UIManager> .Instance.ChangeUIState(UIManager.UIState.PartySetting);
     });
 }
コード例 #2
0
    public static void OpenPartyMenu(FF9PARTY_INFO sPartyInfo)
    {
        Singleton <DialogManager> .Instance.CloseAll();

        PersistenSingleton <UIManager> .Instance.GetSceneFromState(PersistenSingleton <UIManager> .Instance.State).NextSceneIsModal = false;

        PersistenSingleton <UIManager> .Instance.GetSceneFromState(PersistenSingleton <UIManager> .Instance.State).Hide(delegate
        {
            PersistenSingleton <UIManager> .Instance.PartySettingScene.Info = sPartyInfo;
            PersistenSingleton <UIManager> .Instance.ChangeUIState(UIManager.UIState.PartySetting);
        });
    }
コード例 #3
0
ファイル: PartySettingUI.cs プロジェクト: ArtReeX/memoria
    private static void TryHackPartyInfo(FF9PARTY_INFO partyInfo)
    {
        if (Configuration.Hacks.AllCharactersAvailable < 1)
        {
            return;
        }

        if (Configuration.Hacks.AllCharactersAvailable == 2)
        {
            foreach (PLAYER player in FF9StateSystem.Common.FF9.player)
            {
                TryHackPlayer(player, (Byte)(player.category & ~16));
            }
        }
        else if (Configuration.Hacks.AllCharactersAvailable == 3)
        {
            foreach (PLAYER player in FF9StateSystem.Common.FF9.player)
            {
                TryHackPlayer(player, (Byte)(player.category | 16));
            }
        }

        Int32 availabilityMask = -1;

        for (Int32 memberIndex = 0; memberIndex < 4; ++memberIndex)
        {
            PLAYER member = FF9StateSystem.Common.FF9.party.member[memberIndex];
            if (member != null)
            {
                partyInfo.menu[memberIndex] = member.info.slot_no;
                availabilityMask           &= ~(1 << partyInfo.menu[memberIndex]);
            }
            else
            {
                partyInfo.menu[memberIndex] = Byte.MaxValue;
            }
        }

        Byte characterIndex = 0;
        Byte slotIndex      = 0;

        while (slotIndex < 9 && characterIndex < FF9PARTY_PLAYER_MAX && availabilityMask != 0)
        {
            if ((availabilityMask & 1) > 0)
            {
                partyInfo.select[characterIndex++] = slotIndex;
            }

            ++slotIndex;
            availabilityMask >>= 1;
        }
    }
コード例 #4
0
ファイル: FieldHUD.cs プロジェクト: ArtReeX/memoria
    private static void OnPartyClickSwitchScene()
    {
        FF9PARTY_INFO ff9PartyInfo1 = new FF9PARTY_INFO
        {
            menu = new Byte[4] {
                0, 1, 2, 3
            },
            select = new Byte[8] {
                4, 5, 6, 7, Byte.MaxValue, Byte.MaxValue, Byte.MaxValue, Byte.MaxValue
            }
        };
        FF9PARTY_INFO ff9PartyInfo2 = ff9PartyInfo1;

        Boolean[] flagArray = new Boolean[9];
        flagArray[0]           = true;
        ff9PartyInfo2.fix      = flagArray;
        ff9PartyInfo1.party_ct = 4;
        PersistenSingleton <UIManager> .Instance.PartySettingScene.Info = ff9PartyInfo1;
        PersistenSingleton <UIManager> .Instance.ChangeUIState(UIManager.UIState.PartySetting);
    }
コード例 #5
0
        public static void OpenPartyMenu()
        {
            FF9PARTY_INFO party = new FF9PARTY_INFO();

            Int32 availableChatacters = 0;

            if (Configuration.Hacks.AllCharactersAvailable > 0)
            {
                availableChatacters = 0x1FF;
                party.party_ct      = 4;
            }
            else
            {
                for (int characterIndex = 8; characterIndex >= 0; --characterIndex)
                {
                    Boolean isAvailable = (FF9StateSystem.Common.FF9.player[characterIndex].info.party != 0);
                    if (isAvailable)
                    {
                        party.party_ct++;
                    }

                    availableChatacters = availableChatacters << 1 | (isAvailable ? 1 : 0);
                }

                if (party.party_ct > 4)
                {
                    party.party_ct = 4;
                }
            }

            for (int memberIndex = 0; memberIndex < 4; ++memberIndex)
            {
                if (FF9StateSystem.Common.FF9.party.member[memberIndex] != null)
                {
                    Byte characterId = FF9StateSystem.Common.FF9.party.member[memberIndex].info.slot_no;
                    party.menu[memberIndex] = characterId;
                    availableChatacters    &= ~(1 << characterId);
                }
                else
                {
                    party.menu[memberIndex] = Byte.MaxValue;
                }
            }

            Byte availableSlot = 0;

            for (Byte characterId = 0; characterId < 9 && availableSlot < PartySettingUI.FF9PARTY_PLAYER_MAX && availableChatacters > 0; ++characterId)
            {
                if ((availableChatacters & 1) > 0)
                {
                    party.select[availableSlot++] = characterId;
                }

                availableChatacters >>= 1;
            }

            while (availableSlot < PartySettingUI.FF9PARTY_PLAYER_MAX)
            {
                party.select[availableSlot++] = PartySettingUI.FF9PARTY_NONE;
            }

            EventService.OpenPartyMenu(party);
        }