コード例 #1
0
    private void InitLounge(int index, Transform t)
    {
        SetEvent(t, "SELECT_LOUNGE", index);
        LoungeModel.Lounge lounge    = lounges[index];
        CharaInfo          charaInfo = null;

        for (int i = 0; i < lounge.slotInfos.Count; i++)
        {
            if (lounge.slotInfos[i].userInfo.userId == lounge.ownerUserId)
            {
                charaInfo = lounge.slotInfos[i].userInfo;
                break;
            }
        }
        SetLabelText(t, UI.LBL_HOST_NAME, charaInfo.name);
        SetLabelText(t, UI.LBL_HOST_LV, charaInfo.level.ToString());
        SetLabelText(t, UI.LBL_LOUNGE_NAME, lounge.name);
        string text = StringTable.Get(STRING_CATEGORY.LOUNGE_LABEL, (uint)lounge.label);

        SetLabelText(t, UI.LBL_LABEL, text);
        SetStamp(t, lounge.stampId);
        int num  = lounge.num + 1;
        int num2 = lounge.slotInfos.Count((LoungeModel.SlotInfo slotInfo) => slotInfo != null && slotInfo.userInfo != null && slotInfo.userInfo.userId != lounge.ownerUserId);

        for (int j = 0; j < 7; j++)
        {
            bool is_visible = j < num - 1;
            SetActive(t, loungeMembers[j], is_visible);
            SetToggle(t, loungeMembers[j], j < num2);
        }
    }
コード例 #2
0
    private void InitRally(int index, Transform t)
    {
        //IL_0072: Unknown result type (might be due to invalid IL or missing references)
        //IL_0086: Unknown result type (might be due to invalid IL or missing references)
        SetEvent(t, "JOIN_MAP", index);
        LoungeModel.SlotInfo slotInfo           = rallyInvites[index];
        CharaInfo            userInfo           = slotInfo.userInfo;
        FollowLoungeMember   followLoungeMember = MonoBehaviourSingleton <LoungeMatchingManager> .I.GetFollowLoungeMember(userInfo.userId);

        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(index + 4);

        otherEquipSetCalculator.SetEquipSet(slotInfo.userInfo.equipSet, false);
        SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(userInfo, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        SetLabelText(t, UI.LBL_NAME, userInfo.name);
        SetLabelText(t, UI.LBL_LEVEL, userInfo.level.ToString());
        SetFollowStatus(t, userInfo.userId, followLoungeMember.following, followLoungeMember.follower);
        SetActive(t, UI.SPR_ICON_HOST, userInfo.userId == MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData.ownerUserId);
        SetPlayingStatus(t, userInfo.userId);
        SetActive(t, UI.SPR_ICON_FIRST_MET, MonoBehaviourSingleton <LoungeMatchingManager> .I.CheckFirstMet(userInfo.userId));
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(userInfo.selectedDegrees, false, delegate
        {
            RepositionTable();
        });
    }
コード例 #3
0
    private int GetEquipItemID(TypeCondition condition, CharaInfo target_info = null)
    {
        if (target_info == null)
        {
            target_info = userInfo;
        }
        if (target_info == null)
        {
            return(0);
        }
        if (target_info.equipSet == null || target_info.equipSet.Count == 0)
        {
            return(0);
        }
        int temp_id = 0;

        target_info.equipSet.ForEach(delegate(CharaInfo.EquipItem equip)
        {
            if (temp_id == 0 && equip != null && equip.eId != 0)
            {
                EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)equip.eId);
                if (equipItemData != null && condition(equipItemData.type))
                {
                    temp_id = equip.eId;
                }
            }
        });
        return(temp_id);
    }
コード例 #4
0
    public static PlayerLoadInfo FromCharaInfo(CharaInfo chara_info, bool need_weapon, bool need_helm, bool need_leg, bool is_priority_visual_equip)
    {
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        playerLoadInfo.Apply(chara_info, need_weapon, need_helm, need_leg, is_priority_visual_equip);
        return(playerLoadInfo);
    }
コード例 #5
0
    private void SetMemberInfo(LoungeModel.SlotInfo data, int i, Transform t)
    {
        //IL_005b: Unknown result type (might be due to invalid IL or missing references)
        //IL_006f: Unknown result type (might be due to invalid IL or missing references)
        CharaInfo          userInfo           = data.userInfo;
        FollowLoungeMember followLoungeMember = MonoBehaviourSingleton <LoungeMatchingManager> .I.GetFollowLoungeMember(userInfo.userId);

        EquipSetCalculator otherEquipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetOtherEquipSetCalculator(i + 4);

        otherEquipSetCalculator.SetEquipSet(data.userInfo.equipSet, false);
        SetRenderPlayerModel(t, UI.TEX_MODEL, PlayerLoadInfo.FromCharaInfo(userInfo, false, true, false, true), 99, new Vector3(0f, -1.536f, 1.87f), new Vector3(0f, 154f, 0f), true, null);
        SetLabelText(t, UI.LBL_NAME, userInfo.name);
        SetLabelText(t, UI.LBL_LEVEL, userInfo.level.ToString());
        SetFollowStatus(t, userInfo.userId, followLoungeMember.following, followLoungeMember.follower);
        SetActive(t, UI.SPR_ICON_HOST, userInfo.userId == MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData.ownerUserId);
        SetPlayingStatus(t, userInfo.userId);
        SetActive(t, UI.SPR_ICON_FIRST_MET, MonoBehaviourSingleton <LoungeMatchingManager> .I.CheckFirstMet(userInfo.userId));
        DegreePlate component = FindCtrl(t, UI.OBJ_DEGREE_FRAME_ROOT).GetComponent <DegreePlate>();

        component.Initialize(userInfo.selectedDegrees, false, delegate
        {
            GetCtrl(UI.GRD_LIST).GetComponent <UIGrid>().Reposition();
        });
        if (MonoBehaviourSingleton <LoungeMatchingManager> .I.IsRallyUser(userInfo.userId))
        {
            SetBadge(t, -1, 1, 10, 0, true);
        }
    }
コード例 #6
0
 public void JoinNotification(CharaInfo userInfo)
 {
     if (chatConnection != null && !string.IsNullOrEmpty(userInfo.name))
     {
         chatConnection.OnReceiveNotification(StringTable.Format(STRING_CATEGORY.LOUNGE, 10u, userInfo.name));
     }
 }
コード例 #7
0
    private void OnQuery_JOIN()
    {
        int       index     = (int)GameSection.GetEventData();
        CharaInfo charaInfo = memberInfo[index];

        if (MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeMemberStatus != null)
        {
            LoungeMemberStatus loungeMemberStatus = MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeMemberStatus[charaInfo.userId];
            switch (loungeMemberStatus.GetStatus())
            {
            case LoungeMemberStatus.MEMBER_STATUS.LOUNGE:
                OnQuery_MAIN_MENU_LOUNGE();
                break;

            case LoungeMemberStatus.MEMBER_STATUS.QUEST_READY:
            case LoungeMemberStatus.MEMBER_STATUS.QUEST:
                JoinParty(loungeMemberStatus.partyId);
                break;

            case LoungeMemberStatus.MEMBER_STATUS.FIELD:
                JoinField(loungeMemberStatus.fieldMapId);
                break;
            }
        }
    }
コード例 #8
0
        public void CopyHomeCharaInfo(CharaInfo info, StageObjectManager.CreatePlayerInfo.ExtentionInfo extentionInfo)
        {
            info.level = (int)lv;
            info.hp    = hp;
            info.atk   = atk;
            info.def   = def;
            int i = 0;

            for (int num = equipItems.Length; i < num; i++)
            {
                CharaInfo.EquipItem equipItem = equipItems[i];
                if (equipItem.eId > 0)
                {
                    info.equipSet.Add(equipItem);
                    if (extentionInfo != null && i >= 0 && i < 3)
                    {
                        int item = info.equipSet.Count - 1;
                        extentionInfo.weaponIndexList.Add(item);
                    }
                }
            }
            if (extentionInfo != null)
            {
                int index = Utility.Random(extentionInfo.weaponIndexList.Count);
                int value = extentionInfo.weaponIndexList[0];
                extentionInfo.weaponIndexList[0]     = extentionInfo.weaponIndexList[index];
                extentionInfo.weaponIndexList[index] = value;
            }
        }
コード例 #9
0
    public bool CreateLoungePlayer(LoungeModel.SlotInfo slotInfo, bool useMovingEntry, bool checkEquip)
    {
        //IL_004a: Unknown result type (might be due to invalid IL or missing references)
        if (slotInfo == null)
        {
            return(false);
        }
        if (slotInfo.userInfo == null)
        {
            return(false);
        }
        CharaInfo    userInfo     = slotInfo.userInfo;
        LoungePlayer loungePlayer = GetLoungePlayer(userInfo.userId);

        if (loungePlayer != null)
        {
            if (checkEquip)
            {
                this.StartCoroutine(CheckEquipChanged(loungePlayer.LoungeCharaInfo, userInfo, useMovingEntry));
            }
            return(false);
        }
        LoungePlayer item = creater.CreateLoungePlayer(this, peopleRoot, userInfo, useMovingEntry);

        charas.Add(item);
        loungePlayers.Add(item);
        return(true);
    }
コード例 #10
0
    private bool CheckEquipDiff(CharaInfo beforeCharaInfo, CharaInfo currentCharaInfo)
    {
        if (beforeCharaInfo.showHelm != currentCharaInfo.showHelm)
        {
            return(true);
        }
        List <CharaInfo.EquipItem> equipSet  = beforeCharaInfo.equipSet;
        List <CharaInfo.EquipItem> equipSet2 = currentCharaInfo.equipSet;

        if (equipSet.Count != equipSet2.Count)
        {
            return(true);
        }
        List <int> list  = new List <int>(7);
        List <int> list2 = new List <int>(7);

        for (int i = 0; i < equipSet.Count; i++)
        {
            list.Add(equipSet[i].eId);
            list2.Add(equipSet2[i].eId);
        }
        List <int> list3 = list;
        List <int> list4 = list2;

        list3.RemoveAll(list4.Contains);
        if (list.Count > 0)
        {
            return(true);
        }
        return(false);
    }
コード例 #11
0
    private void OnQuery_DETAIL()
    {
        int       num      = (int)GameSection.GetEventData();
        CharaInfo userInfo = members[num].userInfo;

        MonoBehaviourSingleton <StatusManager> .I.otherEquipSetSaveIndex = num + 4;
        GameSection.SetEventData(userInfo);
    }
コード例 #12
0
 public bool IsAllSameEquip(CharaInfo new_info)
 {
     if (IsSameEquipItemID(new_info, (EQUIPMENT_TYPE type) => type < EQUIPMENT_TYPE.ARMOR) && IsSameEquipItemID(new_info, (EQUIPMENT_TYPE type) => type == EQUIPMENT_TYPE.ARMOR) && IsSameEquipItemID(new_info, (EQUIPMENT_TYPE type) => type == EQUIPMENT_TYPE.HELM) && IsSameEquipItemID(new_info, (EQUIPMENT_TYPE type) => type == EQUIPMENT_TYPE.ARM) && IsSameEquipItemID(new_info, (EQUIPMENT_TYPE type) => type == EQUIPMENT_TYPE.LEG))
     {
         return(true);
     }
     return(false);
 }
コード例 #13
0
    public ExplorePlayerStatus(CharaInfo charaInfo, bool isSelf)
    {
        this.isSelf    = isSelf;
        this.charaInfo = charaInfo;
        MonoBehaviourSingleton <StatusManager> .I.CalcUserStatusParam(charaInfo, out int _, out int _, out int _hp);

        hpMax = _hp;
        buff  = new BuffParam(null);
    }
コード例 #14
0
 private void UpdateCharaHpMpSpEp(EcoSession session, CharaInfo info)
 {
     byte[] data = new byte[33];
     data.Fill(info.CharaID.ToBytes(), 0);
     data[4] = 3;
     data.Fill(((ulong)info.Hp).ToBytes(), 5);
     data.Fill(((ulong)info.Mp).ToBytes(), 13);
     data.Fill(((ulong)info.Sp).ToBytes(), 21);
     data.Fill(info.MaxEp.ToBytes(), 29);
     session.Send(new BasePacket(0x021c, data));
 }
コード例 #15
0
ファイル: CharaData.cs プロジェクト: mifumi323/CharaBox3
 public static string GetSex(CharaInfo.Sex sex)
 {
     return
         sex == CharaInfo.Sex.Unknown ? "不明" :
         sex == CharaInfo.Sex.Male ? "男" :
         sex == CharaInfo.Sex.Female ? "女" :
         sex == CharaInfo.Sex.Bisexual ? "両性" :
         sex == CharaInfo.Sex.Mixed ? "混合" :
         sex == CharaInfo.Sex.None ? "なし" :
         "不明";
 }
コード例 #16
0
    private IEnumerator CheckEquipChanged(CharaInfo beforeCharaInfo, CharaInfo currentCharaInfo, bool useMovingEntry)
    {
        if (CheckEquipDiff(beforeCharaInfo, currentCharaInfo))
        {
            DestroyLoungePlayer(beforeCharaInfo.userId);
            yield return((object)null);

            LoungePlayer player = creater.CreateLoungePlayer(this, peopleRoot, currentCharaInfo, useMovingEntry);
            charas.Add(player);
            loungePlayers.Add(player);
        }
    }
コード例 #17
0
 public LoungePlayer GetLoungePlayer(int id)
 {
     for (int i = 0; i < loungePlayers.Count; i++)
     {
         CharaInfo loungeCharaInfo = loungePlayers[i].LoungeCharaInfo;
         if (loungeCharaInfo.userId == id)
         {
             return(loungePlayers[i]);
         }
     }
     return(null);
 }
コード例 #18
0
 public void Activate(int user_id, string token, CharaInfo user_info, int slot_index)
 {
     userId       = user_id;
     userToken    = token;
     slotIndex    = slot_index;
     userInfo     = user_info;
     isPartyOwner = (PartyManager.IsValidInParty() && MonoBehaviourSingleton <PartyManager> .I.GetOwnerUserId() == userId);
     if (QuestManager.IsValidExplore())
     {
         MonoBehaviourSingleton <QuestManager> .I.ActivateExplorePlayerStatus(this);
     }
     Logd("Activate.");
 }
コード例 #19
0
    private PlayerLoader Load(LoungePlayer chara, GameObject go, CharaInfo chara_info, PlayerLoader.OnCompleteLoad callback)
    {
        PlayerLoader   playerLoader   = go.AddComponent <PlayerLoader>();
        PlayerLoadInfo playerLoadInfo = new PlayerLoadInfo();

        if (chara_info != null)
        {
            playerLoadInfo.Apply(chara_info, false, true, true, true);
            chara.sexType = chara_info.sex;
        }
        playerLoader.StartLoad(playerLoadInfo, 8, 99, false, false, true, true, false, false, true, true, SHADER_TYPE.NORMAL, callback, true, -1);
        return(playerLoader);
    }
コード例 #20
0
 public void CopyCharaInfo(CharaInfo info)
 {
     info.userId      = 0;
     info.name        = displayName;
     info.sex         = sexID;
     info.faceId      = faceTypeID;
     info.hairId      = hairStyleID;
     info.hairColorId = hairColorID;
     info.skinId      = skinColorID;
     info.aId         = bdy;
     info.hId         = hlm;
     info.rId         = arm;
     info.lId         = leg;
 }
コード例 #21
0
        public static CharaInfo EncodedToCharacter(String charaInfo)
        {
            charaInfo.Replace("+", "-");
            charaInfo.Replace("/", "_");
            byte[] data = System.Convert.FromBase64String(charaInfo);

            Program.Log.Debug("------------Base64 printout------------------");
            Program.Log.Debug(Utils.ByteArrayToHex(data));
            Program.Log.Debug("------------Base64 printout------------------");

            CharaInfo chara = new CharaInfo();

            return(chara);
        }
コード例 #22
0
    protected void UpdateRoomUserInfo(Transform trans, int index)
    {
        SetActive(trans, UI.SPR_USER_EMPTY, false);
        SetActive(trans, UI.SPR_USER_BATTLE, false);
        SetActive(trans, UI.SPR_USER_READY, false);
        SetActive(trans, UI.SPR_USER_READY_WAIT, false);
        SetActive(trans, UI.OBJ_CHAT, false);
        QuestRoomUserInfo component = trans.GetComponent <QuestRoomUserInfo>();

        if (!(component == null))
        {
            userInfo = MonoBehaviourSingleton <StatusManager> .I.GetCreatePlayerInfo().charaInfo;

            if (userInfo == null)
            {
                component.LoadModel(index, null);
            }
            else
            {
                equipSetNo = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.eSetNo;
                SetActive(trans, UI.SPR_WEAPON_1, false);
                SetActive(trans, UI.SPR_WEAPON_2, false);
                SetActive(trans, UI.SPR_WEAPON_3, false);
                int weapon_index = 0;
                userInfo.equipSet.ForEach(delegate(CharaInfo.EquipItem data)
                {
                    if (data != null)
                    {
                        EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)data.eId);
                        if (equipItemData != null && equipItemData.IsWeapon())
                        {
                            SetActive(trans, weaponIcon[weapon_index], true);
                            int equipmentTypeIndex = UIBehaviour.GetEquipmentTypeIndex(equipItemData.type);
                            SetSprite(trans, weaponIcon[weapon_index], ITEM_TYPE_ICON_SPRITE_NAME[equipmentTypeIndex]);
                            weapon_index++;
                        }
                    }
                });
                component.LoadModel(index, userInfo);
                EquipSetCalculator equipSetCalculator = MonoBehaviourSingleton <StatusManager> .I.GetEquipSetCalculator(equipSetNo);

                SimpleStatus finalStatus = equipSetCalculator.GetFinalStatus(0, userInfo.hp, userInfo.atk, userInfo.def);
                SetLabelText(trans, UI.LBL_ATK, finalStatus.GetAttacksSum().ToString());
                SetLabelText(trans, UI.LBL_DEF, finalStatus.GetDefencesSum().ToString());
                SetLabelText(trans, UI.LBL_HP, finalStatus.hp.ToString());
                SetLabelText(trans, UI.LBL_NAME, userInfo.name);
                SetLabelText(trans, UI.LBL_LV, userInfo.level.ToString());
            }
        }
    }
コード例 #23
0
    public override void Initialize()
    {
        //IL_0068: Unknown result type (might be due to invalid IL or missing references)
        friendCharaInfo = (GameSection.GetEventData() as FriendCharaInfo);
        data            = (GameSection.GetEventData() as CharaInfo);
        if (friendCharaInfo != null)
        {
            dataFollower  = friendCharaInfo.follower;
            dataFollowing = friendCharaInfo.following;
        }
        nowSectionName = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName();

        isFollowerList = Object.op_Implicit(Object.FindObjectOfType(typeof(FriendFollowerList)));
        InitializeBase();
    }
コード例 #24
0
    private void OnQuery_KICK()
    {
        int       index     = (int)GameSection.GetEventData();
        CharaInfo charaInfo = memberInfo[index];

        GameSection.SetEventData(new object[1]
        {
            charaInfo.name
        });
        GameSection.StayEvent();
        MonoBehaviourSingleton <LoungeMatchingManager> .I.SendRoomPartyKick(delegate(bool isSuccess)
        {
            GameSection.ResumeEvent(isSuccess, null);
        }, charaInfo.userId);
    }
コード例 #25
0
    private void SetupListItem(CharaInfo userInfo, int i, Transform t)
    {
        FollowLoungeMember followLoungeMember = MonoBehaviourSingleton <LoungeMatchingManager> .I.GetFollowLoungeMember(userInfo.userId);

        SetLabelText(t, UI.LBL_NAME, userInfo.name);
        SetLabelText(t, UI.LBL_LEVEL, userInfo.level.ToString());
        SetFollowStatus(t, userInfo.userId, followLoungeMember.following, followLoungeMember.follower);
        SetActive(t, UI.SPR_ICON_HOST, userInfo.userId == MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData.ownerUserId);
        SetPlayingStatus(t, userInfo.userId);
        SetActive(t, UI.SPR_ICON_FIRST_MET, MonoBehaviourSingleton <LoungeMatchingManager> .I.CheckFirstMet(userInfo.userId));
        bool is_visible = MonoBehaviourSingleton <UserInfoManager> .I.userInfo.id == MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData.ownerUserId;

        SetActive(t, UI.BTN_KICK, is_visible);
        SetEvent(t, UI.BTN_KICK, "KICK", i);
        SetEvent(t, UI.BTN_JOIN, "JOIN", i);
    }
コード例 #26
0
        public static void SelectMapIDPostfix(CharaInfo _charaInfo, List <int> _useMap, HashSet <int> _used)
        {
            if (!HS2ChicksDigMapModdersPlugin.UseModdedMapsForSafeEvents.Value)
            {
                return;
            }
            else if (!HS2ChicksDigMapModdersPlugin.SafeEventCheck(_charaInfo.eventID) && !HS2ChicksDigMapModdersPlugin.UseModdedMapsForAllEvents.Value)
            {
                return;
            }

            if (HS2ChicksDigMapModdersPlugin.EnableDebugLogging.Value)
            {
                Log.LogInfo(string.Format("Before Selecting {0} Event {6} map {1}-{5} useMap {2} used {3} available {4}", _charaInfo.chaFile.parameter.fullname, _charaInfo.mapID, string.Join(" ", _useMap), string.Join(" ", _used), string.Join(" ", Singleton <Game> .Instance.infoEventContentDic[_charaInfo.eventID].goToFemaleMaps), NameForMapId(_charaInfo.mapID), _charaInfo.eventID));
            }

            int[] goToFemaleMaps = Singleton <Game> .Instance.infoEventContentDic[_charaInfo.eventID].goToFemaleMaps;
            goToFemaleMaps = ExcludeAchievementMap(goToFemaleMaps);
            List <int> list = new List <int>();

            if (!((IReadOnlyCollection <int>)(object) goToFemaleMaps).IsNullOrEmpty())
            {
                list = goToFemaleMaps.AddRangeToArray(HS2ChicksDigMapModdersPlugin.ModdedMapIds()).Except(_useMap).Shuffle().ToList();
            }
            bool flag = false;

            for (int i = 0; i < list.Count; i++)
            {
                int num = list[i];
                if (!_used.Contains(num))
                {
                    _used.Add(num);
                    _charaInfo.mapID = num;
                    flag             = true;
                    break;
                }
            }
            if (!flag && list.Any())
            {
                _charaInfo.mapID = list.Shuffle().FirstOrDefault();
            }

            if (HS2ChicksDigMapModdersPlugin.EnableDebugLogging.Value)
            {
                Log.LogInfo(string.Format("After Selecting {0} Event {6} map {1}-{5} useMap {2} used {3} available {4}", _charaInfo.chaFile.parameter.fullname, _charaInfo.mapID, string.Join(" ", _useMap), string.Join(" ", _used), string.Join(" ", list), NameForMapId(_charaInfo.mapID), _charaInfo.eventID));
            }
        }
コード例 #27
0
 public InGameRecorder.PlayerRecord CreateInGameRecord(CharaInfo _charaInfo)
 {
     if (_charaInfo != null)
     {
         charaInfo = _charaInfo;
     }
     InGameRecorder.PlayerRecord playerRecord = new InGameRecorder.PlayerRecord();
     playerRecord.id               = ((!isSelf) ? charaInfo.userId : 0);
     playerRecord.isNPC            = false;
     playerRecord.isSelf           = isSelf;
     playerRecord.charaInfo        = charaInfo;
     playerRecord.beforeLevel      = charaInfo.level;
     playerRecord.playerLoadInfo   = PlayerLoadInfo.FromCharaInfo(charaInfo, true, true, true, false);
     playerRecord.animID           = playerRecord.playerLoadInfo.weaponModelID / 1000;
     playerRecord.givenTotalDamage = givenTotalDamage;
     return(playerRecord);
 }
コード例 #28
0
 public void AddPlayer(CharaInfo chara_info)
 {
     if (chara_info != null)
     {
         if (list == null)
         {
             list = new List <ResultUserInfo>();
         }
         ResultUserInfo userInfo = GetUserInfo(chara_info.userId);
         if (userInfo != null)
         {
             userInfo.userId = chara_info.userId;
         }
         else
         {
             list.Add(new ResultUserInfo(chara_info));
         }
     }
 }
コード例 #29
0
    public Player CreateGuest(int id, CharaInfo charaInfo, PlayerLoader.OnCompleteLoad callback = null)
    {
        //IL_0011: Unknown result type (might be due to invalid IL or missing references)
        //IL_0023: Unknown result type (might be due to invalid IL or missing references)
        //IL_0028: Unknown result type (might be due to invalid IL or missing references)
        //IL_0045: Unknown result type (might be due to invalid IL or missing references)
        //IL_004a: Unknown result type (might be due to invalid IL or missing references)
        //IL_004c: Unknown result type (might be due to invalid IL or missing references)
        CreatePlayerInfo createPlayerInfo = new CreatePlayerInfo();

        createPlayerInfo.charaInfo = charaInfo;
        Player  player         = CreatePlayer(id, createPlayerInfo, false, Vector3.get_zero(), 0f, null, callback);
        Vector3 appearPosGuest = Vector3.get_zero();

        if (boss != null)
        {
            appearPosGuest = boss._transform.get_position();
        }
        player.SetAppearPosGuest(appearPosGuest);
        return(player);
    }
コード例 #30
0
 public void LoadModel(int index, CharaInfo user_info)
 {
     //IL_00c9: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
     if (user_info == null)
     {
         if (index <= 3 && index >= 0)
         {
             userIndex = index;
         }
         DeleteModel();
         userIndex = -1;
         userInfo  = null;
     }
     else
     {
         userIndex = index;
         userInfo  = user_info;
         if (index <= 3)
         {
             UITexture componentInChildren = this.GetComponentInChildren <UITexture>();
             if (MonoBehaviourSingleton <OutGameSettingsManager> .I.questSelect.isRightDepthForward)
             {
                 componentInChildren.depth = index;
             }
             else
             {
                 componentInChildren.depth = 3 - index;
             }
             renderTexture = UIRenderTexture.Get(componentInChildren, -1f, false, -1);
             renderTexture.nearClipPlane = 4f;
             model = Utility.CreateGameObject("PlayerModel", renderTexture.modelTransform, -1);
             model.set_localPosition(new Vector3(0f, -1.1f, 8f));
             model.set_eulerAngles(new Vector3(0f, 180f, 0f));
             this.StartCoroutine(Loading());
         }
     }
 }
コード例 #31
0
        /// <summary>
        /// Protocol 01FD
        /// </summary>
        /// <param name="session"></param>
        /// <param name="packet"></param>
        /// <returns></returns>
        public async void SelectMap(EcoSession session, BasePacket packet)
        {
            Logger.Debug($"Received SelectChara Request :{packet.Data.ToHexString()}");
            SelectMapRequestInfo scri = new SelectMapRequestInfo(packet.Data);

            if (scri.MapMove == 0) //login
            {
                //session.CharaID = await DatabaseManager.SelectAsync($@"SELECT id FROM Chara WHERE account_id = {session.AccountID} AND Slot = {scri.SelectedSlot}");
                CharaInfo info = await DatabaseManager.SelectAsync <CharaInfo>(
                    $@"SELECT Chara.Id AS CharaID, Name, Race, Form, Race, Form, Sex, HairStyle, HairColor, Wig, IsEmptySlot, Face, RebirthLv, Ex, Wing, WingColor, Map, X, Y, Dir, Hp, Mp, Sp,Ep, MaxHp, MaxMp, MaxSp, MaxEp, Gold FROM Chara LEFT JOIN CharaData ON Chara.id = CharaData.id WHERE Chara.account_id = {session.AccountID} AND Slot = {scri.SelectedSlot}"
                    );

                CharaEquipment equip = await DatabaseManager.SelectAsync <CharaEquipment>(info.CharaID, "Equip");

                info.Equipments = equip.ToArray();

                session.CharaID = info.CharaID;
                ShowTinyIcon(session, info.ShowTinyIcon == 1);
                EverydayDungeonNotification(session, info.DailyDungeonCleared == 1);
                MoveSpeedChange(session, session.CharaID, 0x0A);               //lock chara move
                CharaModeChange(session, session.CharaID, 2, 0);
                RightClickSettings(session, RightClickSettingsEnum.ALLOW_ALL); //todo: save user settings

                // todo:
                SendCharaInventory(session);
                session.Send(info.ToPacket());
                UpdateCharaMaxHpMpSpEp(session, info);
                UpdateCharaHpMpSpEp(session, info);
                UpdateCharaBuffAndDebuff(session, session.CharaID);
                UpdateDetailedStatus(session, info);
                UpdateElements(session);
                UpdateCharaCapaAndPayl(session);
                //=====
            }
            else //move between map servers
            {
            }
            //session.Send(new BasePacket(0x0033));
        }
コード例 #32
0
ファイル: CharaData.cs プロジェクト: mifumi323/CharaBox3
 public bool Match(CharaInfo chara)
 {
     bool match;
     // 名前
     if (namematch)
     {
         match = false;
         foreach (string s in chara.name) { if (name == s) { match = true; break; } }
         if (!match) return false;
     }
     else if (namecontain)
     {
         match = false;
         foreach (string s in chara.name) { if (s.Contains(name)) { match = true; break; } }
         if (!match) return false;
     }
     else if (namenotcontain)
     {
         foreach (string s in chara.name) { if (s.Contains(name)) return false; }
     }
     // 登場作品
     if (gamematch)
     {
         match = false;
         foreach (string s in chara.game) { if (game == s) { match = true; break; } }
         if (!match) return false;
     }
     else if (gamecontain)
     {
         match = false;
         foreach (string s in chara.game) { if (s.Contains(game)) { match = true; break; } }
         if (!match) return false;
     }
     else if (gamenotcontain)
     {
         foreach (string s in chara.game) { if (s.Contains(game)) return false; }
     }
     // 説明
     if (descriptionmatch) { if (chara.description != description) return false; }
     else if (descriptioncontain) { if (!chara.description.Contains(description)) return false; }
     else if (descriptionnotcontain) { if (chara.description.Contains(description)) return false; }
     // 画像
     if (graphicmatch) { if (chara.graphic != graphic) return false; }
     else if (graphiccontain) { if (!chara.graphic.Contains(graphic)) return false; }
     else if (graphicnotcontain) { if (chara.graphic.Contains(graphic)) return false; }
     // 性別
     if (sexmatch) { if (chara.sex != sex) return false; }
     else if (sexnotmatch) { if (chara.sex == sex) return false; }
     // 年齢下限
     if (ageminormore) { if (pqaAge.GetValue(chara.age) < pqaAge.GetValue(agemin)) return false; }
     else if (ageminmore) { if (pqaAge.GetValue(chara.age) <= pqaAge.GetValue(agemin)) return false; }
     // 年齢上限
     if (agemaxorless) { if (pqaAge.GetValue(chara.age) > pqaAge.GetValue(agemax)) return false; }
     else if (agemaxless) { if (pqaAge.GetValue(chara.age) >= pqaAge.GetValue(agemax)) return false; }
     // 大きさ下限
     if (sizeminormore) { if (pqaSize.GetValue(chara.size) < pqaSize.GetValue(sizemin)) return false; }
     else if (sizeminmore) { if (pqaSize.GetValue(chara.size) <= pqaSize.GetValue(sizemin)) return false; }
     // 大きさ上限
     if (sizemaxorless) { if (pqaSize.GetValue(chara.size) > pqaSize.GetValue(sizemax)) return false; }
     else if (sizemaxless) { if (pqaSize.GetValue(chara.size) >= pqaSize.GetValue(sizemax)) return false; }
     return true;
 }
コード例 #33
0
ファイル: CharaData.cs プロジェクト: mifumi323/CharaBox3
 public int Add(CharaInfo newChara)
 {
     Array.Resize(ref chara, chara.Length + 1);
     chara[chara.Length - 1] = newChara;
     return chara.Length - 1;
 }